The ALX Software engineering school exposed me in technical programming skills and non-technical programming skills. Building a portfolio project was something I’ve looked forward to doing from our first virtual class, and here we are! A 3D Maze Game using SDL2 and Ray-casting, written in C language.
Let’s breakdown the experience in building this game, there’s an interesting conclusion at the end of this story, wait for it.
In a replication of the 1981 Wolfenstein game replication, the Maze Game project can be used as a challenge more than a tool to help people. Creating the 3D experience from a 2D image was done by the concept of Ray-casting, where view angle/rays from a player object at a certain angle are projected to hit the walls or the game environment serving as the view for that object, mapping out the environment based on where the rays hit as shown in the image above. SLD2 is the graphic interface that creates the GUI window to host the game interface. The game is written in C language.
Meet The Team
●Otitoola Olufolabi — Execution And Implementation
●Ade Sikiru — Research and Type Conversion
●Hanif — Research and Game Environment
Project Architecture
We focus on implementing the Maze game idea with basics including creating a player object and view point, a map layout of the environment, and a movable player object controlled with certain keyboard inputs for direction and navigation. Additional functionality can be added later on to create a full replication of the 1981 Wolfenstein game.
Challenges
A big part of this learning experience were the challenges we faced and how we were able to overcome them. A major challenge was converting data types. Our learning materials had SDL2 and Ray-casting techniques written in C++ language which meant we had to convert the knowledge to its equivalent format in C for our header (.h) files and function (.c) files.
We also had some challenges with setting up an Ubuntu environment to test our progress with the game build.
ALX uses a standard formatting called Betty Linter for its C language programs, hence we had to ensure our code was in line with Betty Linter. Some of Betty’s constraints include:
- Not more than 5 functions are allowed in a file
- Not more than 40 lines are allowed in a function
- Not more than 80 characters are allowed on a line
In conclusion, the project was very tasking and educative, exposing me to some intricate foundational details about game development. I came to a conclusion that game development might not be a path in software engineering I will love to take but I will love to explore using Unity Development tool to develop more games.
See Demo video: https://www.youtube.com/watch?v=Himx3u9jVhs
GitHub link: https://github.com/oolufolabii/Maze-Project