Dear Agent X,
Welcome to the City of Bexiqun. I know that you are wondering about my identity. Do not worry about that. I am neither an enemy nor a friend. You were abducted from the city of Dhaka during Operation OBONTI. I know everything about you, your family, and this operation. However, you were abducted to save yourself from an ambush in Mirpur, Dhaka.
Now, you must run. They know that you are here in Bexiqun. You will find the key to the car in your pocket.
Best Wishes,
Mr. 101
This is a simple 2D infinite runner game. The player gets a score by avoiding other cars on the road. The player can drive the car to the Left or Right using the Left/Right arrow keys. The main objective is to overtake as many cars as you can.
The project utilizes Java AWT (Abstract Window Toolkit) API for generating GUI(Graphical User Interface).
Launcher is the main class that instantiates an instance of Game class. The game instance starts a thread that 'ticks' and 'renders' State class objects. This project has 3 States:
- Menu
- Game
- Finish
The 'menu state' is shown at the start of execution. The 'game state' holds all the actions of this project. The 'finish state' shows the final score.
โโโ constants
โ โโโ Dimensions <- constants that holds value of dimensions of UI elements
โ โโโ Numbers <- integer constants
โ โโโ Positions <- constants that holds value of positions of UI elements
โ โโโ Strings <- string constants
โ
โโโ entity
โ โโโ Entity <- Abstract parent class for game entities
โ โโโ Player <- Player class for main character rendering and ticking
โ โโโ PublicCar <- PublicCar class for challenger entity rendering and ticking
โ โโโ PublicCarGenrationListener <- triggers when a new car gets generated in UI
โ
โโโ gfx
โ โโโ resources <- contains every image resources
โ โโโ Assests <- loads and delivers image for GUI
โ โโโ ImageLoader <- helper class for importing image files
โ โโโ SpriteSheet <- crops spritesheet images into desirable sizes and shapes for extracting characters
โ
โโโ state
โ โโโ State <- Abstract parent class for game states
โ โโโ GameState <- implements the rendering and the ticking of the main gameplay
โ โโโ MenuState <- starting state
โ โโโ FinishState <- point showing state
โ
โโโ utils <- hold utility codes
โ
โโโ Display <- instantiates the GUI
โ
โโโ Game <- renders and ticks the state classes in a thread
โ
โโโ KeyManager <- reads user inputs
โ
โโโ Launcher <- Main Class
โ
All the image resources are taken from the internet using google search. I did not produce any of the graphics assests.