My experience developing a 3D videogame: Polygon Race

Santiago Peña Mosquera
5 min readNov 4, 2020

--

Polygon Race is a 3D racing video game developed in the Unity video game engine. This game is oriented to be a casual game, for those people who enjoy their leisure time with video games but do not have the time or desire to play at a competitive or professional level and prefer to do it in a more relaxed way and as a distraction. When developing this project we wanted to focus on create a video game that was really easy to play, and has a retro-futuristic style that would make it unique and deferent from the rest. In this game the player is immersed in a busy highway that leads to the utopian city of Polygon City, whose objective is to move at high speed avoiding traffic, generating the highest possible score and thus becoming the best Polygon Racer.

The Team

Everyone on our team had once enjoyed video games as gamers, but we had never set out to explore the world of video games as developers. Personally, at first, developing video games did not attract much attention, but one of my colleagues told me about the idea and although I accepted it, I was very execptic, but even so I decided to give it a try, I wanted to see if it was definitely something that I could rule out doing in the future. But when we started with the development process I realized how much I liked it, I can even say that I find it much more fun to develop a video game than to play it, once I started learning Unity I couldn’t stop, I spent hours and hours reading documentation, watching tutorials and creating my own prototypes of video games, and now I can say that it is something that I would really like to continue doing for a long time.

Technologies And Architecture

For the development of this video game we use the following technologies:

Blender: For the to modeling, rendering, animation and creation of three-dimensional graphics we used Blender because it is a free and open-source toolset.

Unity: As a video game engine, we chose Unity for its versatility and the ease it provides when working in a visual and scalable way

C#: Is the lenguage used by Unity engine

HTML and CSS: Frontend web development

To carry out the application, the unity video game engine integrates the models made in Blender, and the scripts made in the C# programming language, creating an executable that runs the game on a computer. Since only the score and the player’s name are save, this data is store locally in a file in JSON format.

Añadir texto alternativo

Features

Simple Playability: To play, only 3 keys are needed, the right arrow to move to the right, the left arrow to move to the left, and the p key to pause the game

Retrofuturistic Aestethics: In order to have a fresher and more exciting look, graphics with retro-futuristic aesthetics were used to make it look timeless and not look obsolete or out of fashion in the short term

Custmo Settings: You can customize the settings to your liking, either by changing the volume of the background music, activating or deactivating the sound effects or modifying your nickname. All these data are saved so that when you exit the application and enter again, you do not have to configure them again

The Challenge

As previously mentioned, during the planning of the project, it was proposed that all the information to be saved would be made locally in a file in JSON format. This decision was made because we had previously been working on projects using the Python language in which it is very easy to save information in a dictionary and convert it into a JSON string to finally save it in a file. But in the C # language an object of type dictionary cannot be serialized, or at least not with the standard libraries and I had already done all the logic with this format. Additionally, because Unity works by scenes to divide the juice into several parts, with the change from one scene to another the objects that make up the first are destroyed, and we needed that everything we had to save to pass from one scene to another without no problem. After searching for hours and hours in Google how to serialize a dictionary in JSON format in C #, I finally came to a blog where they explained that this was not possible, and that it was recommended to make your own format, but we wanted to comply with what we had initially agreed to use the JSON format. It was because of this that I decided to make my own functions to serialize and deserialize JSON format by hand for C#. Finally, after a couple of hours and many tests, it performs two functions that worked perfectly, allowing us to store the user’s configuration, and their scores, so that when the application is closed all this data is saved and does not have to be configured again.

What I’ve learned

This project taught me that with good programming bases you can learn any language, since in just three weeks I learned the bases of a video game engine, a new language and I managed to develop a 3D video game together with my team. On the other hand, I also learned that although most programming languages share the same bases, it is important to know their differences and not assume that everything that can be done with one can easily be replicated in another. The development of this project helped me realize how much I like developing videogames, and that it is something that I would like to continue doing in the future.

About Myself

I am an innovative mechatronic engineer making his way as software developer, lover of building new things from scratch, that’s why my passion for programming, starting from an empty sheet and turn it into a solution for real problems.

Link To Polygon Race’s Github Repository

Link To Polygon Race’s landing page

Link To My LinkedIn profile

--

--