Fall Gals
About
This game is made as part of the course 'Game Programming'.
The course is about learning some of the more low-level things that happens in an engine.
The game itself is made in Simple
Render Engine.
The engine lends itself very well to be used to learn about some of the intricacies of the different parts
of a game engine.
The game is the final project of the course, and we chose to challenge ourselves with it and go 3D. The game
might seem simple on the surface
but in the backend, we had to implement systems usually inbuilt in major engines.
My part
Since the engine are mostly focused on rendering, one of the essential features for our 3D game that were missing was a 3D physics system. This then became my responsibility to integrate. We chose to go with Bullet physics engine since it was included as part of the engine files, but just not integrated. Another part I had the responsibility for was the character controller.
The Physics engine
Since the engine were compiling as part of the engine but not integrated into the engine the first order of
business was to create the physics world. As part of setting up the physics world I also had to implement
handling of collision events.
Most of this had decent documentation and guides on how-to.
Because the game object is both part of the rendering world and the physics world separately I had to make
sure to implement some syncing between these worlds
so that the transforms behaved properly. This part also had a lack of documentation & guides on how-to deal
with it so it was mostly up to myself on how to do it.
The way the syncing ended up:
- Sync render world into physics world
- Do a physics step
- Sync physics world into the render world
Just to clarify what is synced between worlds, it is the transform of the rigidbodies.
Rigidbodies is the representation of any physics object in the physics world. In the render world I had made a rigidbody component such that it could be added to any game object.
The Character Controller
The character controller builds upon the rigidbody component added by my integration of the physics engine.
For walking the controller simply apply force based on input.
For rotation it looks at the input as well but instead of doing it through physics it just rotates it by
updating the rotation of the transform.
The camera is moving based on mouse movement.
Another thing it does is look at the calculated velocity to determine what kind of animation we play.
Gameplay