O'Reilly logo

LibGDX Game Development By Example by James Cook

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The project setup

Ok, new game, new project. We will start with a blank canvas; so go through and create a project like we did in the previous example.

Using the LibGDX Project Generator, call the game FlappeeBee and give it a game class name of FlappeeBeeGame.

The package can be anything you like, and then set the destination to wherever you wish to keep your code. Finally, uncheck every checkbox except Desktop.

Once this is done, click on Generate and then import the project into your choice of IDE.

Setting up the GameScreen class

With this being a fresh project, hot off the generator. It will have the default Hello World! game inside. Just bear this in mind for the moment.

Next, we create our own GameScreen class. Remember, when you create this, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required