Timeframe: 8 weeks (20h/week)

Team: 4 programmers, 3 designers, 5 artists

Engine: TGA2D - Schools in-house engine made in C++ and DirectX11

Inspiration: Super Meat Boy


Collision resolve

Zero gravity & flying enemy

Initially, the enemy was designed to move in a back-and-forth pattern upon colliding with a wall or reaching the edge of a platform. The development of this feature was an ongoing process, leading to progressively more complex scenarios. Instead of simply changing direction when reaching the end of a platform, the enemy was set to follow the geometry effectively ignoring gravity. Hence the name "zero gravity enemy".

The flying enemies were quite straightforward. One point on each side, checks for collisions to initiate a velocity change.

<-- Flying enemies


The void pointer system (as seen below) for each state was a bit excessive seeing as all states just assigned new velocities and point locations. But the performance impact was negligible anyways, one dereferencing of a pointer each frame.

If any of the edge points were no longer colliding with the environment, the model would begin rotating in a particular direction. If any of the middle points were no longer colliding, the enemy's velocity would change. The direction of rotation or velocity change depended on the enemy's current state.


If I was to implement a similar feature again I would come up with a different solution for sure. First of all, I would probably use a circle for collision detection. Have a downward force vector that constantly points towards the point of contact effectively always pulling the enemy towards the geometry. All the while setting a correct velocity in the direction of travel. Through the downward vector, I could extract the rotation for the model.

Overall, really fun game to work on, and the result was a highly replayable and competitive platformer. This led to a lot of speedrunning within the group. At one point two people got the same time, which prompted us to display another decimal.

See below: first picture with 2 decimals, second with 3.

©2023 by Viktor Rissanen                                                 Resumé  LinkedIn    rissanenviktor@gmail.com