A few years ago, I decided to make a cool video game from scratch. I tinkered around with a C++ library called SDL and tried to make a Zelda-esque platformer. So why did I call it a BroQuest? Upon finding out about my project, my brother Mike offered his artistic skills to the project by designing the main character’s sprites.
|SOFTWARE USED||SDL, a C++ library for controlling graphics/audio, and Visual Studio 2012.|
The game needed a few parts to function properly. Including, but not limited to:
- The game engine. This is the cornerstone of the game. It continuously keeps track of in-game entities, interprets player inputs, and controls in-game events and NPC actions, and then renders the game for the player to see.
- A co-ordinate system to describe in-game space. This was a 2-dimensional game, so we just need 2 axes. Each entity exists in that space, and the engine will move entities and control interactions between them and the world.
- Graphics. Each object needs graphics to be shown on the screen. If an object has different states, or can be seen from multiple angles, we needed more graphics for it. And also if we have different types of terrain.
- Camera system. We want a game world that’s larger than the screen. So we need a way to show only relevant events (around the character).
I first got to work with displaying a character, and getting it to move. Once that was finished, I added an “interact” function to my character. I created chests that can be “opened” when the player interacts with it. That interaction didn’t really do much; it just changed the graphic. But now I had a character I could move and I can make it do things. Neat!
Then there’s the map and the ground that our players are walking in. The game has a grid system that represents the game world, and each “block” type in this grid represent different materials. Dirt and pavement blocks allow the player to walk on it. However, wall blocks and chests act as obstacles to players/NPCs. Certain blocks allow the player to move from level to level (Though I only ended up with two levels).
Neat, but not really exciting. So I made some graphics for a weapon, and gave my character the ability to “attack” things. But what use is attacking if you have nothing to attack? So I created non-player characters that I could hit. Basically, when my character’s sword co-ordinates line up with an NPC’s body, that NPC gets hit. I introduced a primitive “blur” animation to show a “damaged” state. Fun!
Fun, but it gets old after a while. So I gave them the ability to strike back. I programmed them to hunt my character down. They would continuously walk in my character’s direction and attack me when I’m in range. A little bit more exciting, but we could make this a LOT more fun.
So I introduced death to this world.
Each entity now had a set number of Hit Points. When an entity’s hit point count reaches zero, it perishes. I added animations showing the characters’ death throes. The dying character lies on its side upon its death. Then it does a “blur” animation for a few times, and then disappears.
My character and the NPCs can now die. What a terrible world. But it’s the kind of world that makes for good games.
It’s at this point that Mike jumped in the project, and made the main character look super cool. You see the spritesheet on this page? Thanks to Mike, Our dashing hero is wearing an adventurous outfit, and armed with a badass club. Thanks to me, the ugly villains are very pixellated and look rather featureless. Our hero looked a lot like these guys in the original version.
Unfortunately, we stopped working on this when the summer ended and we just got busy with life. I went back to school, and my brother got a bit more busy at work.
I don’t think it was a complete waste, though. Here’s what I got working:
- Game engine!
- Co-ordinate/map grid system.
- Basic animation through sprites.
- Controls to let the player move and interact with world by opening things and slaying NPCs.
- Primitive AI. Yeah, all these guys do is move towards my character in a straight line and attack if I’m close enough. But they’re doing these things without player commands!
From this attempt at making a game, I gained some solid appreciation for the hard work that game devs do. There are a lot of things that can go awry when in-game objects behave in unexpected ways. And it feels very easy to end up with something completely unplayable.
It’s also insanely fun to create a miniature universe where you can define rules and essentially be a living deity.