Making a game from scratch. What does it take? Courage perhaps?

I’m sure most of you reading this have grown up playing video games. You’ve wasted hours and hours in that hobby that you like so much. You’ve played countless games and dissected them. You’ve built a catalog of the things you think makes a game great or not. In the end, without realizing, you’ve built a library of games that you consider the best of the best. Games from the role-playing genre, games from the shooting genre, etc. When you reach that point, what else is there to do? Obviously, you get crazy ideas and start thinking about what could come next! Something entirely new perhaps?

This is the inspiration that got me to where I am now: I have been making a personal game in the past few years! With the new year, I decided to finally talk about a project I’ve been working on in my pasttime for the last couple of years. My resolution this year is to share with you all the process I’m using in order to create my very own video game. All of this is still a work in progress, but hopefully you will find it interesting and enriching! I am in no way an expert in the field, as projects are never done in the same way, but what I’ll share in these blog posts is the way I’ve decided to approach my newest game project.

The Early Years

Before I start, I’ll talk a little about myself and why I decided to even think about doing all of this in the first place. At a very young age, I remember that my parents had a Nintendo Entertainment System video game console. Me and my brother used to play a lot! We had this 100-in-1 game cartridge which contained a lot of different genres of games. As we all know, that wasn’t very legal, but at least I got to try plenty of games varying from shoot ’em ups to platformers to even role-playing games! Starting from that experience, me and my brother created our own worlds and adventures! Some of them were based on the games we’ve played, but I also remember that we were inspired by things surrounding us in the real world as well. We’d write everything down on pieces of papers. At one point, we even invented our own game console that would play our own games! Obviously, it was all just playing pretend and I’m sure most kids did that during their young age as well!

The whole process of creating our own worlds and adventures based on things we’ve played stuck with us even in school. For example, I would draw my own comics about my characters’ stories and invited school friends to read them. At one point, we even invited our friends to play in our “virtual world” we’ve created, and they role-played as their own characters with their own backstories as well. It was kind of our Dungeon & Dragons era, but without actually playing the real thing because we had no idea it was even a thing! One thing was sure though, I loved the cooperative aspect of this whole thing. We could also become the superheroes of our stories and I think that’s why it was so satisfying at the time.

I was born at the time where personal computers were entering in households. With our first PC, a Compaq Presario, I got access to the Internet and that’s when I went visiting my very first gaming websites! I remember reading IGN and even GameSpot at a very young age. That’s where we learned about what was coming next like Star Fox 64 and the new Nintendo 64. The other interesting part that I remember was downloading a ton of emulators and ROMs for many different consoles. Obviously, this wasn’t very legal either, but don’t go telling the police on me! What this allowed me to do though was try as many games as possible. It was a very convenient and efficient way to play games. I didn’t even have to finish them, and without realizing I was mostly educating myself on all the types of games that were made available at the time for the NES, the SNES, the Genesis, the Gameboy, the Sega Master System, etc. I dissected the games one by one. What games were made by which companies? What was done right for this or that game? What would you I do to improve the experience myself? I’d built a catalog of the things I thought made a game great or not. In the end, I’d built a library of games that I considered the best of the best. This continued throughout the years as well.

Caption 1: Young me and brother on the computer looking at Star Fox 64! The passion was strong very early in my life.

 

With PCs, I made my very first video games using existing game editors that were available at the time. The first one is an editor that probably everyone knows about: RPG Maker. It’s nothing to brag about, but when you take a step back I realized that I actually learned a lot of things using that editor. I made my own 2D sprite work and used third-party tools in order to integrate them in the editor. I created my own tilesets and characters, with their animations and everything. There was also scripting involved, I wrote my own stories, designed the flow of the levels, built the maps and levels, etc. It was the first time I could actually make my ideas come reality in the same environment that I was used to during my young age! I got to show my game in front of the class in elementary school and I was very proud of myself. After that, I started using more sophisticated game editors like The Games Factory and Game Maker, but nothing extraordinary came out of those. It was mostly tech demos of ideas here and there. Still, I learned more about the principles of using variables, triggers/flags, collision boxes, etc.

At one point, I also got interested in making websites. I self taught myself how to code, design and publish a website completely from scratch. I created 2 websites based on The Legend of Zelda, because it was my favorite game franchise at the time. It was a very enriching experience for me, as I got to learn how to code as well as talk to a community of people that shared my same passion online on the Internet. Young me (around 13 years old if I recall correctly) was completely amazed by the fact that I could talk about my favorite game to other people all around the world. I also received good comments about my website designs as they were quite out of the ordinary at the time for the Zelda community. That’s also where I got interested in user interfaces and especially user experience. If you make a website that has nice content, but everything is shown poorly, what’s the point, right? I was also involved in some Zelda fan game projects and got to do a little bit of 2D sprite work thanks to my past experiences! All in all, it was a great time and I have good memories of the whole thing.

