A simple game built on the GameFrame framework.
This is designed as an example for the usage of the GameFrame framework, and is commented with more details than usual code for the purpose of explaining how the game works at a tutorial level.
Following the GameFrame design pattern, Pong is made from Frames and Components.
The PongGame class shows how to implement a ManagedGame GameFrame class.
Other utility classes like Palette and ResourceManager show common GameFrame design practices.
Pong consists of three frames.
The entry point to the game.
Shows menu design using Layout and Button components, Frame navigation, a custom cursor, and handling music.
A menu to change game settings.
Shows menu design using complex menu components.
The main gameplay.
Shows UI design using Layout components and designing gameplay with custom components.
Pong uses custom components to implement gameplay objects.
A component that draws and updates to move around the screen, and triggers effects when collisions are detected.
A component collecting the other custom components and implementing gameplay.
A component that can be controled by user input or a simple AI
A simple math based controller for a Paddle to implement a basic AI.