Mario Kart in DirectX12


Creating a game engine to as a backend to a Mario Kart-esc game in DirextX12

 
 
  • Date: 18/05/2019

    Languages: C++

    Keywords: DirectX12, Game Engine, Group Project

 

Overview

This project was to create a game engine framework capable of producing and running a game similar to Mario Kart using DirectX12. Our group created the “ThiCC engine” (Toolkit, pHysics, Input, Camera, Collision) which by the end of a few months of development was capable of creating a game very similar to Mario Kart.

About the Engine

Because this project was focused on building a game engine over making an actual game itself, our group created all our systems with reusability in mind. We created a number of systems for physics, audio, asset management, and more - all of which are non-specific to the Mario Kart game and could allow the engine to be easily repurposed for another title.

The core of the engine’s backend was the “ThICC Toolkit” which provided easy access to the different features of an engine through a GUI. Its functionalities included asset importing (models, sounds, images), configuration customisation (fonts, keybinds, cameras) as well as configurations for in-game systems (item system).


Levels

Levels are created through Blender which uses a bespoke python plugin that reads the level’s model into a. ThICC (binary) file holds a binary representation of each triangle. The plugin also reads in the placements of lap waypoints, item boxes, cinematic camera positions around the level into another. ThICC file. These files are then handled by the toolkit in organising the levels which are then passed to the engine itself to be run.

My Contribution

My first work was on the collisions between objects in the scene: the players, items and item boxes. I created a system that would find the furthest vertices on a mesh and create an axis-aligned bounding box (AABB) from them. These AABBs would then be tested for intersections and the appropriate responses would occur. When players hit an item or an item box the item or item box would disappear and the player would get hit or get an item respectfully. If two players intersected then a momentum-based collision response would occur based upon the players’ speeds and movement directions.

My other work on this project was the creation of all the items in the game. I used the underlying model and animation systems being created to create all the items from Mario Kart Wii as well as their respective behaviour. I also set up a pooling system where all the items in the game would be created at the start and then taken from the item pools when necessary. This was needed because of the delay caused when loading in a model into the game.

 

Demo Video

Video of four players playing the game.

 
 
Previous
Previous

Infiltraitors

Next
Next

Element RPG