So, life passed, and I still didn’t know what I wanted to do in the future. I got a natural sciences degree because I was told that I was very good at school, like I’m sure most people got told. Based on the two experiences I’ve mentioned before, one thing was sure and it’s that I loved making people react to the things I was making, whether it was a good or bad reaction. I knew that this was something I wanted to do. My true passion really was and always will be video games and they’ve always been good to me. I’ve learned a lot from them. I thought it would be great to give back and be part of the industry in some way. I did make it, but I’d say I took a really complicated path. Nowadays, there are many formations that you can take in college and even universities that will lead you straight to a position in the video game industry. In my region where I studied, there weren’t many video game competitions (for example Game Jams) or other kinds of event that I could go to in order to get some visibility or to show my interest in the industry. So after college, I went straight to university to get a bachelor’s degree in computer sciences. Why didn’t I just try to become a game designer instead? I’d say it’s a mix of selfishness and being unaware of the tools available to me at the time. Most importantly though, I’d say the main reason was that I wanted to actually be able to make my ideas become reality with my own hands without needing the help of anyone else (or at least the bare minimum), and the basic of creating video games (note the word “video”) is programming whether we want it or not. I still can’t believe to this day that a group of people somewhere thought about ways to make dots move on a screen, which in the end created what we have today. I’m really amazed by how far we’ve come!

What’s a Game Editor?

A game editor is basically the visual way of interacting with a game engine without needing prior coding knowledge. It is a tool used to facilitate the work of many trades in the video game industry. It allows you to create objects or make concepts a reality by manipulating properties, actions, etc. of many items.

Caption 2. How the Unreal Engine looks like. Notice the toolbars, a viewer and docked editors.

 

For my game, I decided to create a custom-made editor in C#. Now I’m sure everyone reading this must be freaking out because what’s the point of reinventing the wheel when many editors already exist out there that will do the same job! There are multiple reasons behind all of this:

  • I want to differentiate myself from all the independent game developers out there. It will allow me to have some artistic freedom and a certain style as well;
  • not having to pay dividends for each copy of the game sold because I’m not using a proprietary engine will make sure that I get the maximum amount of profit so I can keep making games;
  • I’m not building everything entirely from scratch: the engine framework under the editor is MonoGame, which removes all the “black box” part of game engines  (example porting games to other platforms) and keeps it as simple as possible for me;
  • the industry is constantly changing, this is why I decided to use a flexible, maintainable and modular coding framework called “Prism” for the editor, which uses WPF, MVVM and Event Aggregation. These are all concepts I am used to so it allows me to obtain quick results.

About Prism, it looks like this:

Caption 3. PRISM and its concepts

 

Without going into too much details, the keywords to note are the following:

  • Shell:
    • Represents the visual interface of the application and can handle the instances of different modules integrated in the application.
  • Module:
    • A unit with its own logic that can be integrated in a Prism application;
    • Must implement the interface “IModule;”
    • These will mostly be the tools that can be used within the editor.
  • Views:
    • Represents the visual interface of an IModule, useful when doing MVVM (Model View ViewModel) development.
  • Container:
    • Allows you to register an implementation of an IModule (creates an instance of the object);
    • Allows you to research objects in any module;
    • Exemple of registration to the container:
      • Container.RegisterType<IStatusBarService, StatusBar>();
        • IStatusBarService is our interface;
        • StatusBar is the actual implementation of the interface we’re registering.
    • Exemple of research of an object within the container:
      • var statusBarService = _container.Resolve<IStatusBarService>();
        • statusBarService is the same object that we registered a little bit earlier.
  • Example of module initialization within the Prism application:
    • IModule ourModuleHere = container.Resolve<OurModuleHere>();
      • ourModuleHere.Initialize().

In general, the main constraints of the editor were that it should allow the users to communicate with the engine, as in the user will be able to manipulate objects that come from the engine for the purpose of creating levels, dialogs, etc. Also, the editor must follow UX principles in order for the users to quickly understand how to use the different options within the application. The modules must allow the users to be able to modify objects that come from the engine and save them. Obviously, reloading the object must contain the modifications that were applied to it in a previous session. Also, being able to edit objects in real-time (as in when the engine is running) is a necessity as it will speed up the work of users tremendously. Finally, the editor must integrate a “dirty file” system to quickly identify which objects have been modified and it will also be useful for file versioning.

So, after much conceptualization and design, this is a top-down representation of the editor at its current stage in time:

Caption 4. A summary of all the projects that constitute the editor

 

The core projects represent reusable stuff that could be used in the creation of future tools I will make. Core contains typical things that are useful in any application like services, utilities, etc. Controls contains the models and example views of reusable controls like Menus, Buttons, etc.

The editor projects represent the shell as well as its modules. This is the editor itself, per say.

The engine projects represent the implementation of the MonoGame framework, which the editor interacts with. To integrate the editor-engine, I simply add a reference in the “Revolver” project to the “GameEditorMode” *.DLLs of the “357” project, which can be reloaded on the fly if needed (though this manipulation will be discussed in a later blog post).

Caption 5. The current look of the shell when no tools are loaded

 

Stay tuned for more updates on the project!

-Nicolas