Game Programmer
Biscuit Clicker
Protect Your Product!
Technology: Visual Studios, Allegro Library
Date: Fall 2021
​
This game was created during a game architecture class in my fall semester, during my third year, at Champlain College. In this class, we spent most of the semester developing our own game engines in Visual Studios using the Allegro C++ library, with the final project having us team up and build a game using one of our engines. In this 2D clicker, you play as a baker trying to sell as many biscuits as you can. You do this buy clicking the Biscuit to earn money which can be spent on upgrades. Watch out for the pesky ants who try to hinder your progress. For the game, I spent most of my time working on UI, importing and exporting data: such as languages and save states, as well as building a state machine.
Engine
When it came to building the engine, I needed to be able to be able to crate a window as well as draw and manipulate sprites, animate them, and take input. Like many aspects of the engine, data was passed around using events, listening for specific changes both in the code and from the user. Event Listeners would be set up in the beginning of the program being run while the system are being initialized. Pictured below is the addition of listeners to the game class:
During engine development, since the sprites being used were the same size many sprite values were hard coded in consts during unit creation, this would be changed when transition to building a game. The unit creation process involves first setting up the sprite as a buffer which allows for sprites to be visible on screen before being converted to animation which is used to create the unit.
The animation portion of the unit pipeline saw a sprite sheet get parsed into the separate sprites which get used for animation. When sprites were drawn to the screen, and while animation is enabled, the animation class loops through each of the sprites in the order they were input into the system. A small portion of the animation loop is shown below:
Game
One of the systems I had to implement for this project was our localization. Besides English, the game needed to support 2 other languages. To handle this I built a text reader and a parser which took each line of text from the pile and split it up according to what language it belonged to. Pictured below is a portion of the language parser: