An jazzed-up version of Asteroids designed with Cocos2D.
- Cocos2D has dependencies on SDL2 for sound and OpenGL for graphics. To set these up correctly on WSL2/Ubuntu, type
make prereq
at an Ubuntu shell prompt. (I can't promise things will work exactly the same on your WSL2/Ubuntu version, but the code and links should hopefully provide you with enough guidance to get to a working state.) - Once the OS-level prerequisites are installed, type
make devinstall
to set up the project-level dependencies in development mode, or justmake install
to set up the game as runnable only.
- At a command prompt in the project directory, type
make tests
.
- At a command prompt in the project directory, type
make run
.
- I've included some extension recommendations that can make your development easier.
- These recommendations will pop up when opening the project inside VSCode.
- Installing both extensions will
- Use the code in
settings.json
to runmake format
andmake lint
on eachFile:Save
. - Display available Make targets within the Makefile Tasks sidebar pane and allow them to be run with a mouse click.
- Use the code in
- The game starts in attract mode.
- Hit the
ESC
key to quit the game. - Yes, it's a prototype.
- Left-arrow and right-arrow move the ship left and right.
- Down-arrow to thrust in the direction the ship is facing.
- Left-CTRL or right-CTRL to fire your laser.
- Spacebar to hyperspace.
- Catch random power-ups when they randomly cross the screen to briefly improve your ship's capabilities.