Cog in the Machine
The Project
Engine: GXPEngine (A Saxion in-house engine)
Language: C#
Team Size: 6
Project Duration: 2 weeks
Cog in the Machine was another Saxion project, but this was developed with a team of friends which allowed me to work more effectively than before, due to the better group environment. The focus of this project was on physics.
What I Did
For this project, I did all the physics elements, which includes the movement of the player and the rotation of the level itself. I also implemented the various objects the player could interact with such as the springs and saws. My last major addition was adding Tiled support for level loading, which made it easier to create multiple levels.
What I Learned
I learned how to add 2D physics to a game. Calculating the Point Of Impact (POI) through the object’s distance to the line, the line’s normal vector and the time it took. This allowed me to have the ball collide with line segments instead of only full lines. The ball moved using velocity which would be affected by gravity and the bounciness of the object it collided with. The gravity would also adapt to the rotation of the level.