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, ...

Get LibGDX Game Development By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.