Project period: 2022, for roughly half a year.
My role: Engine/Gameplay Programmer.
My contribution:
- Input system & engine API
- Debug Camera
- Trigger boxes and conditional triggers setup in TrenchBroom
- TrenchBroom recreation of Sponza for graphics and overall testing purposes
- Character controller
- Setting up the gameplay in the main level
The Project
For our group project assignment, we had to make an engine for a FPS game, and make a simple example game to go along with it. It works for both PlayStation 5 and PC, using TrenchBroom as a level editor, PS5's own implementation and Windows systems for Input. DirectX and PlayStation existing libraries were used for the graphics.
Input
For PS5 Input I used their own systems and documentationFor PC I implemented an input method directly using Windows
Summary:
Most of the work I did for the enginepart of the project
was the input handling.
The PlayStation controls were not that difficultas they provide clear documentation.
The Windows controls were a lot more difficult,I ran into a lot of issues and vaguely documented methods but managed to make it work in the end. I learned afterwards that we did not need to make the input from scratch so I could have used a library instead.
The input system is split into a PC and PS5 input "cpp" that have their own unique implementation of the Input "header".This way, no matter the used platform, all the same functions are used without unwanted errors or side effects.
The debug camera using the Input system to fly through a TrenchBroom levelthat was made by a designer for their separate assignment.
Character controller
Movement handlingMovement and jumping using velocity(physics system had issues with impulse)Step checks for handling stairsAngle checks for handling slopesand the speed of both moving up and down them
Summary:
When the main part of the engine was done, some of us switched to implementing the gameplay.
I primarily worked on the player controller.
It was made to handlemoving up and down
slopes, moving up
stairs / stepsand all the other generic things you expect like
jumping,
moving without slidingaround and
moving the cameraaround without issue.
For stairs I check the height of stepsin front of the player while moving.
Slopes are managed by checking their angle which affects the speed up and sliding down the slopeif at all.
All movement is handled using velocity,
since the impulse function, which would be good for jumping,
had issues with the physics library implementation.
The controller in action in my movement test hallway