SlideShare a Scribd company logo
1 of 12
Game Development with



     By Gabriel Grill
LibGDX is ...
 open source
 cross-platform
   Desktop
   Web
   Smartphone
 performant
   JNI Wrapper
   optimised for Davlik VM
 well documented
   Wiki, Forum, Blog, JavaDoc, Demos, Videos, ..
LibGDX has ...
 great tooling
   Particle-, Body-, Fonteditor
   TMX and TWL support
   Texture packer
 backends for
   Jogl, LWJGL, Angle
   SoundTouch, KissFFT
   Mpg123, Tremor
 nightly builds and regular releases
Getting Started - Desktop
1. create Project
2. download and move libGDX to libs/
3. Java Build Path
        gdx.jar, gdx-backend-jogl.jar
        and the corresponding “-natives.jar“

 public class HelloWorldDesktop {
    public static void main(String[] argv) {
       new JoglApplication(new App(), "Title",
          width, height, false/*Gl 2.0*/);
     }
 }
Application



                          http://libgdx.googlecode.com/svn/wiki/img/application_lifecycle_diagram.png


public class App implements ApplicationListener
{
   public void resume() { }
   public void resize(int width, int height) { }
   public void render(){ }
   public void pause(){ }
   public void dispose(){ }
   public void create(){ }
}
Getting Started - Android
1. create Android Project
2. copy libGDX to libs/
3.       <uses-sdk minSdkVersion="3" targetSdkVersion="8"/>
4.       Java Build Path
          gdx.jar, gdx-backend-android.jar
          Desktop Project
public class HelloWorldAndroid extends AndroidApplication {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initialize(new App(), false /*Gl 2.0*/);
    }
}
Assets and Input
 File API
   Classpath, File system
   Asset folder data/
 AssetManager
 Texture-, Fixture-, TileAtlas
 Json- and XML Processing
 Polling and event-based Input
 Remote Input, compass and accelerometer
Graphics
 OpenGL ES 1.0, 1.1 and 2.0
 Shaders, Framebuffer Objects, Mipmaps
 Batched and cached sprite rendering
 Particle System, TMX tile map rendering
 2D scene graph with tweening framework
 OBJ and MD5 model loaders
   soon FBX/Collada
 Key-frame and skeletal animation
 Ortographic and perspective camera
Miscellaneous
 Custom Collections, Sorting
 Preferences
 Vector, Matrix and Quaternion classes
 JNI wrapper of box2d
 Shapes, intersection and overlap testing
 Vibrator support
 WAV, MP3 and OGG support
 Playback and recording
 AdWhirl, Admob
 GDX-JNIGEN
Performance
   renders a scene of 32 32 pixel sprites in a grid - 336 sprites
   AndEngine:
     Hero: ~17fps
     Nexus One: ~41fps
   Libgdx:
       Hero: ~51fps
       Nexus One: ~51fps
   Android 1.5 - Hero:
     FloatBuffer.put( float value ): 40.774 secs
     FloatBuffer.put(int index, float value): 42.710 secs
     FloatBuffer.put( float[] values ): 41.109 sec
     IntBuffer.put( int[] values): 12.59 secs
     JNI -> BufferUtils.copy(): 0.14 secs
   Android 2.2 - Nexus One:
       FloatBuffer.put( float value ): 6.876 secs
       FloatBuffer.put(int index, float value): 7.006 secs
       FloatBuffer.put( float[] values ): 6.800 sec
       IntBuffer.put( int[] values): 1.479 secs
       JNI -> BufferUtils.copy(): 0.067 secs
Demos
Now let‘s see some Code
Sources
 http://code.google.com/p/libgdx/wiki/
 http://code.google.com/p/libgdx-users/wiki/
 http://libgdx.badlogicgames.com/nightlies/docs/api/
 http://www.badlogicgames.com/wordpress/
 http://www.badlogicgames.com/wordpress/?p=816
 http://www.badlogicgames.com/wordpress/?p=904

