Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ITT 2014 - Mario Zechner - Libgdx 101

ITT 2014 - Mario Zechner - Libgdx 101

Consider this talk a 45 minute boot camp about libgdx. Mario introduces you to the overall idea behind libgdx, show you how to create your first project, run and debug it on all supported platforms and introduce the bare minimum of libgdx's API to write a very simple game. After attending the talk you should be well equipped to dive into the documentation and samples of libgdx to start writting your first game!

Istanbul Tech Talks

May 12, 2014
Tweet

More Decks by Istanbul Tech Talks

Other Decks in Programming

Transcript

  1. What is libGDX? • Cross-platform game development framework • Java

    + C/C++ for performance hungry code • Use Java, Scala, Kotlin, ... • Write once ... http://libgdx.badlogicgames.com http://github.com/libgdx/libgdx @badlogicgames, @libgdx
  2. Features Low-Level Mid-Level High-Level Meshes, Shaders, Textures, ... Sprite &

    Polygon Batching Texture Atlas, Bitmap Font Asset Manager Math Library Custom Collections JSON/XML (de-)serialization
  3. It‘s a framework, not an engine Mix & Match, use

    and combine features from any level
  4. Lets write a game Actually, we‘ll just quickly prototyp a

    game A real game needs more code and assets 
  5. Assets Plane, 3 frames, 88x73px Ground, 808x71px Rock, up &

    down, 108x239px Background, 800x480 music.mp3 explode.wav arial.fnt, arial.png
  6. Low-Level Layer Application Management • Lifecycle events • Window management

    • Rendering loop • Threading Gdx.app, ApplicationListener, LwjglApplication, AndroidApplication, IOSApplication, GwtApplication ,...
  7. Low-Level Layer File I/O • Unified across platforms • Preferences

    (persistent map) • Sane file manipulation API Gdx.files, FileHandle, ...
  8. Low-Level Layer Networking • Open URL in browser • HTTP,

    HTTPs API ala HttpClient • Socket API Gdx.net, HttpRequest, HttpResponse, Socket, ServerSocket, ...
  9. Low-Level Layer Audio • Streaming playback for music • In-memory

    playback for sound effects • PCM read/write • Panning, volume, pitch Gdx.audio, Sound, Music, AudioDevice, ...
  10. Low-Level Layer Graphics • OpenGL ES 2.0, 3.0 • Display

    mode API • Continuous & non-continuous rendering • Custom 2D Bitmap manipulation API Gdx.graphics, GL20, GL30, Pixmap, PixmapIO, ...
  11. Low-Level Layer Input • Keyboard, Mouse, Touch • Accelerometer, Compass,

    Vibrator • On-screen Keyboard Gdx.input, InputProcessor, ...
  12. Mid-Level Layer Graphic Utilities • Shaders, textures, meshes, framebuffer objects

    • Polygon & spritebatch, texture regions, texture atlas, bitmap fonts, 2D particle system, shape renderer ShaderProgram, Texture, TextureRegion, Mesh, Framebuffer, PolygonBatch, SpriteBatch, TextureAtlas, BitmapFont, ...
  13. Mid-Level Layer Math • Matrices, vectors, quaternions • Bounding shapes,

    Intersection testing • Cameras • Splines • Triangulation Matrix4, Matrix3, Vector2, Vector3, Quaternion, BoundingBox, Rectangle, Circle, OrthographicCamera, PerspectiveCamera, CatmullRomSpline, DelaunayTriangulator, ...
  14. Mid-Level Layer Asset Manager • Threaded • Asynchronous loading •

    Reference counting • Pluggable API AssetManager, ...
  15. Mid-Level Layer Custom Collections & Serialization • Lists, maps, sets,

    pools • Garbage Collector aware • JSON POJO (de-)serialization • XML parsing/writting Array, ObjectMap, Pool, Json, XmlReader, ...
  16. High-Level Layer 2D Scene Graph • Tweening • Skinable UI

    toolkit • Table-based layouting • Viewport management Stage, Skin, Button, Table, ...
  17. High-Level Layer 3D API (WIP!) • FBX, DAE, OBJ support

    • GPU Skinning • Material system • Shadow Mapping, Cube Mapping, ... • Extremely flexible Batching API ModelBatch, ModelInstance, Material, Environment, Renderable, RenderableProvider, Shader, ...
  18. Extensions • Not part of the core API • gdx-freetype

    (desktop, Android, iOS) • gdx-bullet (desktop, Android, iOS) • gdx-box2d (desktop, Android, iOS, HTML) • gdx-controllers (desktop, Android, iOS, HTML)