I am interested in computer graphics, specifically the old techniques of software rendering from 90's video games. One such technique is raycasting, used by games such as Wolfenstein 3D and Super Mario Kart on the SNES. In this program I attempt to recreate the graphical style and gameplay of these games.
What it does
This program is a 3D kart racing game.
How we built it
The program was made in C and used the SDL2 library for graphics and input.
Challenges we ran into
Getting the rendering of billboard sprites (also known as impostors ඞ) was quite tricky. It involves projecting points from 3D into 2D and at one point I spent 4 hours on this task making little progress. Eventually I figured out how to use Wolfram Alpha to generate the formula for a 3x3 matrix inversion required to successfully render the impostors ඞඞඞ.
Accomplishments that we're proud of
Since the program was written in C, encountering the dreaded segmentation fault was inevitable. I counted how many times it happened, and over the course of the hackathon I only had 30 segfaults. I had also been coding for two and a half hours before encountering the first one.
What we learned
The code for this game was written in a single source file that became more difficult to navigate over time because of the sheer size and the need in C for forward declarations, which has caused me to arrange the order of the functions in the code in a somewhat strange way. For future projects it would be a good idea to break down the code into multiple more organized files early on.
What's next for Super Brummie Kart
The renderer of Super Brummie Kart is very inefficient, but (mostly) works and performs well enough for satisfying gameplay with O3 optimisations enabled. As such, an obvious future task for Super Brummie Kart is the optimize the renderer.
Other opportunities for extension include adding more tracks, enemies, and powerups like in the original Mario Kart game.