More Related Content

What's hot

Android NDK and the x86 Platform
Android NDK and the x86 PlatformAndroid NDK and the x86 Platform
Android NDK and the x86 Platform
Sebastian Mauer
 

What's hot (20)

From Android NDK To AOSP
From Android NDK To AOSPFrom Android NDK To AOSP
From Android NDK To AOSP
 
Android game development
Android game developmentAndroid game development
Android game development
 
Android OS Porting: Introduction
Android OS Porting: IntroductionAndroid OS Porting: Introduction
Android OS Porting: Introduction
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
NVIDIA Gameworks, Libraries and Tools
NVIDIA Gameworks, Libraries and ToolsNVIDIA Gameworks, Libraries and Tools
NVIDIA Gameworks, Libraries and Tools
 
Android NDK and the x86 Platform
Android NDK and the x86 PlatformAndroid NDK and the x86 Platform
Android NDK and the x86 Platform
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
Options for Entity interaction - Unite Copenhagen 2019
Options for Entity interaction - Unite Copenhagen 2019Options for Entity interaction - Unite Copenhagen 2019
Options for Entity interaction - Unite Copenhagen 2019
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
 
A War Story: Porting Android 4.0 to a Custom Board (ELCE 2012)
A War Story: Porting Android 4.0 to a Custom Board (ELCE 2012)A War Story: Porting Android 4.0 to a Custom Board (ELCE 2012)
A War Story: Porting Android 4.0 to a Custom Board (ELCE 2012)
 
Inside Android's UI
Inside Android's UIInside Android's UI
Inside Android's UI
 
Native development kit (ndk) introduction
Native development kit (ndk)  introductionNative development kit (ndk)  introduction
Native development kit (ndk) introduction
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 
Embedded Android Workshop part I ESC SV 2012
Embedded Android Workshop part I ESC SV 2012Embedded Android Workshop part I ESC SV 2012
Embedded Android Workshop part I ESC SV 2012
 
Android On Development Boards at AnDevCon3
Android On Development Boards at AnDevCon3Android On Development Boards at AnDevCon3
Android On Development Boards at AnDevCon3
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
 
BeagleBoard Workshop ESC Boston 2011
BeagleBoard Workshop ESC Boston 2011BeagleBoard Workshop ESC Boston 2011
BeagleBoard Workshop ESC Boston 2011
 
Android Jumpstart ESC SV 2012 Part I
Android Jumpstart ESC SV 2012 Part IAndroid Jumpstart ESC SV 2012 Part I
Android Jumpstart ESC SV 2012 Part I
 
C language in our world 2017
C language in our world 2017C language in our world 2017
C language in our world 2017
 

Similar to Game development with_lib_gdx

Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
NAVER D2
 
ngGoBuilder and collaborative development between San Francisco and Tokyo
ngGoBuilder and collaborative development between San Francisco and TokyongGoBuilder and collaborative development between San Francisco and Tokyo
ngGoBuilder and collaborative development between San Francisco and Tokyo
notolab
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
Ajailal Parackal
 

Similar to Game development with_lib_gdx (20)

Getting Started With Android
Getting Started With AndroidGetting Started With Android
Getting Started With Android
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
 
GPU Acceleration for Containers on Intel Processor Graphics
GPU Acceleration for Containers on Intel Processor GraphicsGPU Acceleration for Containers on Intel Processor Graphics
GPU Acceleration for Containers on Intel Processor Graphics
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutes
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Eric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyondEric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyond
 
Eric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyondEric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyond
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
ngGoBuilder and collaborative development between San Francisco and Tokyo
ngGoBuilder and collaborative development between San Francisco and TokyongGoBuilder and collaborative development between San Francisco and Tokyo
ngGoBuilder and collaborative development between San Francisco and Tokyo
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
 
