Class resources for "Game Programming in C++" class taught to high school students at Splash @ UCLA 2024. This repository mostly contains code for an eductional game called "Pixel Panic" written in C++ by Benson Liu & Ming Zhu. It contains a few coding challenges for students to try and practice what they know about C++. To learn more about the class, check out the slides.
To build the game, run the following command.
make
There is also some auxiliary development support.
make format # run source code formatter
make valgrind # check for memory leaks
make clean # delete all build files
- Add laser shooting. Inside
player.cpp
implement handling of shooting the layer from keyboard input. This involves getting familiar with conditionals/if-statements in C++. - Add alien spawning. Inside
alienspawner.cpp
implement spawning aliens 5 at a time using a for loop. - Add alien zig-zagging. Inside
alien.cpp
add zig-zagging movement to the alien enemy. This involves doing some game programming to add a new game mechanic. - Add missiles. Inside
missile.hpp
, add the class definition forMissile
that inherits from theActor
class and then updatemissile.cpp
to include zig-zagging for this new kind of bullet. Make sure to uncomment code inmissile.cpp
andplayer.cpp
to see this in action! - Come up with your own features! What other features of the game do you think will be fun to add?
The code for this class was developed by Benson Liu and Ming Zhu. To ask any questions about the class and this game, please contact the authors.