Game Engine Development

Details

  • Developed on Prime Engine, a skeleton game engine made by Professor Artjoms Kovalovs at USC.
  • Experimented with the code base and implemented different features for my personal improvement.
  • Tools Used: C++, Lua, Maya

Takeaways

Working in this Game Engine was my first time learning the “lower levels” of Game Development. I was thrown into a huge code base that I was unfamiliar with. It became a great playground for me to be bold, try new things, and gain knowledge either expectedly or unexpectedly. It could be frustrating sometimes as I tried to figure out how things work. But being able to understand any code base quickly is one of the most important skills a game engineer has to have.

I got the opportunity to implement fundamental game features such as camera culling and collision detection that we usually take for granted. Playing with the code base and working on those features helped de-mystify game development. Not only I learned to become a better engineer, but it also helped me become a better designer as well as I now know more about game development in general.

Features Implemented

All were implemented from scratch.

  • AABB-based camera frustum culling
  • Physics System: Collision detection with gravity
  • Tank Mini-game
    • I built upon the physics system previously implemented for collision detection to also include trigger volumes. To make the task more meaningful, I developed a tank mini-game in-engine.
    • In my first iteration, it was a mini-game where you control a tank and eliminate all soldiers by driving over them. The game is won when you eliminate all soldiers in the scene.
    • I added the controllable client tank and implemented trigger volumes on moving soldiers which destroy them (make them disappear) when the tank hits them. I first made the client tank work with physics by adding a physics component to it and expanding functionalities in the physics manager. I also added the debugRenderer method which draws sphere colliders on tanks and soldiers for better visualization.
    • I extended functions in objects and added trigger volume on soldiers. Currently, the soldier removes themselves from the scene when their trigger volume is entered by the tank.
    • For my second iteration, I improved and expanded the game which had its trigger volumes cause a more variety of things, and made the game more complex.
    • I updated the code in soldier’s state machines. Instead of disappearing upon elimination, Soldiers would play their DEATH animation instead.
    • In addition, I added another layer of trigger volume onto the tank. It is bigger compared to the one already on the tank. In videos, the bigger sphere collider drawn by the debugRenderer is this bigger layer of tank trigger volume for visualization. In the level, all soldiers will start by walking around. They will start running once they are near the tank which triggers the bigger volume. Soldiers are now programmed in a way that they can start running at any moment during their movement.
    • To make the game more challenging and have losing conditions, I modified the goal of the mini-game from just eliminating all soldiers on sight to eliminating only the imposters among them. Whenever the game level is loaded, soldiers are randomly assigned to be either “real” or “imposter.” The player won’t be able to know who or how many are imposters. The tank must avoid running over any real soldiers. The game is lost if a real soldier was accidentally run over.
    • To be able to distinguish between real soldiers and imposters, I added the ability for the tank to slow down its speed once a real soldier is nearby. It happens if any real soldier hits the bigger trigger volume on the tank. The tank detects it and updates its speed. It adds a good complexity to the game as sometimes an imposter and a real soldier could both be close to the tank, the tank slows down its speed but the player can’t be sure which one is the real soldier. Some strategy is required to avoid failure.
    • Lastly, I also added a timer on the screen. The game must be won in under specified seconds. It adds another layer of difficulty and makes the game even more engaging. The player won’t be able to move the tank if it hit an imposter or time is run out.