Android Attacks
Android AttacksAndroid Attacks
Android Attacks
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 
There is more to C
There is more to CThere is more to C
There is more to C
 
Android basics
Android basicsAndroid basics
Android basics
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Game development with_lib_gdx

  • 1. Game Development with By Gabriel Grill
  • 2. LibGDX is ...  open source  cross-platform  Desktop  Web  Smartphone  performant  JNI Wrapper  optimised for Davlik VM  well documented  Wiki, Forum, Blog, JavaDoc, Demos, Videos, ..
  • 3. LibGDX has ...  great tooling  Particle-, Body-, Fonteditor  TMX and TWL support  Texture packer  backends for  Jogl, LWJGL, Angle  SoundTouch, KissFFT  Mpg123, Tremor  nightly builds and regular releases
  • 4. Getting Started - Desktop 1. create Project 2. download and move libGDX to libs/ 3. Java Build Path  gdx.jar, gdx-backend-jogl.jar  and the corresponding “-natives.jar“ public class HelloWorldDesktop { public static void main(String[] argv) { new JoglApplication(new App(), "Title", width, height, false/*Gl 2.0*/); } }
  • 5. Application http://libgdx.googlecode.com/svn/wiki/img/application_lifecycle_diagram.png public class App implements ApplicationListener { public void resume() { } public void resize(int width, int height) { } public void render(){ } public void pause(){ } public void dispose(){ } public void create(){ } }
  • 6. Getting Started - Android 1. create Android Project 2. copy libGDX to libs/ 3. <uses-sdk minSdkVersion="3" targetSdkVersion="8"/> 4. Java Build Path  gdx.jar, gdx-backend-android.jar  Desktop Project public class HelloWorldAndroid extends AndroidApplication { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initialize(new App(), false /*Gl 2.0*/); } }
  • 7. Assets and Input  File API  Classpath, File system  Asset folder data/  AssetManager  Texture-, Fixture-, TileAtlas  Json- and XML Processing  Polling and event-based Input  Remote Input, compass and accelerometer
  • 8. Graphics  OpenGL ES 1.0, 1.1 and 2.0  Shaders, Framebuffer Objects, Mipmaps  Batched and cached sprite rendering  Particle System, TMX tile map rendering  2D scene graph with tweening framework  OBJ and MD5 model loaders  soon FBX/Collada  Key-frame and skeletal animation  Ortographic and perspective camera
  • 9. Miscellaneous  Custom Collections, Sorting  Preferences  Vector, Matrix and Quaternion classes  JNI wrapper of box2d  Shapes, intersection and overlap testing  Vibrator support  WAV, MP3 and OGG support  Playback and recording  AdWhirl, Admob  GDX-JNIGEN
  • 10. Performance  renders a scene of 32 32 pixel sprites in a grid - 336 sprites  AndEngine:  Hero: ~17fps  Nexus One: ~41fps  Libgdx:  Hero: ~51fps  Nexus One: ~51fps  Android 1.5 - Hero:  FloatBuffer.put( float value ): 40.774 secs  FloatBuffer.put(int index, float value): 42.710 secs  FloatBuffer.put( float[] values ): 41.109 sec  IntBuffer.put( int[] values): 12.59 secs  JNI -> BufferUtils.copy(): 0.14 secs  Android 2.2 - Nexus One:  FloatBuffer.put( float value ): 6.876 secs  FloatBuffer.put(int index, float value): 7.006 secs  FloatBuffer.put( float[] values ): 6.800 sec  IntBuffer.put( int[] values): 1.479 secs  JNI -> BufferUtils.copy(): 0.067 secs
  • 12. Sources  http://code.google.com/p/libgdx/wiki/  http://code.google.com/p/libgdx-users/wiki/  http://libgdx.badlogicgames.com/nightlies/docs/api/  http://www.badlogicgames.com/wordpress/  http://www.badlogicgames.com/wordpress/?p=816  http://www.badlogicgames.com/wordpress/?p=904