Simple Arcade Game with LibGDX
Sustainable living themed game made with the LibGDX framework while applying Object Oriented Programming (OOP) concepts.
The first step was to create a game engine which included a game loop, rendering, and input handling. The game loop was responsible for updating the game state and rendering the game world. The rendering was done using the SpriteBatch class which allowed for efficient rendering of 2D images. Input handling was done using the InputProcessor interface which allowed for handling of keyboard and mouse input.
The next step was to create the game world which included the player, obstacles, and power-ups. The player was controlled using the keyboard and could move left, right, up, and down. The obstacles were randomly generated and moved from the top of the screen to the bottom. The power-ups were also randomly generated and provided the player with special abilities.
I implemented collision detection between the player and obstacles as well as between the player and power-ups. When the player collided with an obstacle, the game was over and the player's score was displayed. When the player collided with a power-up, the player's score was increased and the power-up was removed from the game world.
As it was a arcade game, I ensured efficient resource management by implementing object pooling for the projectiles, obstacles, and power-ups. This allowed for reusing objects instead of creating new ones which improved performance.