top of page

THE CANDY MACHINE

Project Details

The Candy machine is a standalone small scale game engine. The aim of the project was to create a game engine that had an inbuilt level editor and allowed the user to play the game in real-time. The project was built using C++ and SDL.

The engine had the following features:

1. AI for Non-playable characters

2. Sound

3. Physics and collision

4. Rendering

5. A file management system that allowed players to save levels they created and load the file to play or further edit.

As part of a 3 man team, I was responsible for programming the sound engine, adding collision physics and adding the weather effects. To implement the sound engine, I used the basic SDL sound library contained in the SDL_mixer.h file. The background music was programmed to play when the game started and paused when the player accesses the menu or the level editor. The sound effects were integrated with collision physics. Examples of sound effects include player jumps, players colliding with hostile AI, AI sound effects, etc. For the weather effects, I used PNG files representing snowy and rainy weathers developed by a member of the team. The image scrolling was programmed so as to create a continuous falling effect. An option to increase the intensity was also added. Lastly, collision physics was added using a box collision detection system. 

The engine performed satisfactorily and its working can be viewed as a short video by following the above link.

bottom of page