Stay and Slay

Timeframe: 16 weeks (20h/week)

Team: 5 programmers, 2 designers, 5 artists

Engine: Our improved version of TGE, the school's in-house game engine made in C++ and DirectX11

Using an entity-component system library EnTT.

Inspiration: Anger Foot



This was my first attempt at implementing an FPS camera. I learned a lot and experimented with two different ways of applying mouse input. Initially, I calculated the delta screenspace position of the mouse movement between frames by setting the mouse in the middle of the screen and then moving it. However, this approach proved error-prone, and I had to convert between screen space and client space to get accurate values. Despite my efforts, this method had a lot of flaws, and the camera's movement felt rough and jagged, especially when moving diagonally. For my second attempt, I utilized Raw Input from the Windows API, a more effective solution.  


Deadly props

Breakable Door Physics

Player Movement & Recoil

Damage Indication & Death Camera

Node scripting

Technical Details & Closing Thoughts

The second project with EnTT (entity-component system) under my belt, this time around, I had a better understanding of the workflow, which made the whole process smooth. I thoroughly enjoyed developing using ECS,  and I'm leaning more and more toward data-oriented programming as opposed to object-oriented. I expanded my usage of features provided by EnTT, such as the ability to exclude specific components and the use of the blackboard, known as ctx (context). Because it was my first time using NVIDIA PhysX, I'm glad we did not create a wrapper around PhysX. This allowed me to gain a more in-depth and comprehensive understanding of its structures and their workings. A better learning opportunity put simply.   


It was fun and educational to create an fps camera and implement various recoil rotations. During the process, I quickly realized that I needed to separate the up and down rotation of the camera from the left and right. Otherwise, the player model would rotate around its right axis when looking up and down. To achieve this, I created a separate "head" matrix that represents rotation up and down, which I then multiplied with my player matrix and additional recoil rotations. By doing so, I was able to apply rotation to the camera while keeping the player model fixed in place.   

©2023 by Viktor Rissanen                                                 Resumé  LinkedIn