No, this post has been inspired by a couple of tweets from Rami Ismail (of Vlambeer fame) whereby people asked him what sort of games they should make first.
The conversation went like this:
"I haven't made my first game yet, and the problem is whenever I have an idea for it over time it becomes to[sic] Big for how I feel a first game should be. Should I do it anyway?"
"Make, in the following order, Space Invaders, Pong, Pac Man. If that works out and you're happy with the results, come back and ask again. If you're not happy with the results, improve them until you think they're 'close enough'. If you get stuck, don't fret asking for help.
Best of luck :)"
Some sage advice there as I'm sure you'll agree.
It's a very common thing. Most people want to get in to games to make their magnum opus. It's an idea they've had for years. Their dream game. The thing they most want to play. The thing that will be their legacy, their Elite, their Minecraft.
Here's the kicker though.
Rami's right - You absolutely should not start building that right out of the gate. Your ambition will be your downfall and you will get frustrated with the entire process, not being able to do your vision justice. You will either end up with a messy project or you'll give up on the whole thing, your dream in tatters.
Like he says, it's far better to cut your teeth on something simpler to start with. Use that to find out what works and what doesn't and get yourself a bit of experience to boot.
With that in mind, I present to you a selection of simple games that you could make and hopefully go in to a bit of detail about what sort of things you're going to have to think about when you try each one.
For most people, Pong seems like the simplest game on the planet. For the most part, it is. There are two bats, one on either side of the screen, and they each move along a single axis. Then there is a ball that bounces around the screen. If the ball ever hits the side of the screen, a point is scored and the process starts again. The player's job is to move their respective bat so that it deflects the ball before it can hit their side of the screen and send it back to their opponent, who will hopefully miss.
Why this is simple
- There are only ever three objects in play at any one time - two bats, one ball*.
- The players can only move in two directions.
What makes it complicated
- You need two players, unless you're going to write an AI... which makes it more complicated. You could, of course, make Breakout instead - which is basically Pong against a wall.
- Collision detection is one thing, but collision resolution (that doesn't just result in one or more of the things blowing up) is quite another. Again, you're not looking for Havok levels of physics here, but it's certainly a step up from the other games on the list. For extra credit (and to make the game a bit more exciting), you'll be looking to emulate the original which deflected the ball according to where on the bat it actually hit. Hitting the centre of the bat sent the ball straight back horizontally, whereas hitting closer to one of the ends would bounce it off at a more aggressive angle, making it harder for your opponent to read where it was going to end up.
Like Pong, everyone's heard of Space Invaders. Simply saying the name conjures up images of a big, block of aliens, steadily marching along towards victory as a lonely tank does its best to thwart their advance.
The aliens start at the top of the screen and move left or right until they hit the edge. Then they drop down a row and repeat the process in the opposite direction. The player, in the meantime, moves left or right along the bottom of the screen to try and line up a shot. Both parties pepper the other with bullets.
Why this is simple
- All the player has to do is move left and right and shoot down aliens.
- Original versions only let the player fire a single bullet at any one time.
- Easy collision resolution - just blow things up.
What makes it complicated
- AI. Simple AI, but AI nonetheless. The aliens need to follow their master plan - move to the edge of the screen, drop down a row and carry on. Thing is, the alien's position relative to the edge of the screen is somewhat dependant on the other aliens around them.
- Also worthy of note is the fact that the original's speed up mechanic was purely a by product of a technical limitation. Only one alien was updated each frame - you can see this as a characteristic 'shimmer' in the formation during the early part of the game. As the number of aliens was reduced, the remaining aliens got updated more frequently meaning that they moved faster and faster. It actually ended up being a pretty neat difficulty scalar - the more aliens you kill, the harder it becomes to kill the remaining aliens.
- Shields. The original had a series of 'houses' near the bottom of the screen. These could be used as shields by the player as they would absorb any shots that hit them. What makes them a bit complex is the fact that each shot would take a chunk out of the house in question**. Then you've also got to resolve the situation where the lowest aliens are now low enough to intersect the tops of the houses. The simplest option there is to remove the houses at that point.
The face of a thousand pie charts, Pac Man sees the player running the eponymous hero through a maze, chomping dots and avoiding ghosts. Chomp all the dots and it's on to the next maze. You can even turn the tables on the ghosts by eating one of four power up pills which allows you to also eat ghosts for a limited period of time.
Why this is simple... actually, it's pretty complicated when you start thinking about it.
What makes it complicated
- Collision. Unlike the previous games, the player can now move in four directions... provided the maze isn't in the way. Whereas all you did before was ensure that the player couldn't move outside either the vertical (Pong) or horizontal (Space Invaders) bounds of the screen, now you have to restrict their movement based on their position in an arbitrary maze.
- AI. At the simplest level, you need to make the ghosts move through the maze. At the start, this can be done randomly which only requires that each ghost knows which way it can move whenever they get to a junction***. But this will create almost no challenge at all and you probably want to look at making the ghosts chase the player down. Of course, you don't have to go so far as to worry about super accurate path finding and you could just have the ghosts select a corridor based on their relative position to the player, but that's still a step above 'move left and right and drop down whenever you hit the side of the screen'.
- Then you have to worry about switching them into 'run away' mode whenever the player has gobbled a power pill. It's still pretty simple - reversing the direction choice thing alone should do the trick - but it's another thing that you're going to have to take into account when writing the thing.
- Level Design. You need some method of building the maze. There are many different ways of doing this - at the simplest level you could manually enter it in code, or you could try reading in a texture from an art package.
My choice would be Asteroids. The player controls a ship that rotates and thrusts around the screen. It fires at large asteroids that break into medium then small asteroids when hit. Small asteroids are destroyed and, when all asteroids are gone, a new batch of large ones is spawned.
Why this is simple
- No AI at all - just very rudimentary physics. Unless you're also going to model the UFOs from the original which would move erratically across the screen, shooting at the player.
- Easy collision resolution - not quite as easy as Space Invaders as you potentially have to be creating new asteroids when you blow an old one up, but still pretty easy.
What makes it complicated
- Physics. Along with 'maths', the word 'physics' is often the thing that puts most people off an idea. Add to this the words 'Angles' and 'Velocity' and you really start confusing people. If you're rolling your own engine, this is a very daunting process. I can remember writing a version on the Spectrum back in the day that only had 8 directions of rotation just to make my life easier. But the version of physics you need for this is about as simple as it comes. The only complexity is working out how the velocity changes based on your direction of travel and how much thrust you're applying.
- Wrapping. In the original, any object that moved off the edge of the screen would wrap around to the opposite side. It makes life slightly more complicated, but only a little.
Whilst Rami puts forward the argument for Space Invaders, I lean towards Asteroids. Personally, I think it's a simpler task - as long as you can get your head around the rotation thing which is already done for you if you end up using a third party engine like Unity.
But perhaps there's another way? A game you can make that takes all of the simplest concepts from the games I've listed and bins off the complex ones.
Pongy Asteraiders, Man.
The player controls a ship at the bottom of the screen that can move left or right and fire up the screen, like Space Invaders. Asteroids spawn at the top and travel down the screen for the player to shoot.
For added complexity, have the asteroids drop at different speeds and move at different angles, like Pong. Once you've got them blowing up when they get hit, consider introducing the 'split into smaller asteroids' feature, like, well... Asteroids.
Then how about having some kind of power pill that drops down the screen for the player to collect? Have it increase the number of bullets the player can fire or make him immune to asteroid collisions for a time.
With all of that said, any of these games make a fine starting point, so long as you're aware of the extra little things you're going to run into along the way. I'm pretty sure that you guys can also think of many other examples that fit the bill for a first game - feel free to justify your selection in the comments section below.
But once you've got your game up and running, there's no reason for you to stop there. Take the original concept and rules then embelish them on your own. How about multiball in Pong? Aliens that divebomb you in Space Invaders? Asteroids that bounce off each other? Power ups? Upgrades? Multiplayer?
Remember - most experts will tell you that the idea itself isn't the important bit - rather the execution of it. Look at Pac Man CE - it's just Pac Man but taken to extremes. Or the Galaga series of games that took Space Invaders and layered on all manner of funky stuff. Or Infinity Gene that distilled it all back down again.
Old-Bullfrog Anecdote Warning
In the early nineties, we ran a competition with a magazine to Win A Job At Bullfrog. The idea was that people would write a version of Space Invaders. It's important to note that we weren't just looking for vanilla Space Invaders - instead, people were encouraged to add their own twist to it. The response we got was pretty cool. There was a large variety amongst the entries. Some had the invaders spiralling in whilst the player rotated in the centre of the screen. Others had the aliens moving along like chess pieces. The winner, though, was Disky's Mr Wobbly Leg, which saw you first building your tank out of bits you had to retrieve from the other side of the screen as the aliens bombed you. The more bits you managed to recover, the more powerful your tank was when you finally got to face the invaders. It was the one that felt most like a complete game out of all the entries, so he was awarded the job****. Funnily enough, the guy behind the Chess Invaders game was one Demis Hassabis, who also ended up with a job there and would ultimately go on to be worth an awful lot of money.
Another time, one of our crazier employees***** came up with the idea of writing a Pong kernel and having an AI writing competition. The basic Pong engine would take two pieces of code and run them as the AI for each of the bats. All they would be told was the positions of the bats and any of the balls currently in play. It was then up to each AI to work out its strategy and return either -1, 1 or 0 for whether it wanted to move down, up or stay put.
* Probably not the sort of thing you should go looking for a video about. Just saying.
** The very first example of deformable terrain in a video game?
*** Bonus points for not letting them double back on themselves and super bonus points for having them look in the direction they're going to turn before they get to the junction.
**** Also because we thought he had a very funny surname - "Diskett".
***** Mark Adami, if anyone is keeping score.