Elon Musk Game
Basics
This game was coded as part of the AP Computer Science program at Crescenta Valley High School. The game uses Java and an AWT-based framework to animate graphics.
The game is relatively simple: the player controls Elon Musk with WASD keys, trying to avoid Twitter icons. Elon Musk is trying to negotiate a good price to buy Twitter, so the price decreases over time. The player wins when the price reaches zero, and Musk wins his court case, although negative prices are included to compare high scores.
Technical
The game incorporates the following technical aspects:
- The number of Twitter icons and their frequency both increase as time passes, using the Stopwatch class as a helper
- Twitter icons "lock" onto Elon Musk when they initially spawn and keep their trajectory, so that the player must always keep moving
- As more and more icons are spawned, the game lags (on purpose), so that the icons move more slowly
- In order to prevent the lagging of Elon Musk due to increasing Twitters, multithreading is used
Game Download
To download a ZIP folder of the game, please click the link below. A ZIP folder will appear on your computer; make sure you unzip and press "run" to play
Elon Musk Game Download