Learning Game Development through a Maze Game
Xavier E. Figueroa Muniz
Software Engineer at Lockheed Martin | Bachelor's in Computer Sciences | Holberton School
This blog post won't be the same as the other blog posts that I've made. This one might be the last or not, but at least its the last one from the Holberton Foundations program. For a group project we worked on developing a maze game from SDL2 (Simple DirectMedia Layer) in C language using a technique called Raycasting. Now you might think that this type of project doesn't really represent something modern (for example). But the purpose of the project was to have a game so that people would have a little educational and challenging time. With a team composed of: Luis Melendez, who some of his roles were texture implementation and mapping design, and myself, with some roles on SDL2 renderer and window initialization, we were able to implement a pretty straightforward taking into account our different time frames and the amount of time we had for each deadline. The end goal of this project was strictly for educational purposes hence with it we can teach in a fun way how and what raycasting is and works, and how it was such a breakthrough.
Getting together to work on this project can be seen as something rather sudden based on that we formed the team after the first deadline. Yet the forming of this team was actually something needed for this project to work. Both growing up playing video games highly influences the way we see them and understand them, but we never stopped and consider the advances that they have made. When we learned that a technique such as raycasting presented a pseudo 3D game (Wolfenstein 3D) we knew that this was the right way to go. Since Luis is looking to focus his career in game development and personally I always like to learn a bit from each specialization with the purpose of applying what is learned, it was a no brainer to go for this idea. By making our own version of a maze game we get to learn and try to develop it as something of a game that can be both challenging and educational.
The end result of our project was not as expected. Of course there were ups and downs when it comes to working on something completely new and it can be rather challenging to work on it. After reviewing all the resources we found we opted to work on the project in C language. Although we have already worked on C language before it was quite interesting to discover new ways to use it every time. Also the main reason of its use is to maintain the game low-level as well as to be able to use the SDL2 library which is designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware. With it we were able to work on raycasting and establishing the desired event handlers for the controllers (or keys in this case). The architecture of the project was pretty straightforward althouh it did have its changes. The minimum viable product we made out of using these tools does present its own features such as the ability to control the player with either arrow or WASD keys (which is good for both left and right handed people), the capacity to create/edit game maps to make different challenges, and making mazes challenging by not telling or showing you were is the end of the maze.
Not all ran smoothly with the project. We did encounter a series of challenges that were both technical and non-technical. Some non-technical challenges were the issue with time constraints and schedule recovery since we had to recover and stay up in par with the established deadlines. I remember for the technical challenges one of the major challenges that we had was having the game running. Since we were working the game on a virtual machine the game did not want to run because the virtual machine did not have a desktop environment enabled. After further research we were able to implement the desktop environment, nonetheless it was not fruitful. As a decision we concluded to continue the work locally instead of via a virtual machine so that we were able to run and test the game and make sure it was functional.
The main take-away from the project was that we learned many things about SDL2 and furthermore about C language other than what we already knew. Not only that but it was rather interesting to learn more not about the coding part but also about the thinking and analisis part that took place with understanding and implementing raycasting in the game. In the event that there was more time to work on the project or to do it different it would be quite interesting to work on it on a different language such as JavaScript so that the game can be deployed and playable online without much effort. Although, this shows how much we have progressed that we can make games far more easier all thanks to older games that were released for our enjoyment. In the end this project was very fun and it was a good experience for both of us.
领英推荐
Adding some details about ourselves my name is Xavier Figueroa and my partner Luis Melendez, soon to be graduates of Holberton School with both a bachellor's degree in Computer Science. Below you can have more details about the game we made.
Link to the GitHub project: https://github.com/xefigueroa/MazeGame
Link to the landing page: https://237762.wixsite.com/mazegame
Link to our LinkedIn Accounts: ?