Sven van Huessen

Work / School / Block A

Pitfall

During the challenging 8-week period where I was tasked with recreating the classic Pitfall game in C++, I achieved several milestones that I am particularly proud of. First and foremost, I improved my ability to manage time effectively, making sure that I consistently dedicated hours each day to the project while also meticulously documenting my progress in the learning log and work log.

Technically, I am especially proud of designing a small yet easy to use entity component system which improved the game's functionality. And made it way easier to add new entities. To complement this, I also developed a user interface system that enhanced the overall gameplay experience and a scene system, making the flow of the game easier to develop.

I used the template that was delivered, which is based on the C++ Fast Track for Games Programming. This template gave me the ability to render images and read user inputs. Other than that, I had to create everything from scratch, including:

Below You can view some of the code I wrote for this project that I'm proud of.

Particle System

I'm proud of the particle system I created for this project. I used this system to create water particles and fun particles. The water particles are used when you jump in the water and when the player dies.

The particle system is very flexible and easy to use. It allows me to create any kind of particle I want and it's very easy to add new particles to the game.

Below you can see some of the particles I created for this project.

Water Particles

Testing Particles

Easy Level editor

Making a level should be easy and fun to do. Thats why I used a software called Tiled that helped me with this.

Tiled is a general purpose tile map editor. It's built to be easy to use and easy to extend. The way I used it was to create a level in tiled using my Tileset. I then exported the level as a .csv file.

I then wrote a function that reads the .csv file and creates the necessary entities/tiles in my game. This way I was able to create a level in a matter of minutes.

Collision Optimization

Because of my tile based level editor I had the decide for each tile in the grid if should have a collider or not. As shown above in my level editor I was able to easily determine if a tile should have collisions.

Now each tile having it's own collider is not very efficient. This is because that would mean that for a 100x100 grid I would have 10.000 colliders. each having to check for collision each frame.

Thats why I wrote a small algorithm that checks for adjacent tiles and merges them into one big collider. Images below show a before and after of this optimization.

This reduced the amount of colliders from 890 to just 65 for my whole level.

Before, every tile has a collider

After, colliders are combined

Feedback from Teachers

After the project was finished I got my grade. It feels grade to see the work I've done has paid off. Upon reflecting on this block and my grade of 10.0, I genuinely believe that I have showcased substantial growth both technically and personally. This is what the teachers wrote about my project:

"Excellent work beautifully presented. Well done. We can see your learning log improving as the weeks progressed and hope you'll start next block at that level."

I even got a tweet from one of my teachers, Jacco Bikker (Ex-game developer), about my project.

Download