Contributions:
Collision
Enemy AI
Scripted Events
Time: 13 Weeks
Team Size: 5 Programmers, 3 Procedural Artists, 3 Artists, 2 Level Designers & 4 Audio Designers
Engine: The Game Engine (TGA's engine)
D4RK was the first game we made in the schools own engine, The Game Engine (TGE). Since the game was made as we were learning the engine, we focused on making things simple so we could learn, while also keeping with the time constraint.
In D4RK play as a cyborg samurai, navigating through a desolate city ruled by alien machines.
In D4RK we stuck to very simple AABB (Axis Aligned Bounding Box) collision, since the game is a side scroller we don't need advanced collision. With it being a side scroller we also could get away with having 2D collision checks instead of 3D which made the math and implementation much easier, However since we ignored the Z-axis (depth) for the collision checks, I added a check on the start of the game to ignore all colliders that was not within a certain part of the Z-axis. Since the Level Desigers reused forground objects in the background which caused collision with those objects.
For debugging purposes I also added a collider view, where we turn of almost all of the rendering of objects and turn on the rendering of colliders.Â
In D4RK we only have one "enemy" in the game which is a turret. Since it's a turret it doesn't move aside from targeting the player, so the only logic we needed for it was the ability to shoot and aim at the player. However even if it's a simple AI, since it was the first enemy I worked with in TGE, it still posed some challenges. The biggest one was the targeting since we wanted the turret to angle and turn itself towards the player.
The first step was making sure I could manipulate the gun part, while letting the base be. Which I solved by asking the Artists to have them as two seperate models. Then we placed the base part in the editor and create the turret part when we load in the level.
In that way we had the base and the turret as separate models, which I could then control easier.
Having an easy way to control the gun part of the turret, I started with the tracking.
The first step was simply making the gun part rotate towards the players current position. While working with the tracking I used ImGui to show information about the turret, so I could easiler debug it. I then implemented a max and min angle for it, as well as making the base rotate depending on which side the player was on.
Rotate the base & Gun, if player is on the other side
Turrets Gun rotation