This legally distinct Centipede Game was created with a custom Vulkan-based engine built from the ground up in C++ and HLSL using FLECS (Fast Lightweight Entity Component System), with assistance from Gateware, an open-source library. This project was created as a team in a month to demonstrate knowledge of custom graphics pipelines which we had been learning for the previous 2 months.
This project features extensive use of FLECS (Fast Lightweight Entity Component System) to control many entities at once.
There are 3 enemies which endlessly attack the player, wave after wave. Snake enemies spawn in waves at the top of the screen and move laterally until they collide with a mushroom, another snake, or a wall, where they then move downwards one row before continuing to move laterally, but in the opposite direction. Snake heads are worth 100 points to destroy while their bodies are worth 10 points, and a mushroom is generated wherever a snake is destroyed. Destroying a head piece will cause the following snake segment to become a head piece; shooting a snake in the middle will split the snake into 2 independent snakes.
Spiders spawn near the edges of the screen and move erratically across to the other side of the screen before despawning, eating mushrooms along the way. Spiders are worth 30 to 90 points based on how close the spider is to the player when it is destroyed, the closer the more points.
Fleas spawn at the top of the screen and move directly downwards, spawning mushrooms as they fall. Fleas are worth 200 points to destroy. All enemies will kill the player on contact. Mushrooms are also worth 1 point to destroy, have 5 health, and regenerate their health when a new wave is spawned (which awards the player 2 points).
Use the arrow keys to move and the spacebar to shoot. The escape key will pause the game.
Many game balancing decisions were made during development ranging from how many points the player needs to be awarded with an extra life to how far upwards the player is allowed to move. An important decision was the decision to only allow the player one bullet on the screen at a time - which was done to limit the player's effectiveness at range while providing hectic and effective close-range combat when the player needs it most. Additionally, when you lose a life, your first bullet after respawning will pierce through all targets, so use it wisely!
You can unlock the ability to have more than one bullet, have infinite piercing bullets, or both by using cheat codes - hold down 'k' and press 'p', 'o', 'i', 'u', or 'y' to use a cheat. 'P' toggles player invincibility, 'O' adds 1000 points to your score, 'I' gives you an extra life, 'U' toggles full-auto weapon mode, and 'Y' toggles if your bullets pierce through targets. Beware, using any cheat codes will prevent you from getting a high score.
Some game parameters are customizable in the defaults.ini file, which can be opened with any text editor. When you download the copy below, the high score that comes with it is my high score, try to beat it!
During this project, I performed the following development tasks:
Developed Snake, Flea, and Mushroom behaviors using FLECS (Fast Lightweight Entity Component System) to provide core gameplay functionality
Developed game state manager and logic using a singleton class to provide core functionality (spawn next wave of snakes, reset enemies on player death, switch to menu when player out of lives, etc)
Developed spawning system and logic using FLECS to provide implementation of all entities
Developed cheat code system and integrations into the various systems it affects to provide additional gameplay
Implemented binary file I/O for high score tracking
Assisted with development of player movement and firing logic
Assisted with development of Spider enemy behavior
Assisted in the development of the custom C++ Vulkan engine