Making a Video Game From Scratch
This year, I fulfilled a childhood dream by making a video game from scratch, using only free software.
Like many who grew up in the internet age, some of my happiest childhood memories involve playing simple video games.
I spent hours with my brothers and friends, playing flash games on Neopets, Coolmathgames, Miniclip, and AddictingGames.
While playing the games was fun, I really wanted to make my own. I remember downloading Game Maker around 2006 and trying to make a game with hand-drawn Microsoft Paint assets. I dreamed of someday making a professional-looking game.
I spent the last several months doing HuggingFace's Deep Reinforcement Learning Course. As part of the course, we used the game engine Unity to simulate environments where our agents could play.
Training little cubes to play soccer was fun, and I was reminded of my childhood dream of making my own game. Unity offers a bunch of free courses on game creation, teaching how to use the engine's physics and input systems, renderers, and scripting. I spent two weeks cramming all three the Unity pathways courses, and I felt like I had a handle on the basics.
Indie game developers often participate in Game Jams, where they have a short period of time (usually from a couple of days to a couple of weeks) to create a whole video game from start to finish. The time constraint forces developers to work quickly and prevents too much bloat and feature creep. I happened to finish my Unity courses right at the start of My First Game Jam 2023, an annual event that encourages new devs to create their first game. With two weeks to work on my game, I was confident I could make something cool.
Right off the bat, I knew I wanted to play to Unity's strengths, which are as a 3-d game engine. I blocked out a simple prototype of a top-down shooter game using basic geometric shapes for the player, obstacles, and bullets.
I coded up a basic controller so the player would look where the mouse was pointing and could move using the arrow keys. Then, I made sure the camera would properly follow the player. I made it so the player's little gun would shoot when the mouse button was clicked, and I had a little working prototype.
At this point, I needed to decide what would be happening in the game. Would the player be a guy running around and shooting monsters? A gardener shooting seeds? Inspired by the cool post-processing effects I learned in the Unity Creative Core pathway, I decided to go with a glowing neon space asthetic. To get myself in the space mindset, I replaced the ground with a picture of stars.
Up until now, a lot of what I had done involved coding, which is something I'm very comfortable with. Now came a much trickier part, creating the 3-D models for the game characters and environments. I wanted to create as much of the game as possible 'by myself', so I downloaded Blender, some open-source modeling software and started watching tutorials on Youtube.
Man, was that hard. Blender has an extreme learning curve and is not at all intuitive. I ended up watching several tutorials before finding one that suited me that was specifically focused on low-poly modeling. Low-poly is a style kind of like 3-D pixel art. It has the added benefit of being pretty easy to learn, which is exactly what I was looking for. I set a goal to model one new item each day for a week, and I ended up with a nifty little collection of spaceships, asteroids, rockets, and UFOs. I also put all of those post-processing effects I mentioned into effect, making my ships metallic, adding little puffs of smoke when the lasers fire, and adding bloom effects to light sources.
I had completely forgotten about this aspect, but the game needed menus. I had to create a main menu, a pause menu, a health overlay, and code up functionalty for all of those menus. I also added a score counter and made the game 'rembember' a high score between plays. I ended up spending way too much time (two days of my two weeks) making it so the user can change the music volume and sound effects volume seperately. After all that, I had working menus and the game was starting to come together, but it was missing sound.
It was time to write some music for the game. I was shooting for a space-exploration sounding song, and luckily MuseScore 4, a great piece of free music notation software, had just come out. MuseScore 4 has high-quality synth plugins that allow you to make music that almost sounds like it was recorded in real life.
That song sounded great, but it didn't at all match the gameplay. I decided that in my brightly-colored arcade-style game, chiptune music would be the best. I found Bosca Ceoil which is commonly used by indie game devs to make game music. I used space-sounding chords and repeating motifs to try and really make a song that made you feel like you were in an arcade.
At this point, I was fast approaching the game jam deadline and I knew there was no way I'd be able to make my own sound effects, so I found a free asset pack that had a number of good laser sounds. With all the pieces ready, it was time to assemble my game.
Putting it All Together
I made a quick tutorial level to teach the player how to point and shoot, and created a parallaxing background to help sell the player's movement. Next, I made a simple arena and coded up a few waves of spawning enemies for a story mode. I also wrote an algorithm to spawn increasing quantities of enimies in an endless arcade mode. I created some environmental hazards (asteroids) that shoot across the screen at the player to make the arena feel less static. You're supposed to leave ample time for playtesting when you do a game jam, and I did not follow that advice. I did just enough playtesting to realize my game was boring and needed to be spiced up.
What makes a game like this more fun? Variety in powerups and mechanics. From my one-model-a-day Blender challenge I already had a couple of powerups ready, a shield that gives the player a temporary force field, and a battery that recharges the player's health.
Something was still missing, so I added a mechanic I had seen in a tutorial. Unity's physics engine lets you slow down time, so I implemented that feature, creating a time-slow mechanic and adding a little bar by the health bar that keeps track of your time charge. I also pitched down the music as an audio signal while time is slow, as well as adding a cool 'warp speed' effect.
At this point, the game jam was almost over and I still hadn't named my game. I ended up asking ChatGPT what to call it, and one of the 20 or so suggestions it came up with was Chrono Chaos. I liked that name so it stuck. I submitted my game to the jam less than 15 minutes before the deadline.
Creating a game was way more work than I ever could have imagined. I gained an appreciation for all of the brainstorming, prototyping, modeling, composing, and debugging that goes into creating a video game, even a simple one like this.
If you're a Windows user, you can download the game for free here.