Wanna make a game?!
I know it could sound a bit over… Hmm!!! Making a game….!!!!! Sounds cool, but how?
Looking to the history of computer games (or making computer games), specifically if you look at the very beginning, games were so primitive, not sophisticated and based on simple ideas. I hear you saying, of course, the graphic cards and processing powers weren’t so much developed like the current time we live in, well…
I totally agree that introducing an Accelerated Graphics Processors made a huge step towards realistic gaming, but not everything is about graphics, look at Diablo for instance, people are still playing it until now, including me ;), because of the game play experience, story line and much other factors that tells if the game is good or not. I hear you saying what about the artificial intelligence (which are very sophisticated, and nicely presented at many games such F.E.A.R, Fables the Lost Chapters, GTA etc…), well…
If you look to one of very well know game around the world “Street Fighter” or any simple fighting game, looking to the 1st easiest level, the AI model is going to look something similar to this:
Figure 1 Basic fight AI model
So looking to this simple diagram, (and remember we are talking about a very easy level here) if you leave the opponent alone, he will not touch you (or probably the program sees that you didn’t attack after some certain amount of seconds so he will try to attack!), but once you punch him, he will try his best to reply by a move that will harm you (whatever kind of move: hitting using legs, hands or super powers).
Now once you advance to higher levels, the model introduces block mode, so the opponent can block your attack, it could be slow at certain levels, and faster block in a higher level and then it will combine fast response and fast block, then it could include aggressiveness, so he will not wait until you attack, he will attack just right away!
Games reached to the level they are now, because everything was built above each other from the very beginning. A programmer solved a certain problem for instance, and then another programmer has a similar problem and adds a bit of code to tailor the solution to his problem (now the solution gets more sophisticated), and the development cycle goes on and on, until we see something like Pro Evolution Soccer (PES) 2009 by Konami.
When I was child, I usually played Nintendo World Soccer game, which was pretty primitive; we could represent it like this:
Figure 2 Football game (image courtesy of Programming Game AI by Example)
The game environment consists of the following items:
· A soccer pitch
· Two goals
· One ball
· Two teams
· Eight field players
· Two goalkeepers
And then divide this football pitch into regions. You will need these regions in order for your AI to evaluate when to pass the ball to which player, so if you occupy a region with another player from the opponent team, the player will not pass it towards where you block (or guarding the opponent team!), considering that, you can make an automated pass system, where the opponent can make passes without having you intercepting the pass. The “World Soccer” introduced some basic strategies, for example when you are attacking (let’s say from the mid field) the players are running on the two sides of the field in case you wanted to make a pass to one of the sides so he will do an over crossing pass so you can score with the head for instance!
Once you score a goal for example, everything goes to the reset state: Ball in the center of the field, players are in their initial positions like in the beginning of the game, and score + 1.
Of course now soccer games became much sophisticated (by adding layers and layers of strategies and intelligent solutions), and we get at the end a very interesting feature which PES 2008 introduced in the field of soccer gaming called “Teamvision” (and it is polished even more in PES 2009).
Here is quote of what Konami says about Teamvision intelligent system at the official web page of PES 2008:
“PES 2008 will feature a brand new intelligence system, called Teamvision, that adapts and reacts to players own game play styles to ensure that the computer controlled opponents are always challenging and forcing the player to think and chance their style of play to avoid being out-thought by the game. It will learn counter attacks that target your weaknesses and look to exploit any repetitive tactics players use.”
I’m a very big fan of playing soccer on PC, when I tried PES 2008 on the highest level of difficulty; it was really difficult for me to score 2 or 3 goals using the same strategy while it was very easy to do that in the older versions!!
As you may see, making games are not that difficult, it just took years and years of dedication, love, enthusiasm and development just to get it to that level which you are seeing now =).
I wrote this article just to convince you that making games isn’t scary or difficult, as a matter of fact, it is a lot of fun :). We’ve looked at artificial intelligence part only of game programming in the next article we gonna discuss the game anatomy and structure, so you will have a better picture of what is happening inside the game ;).
By: Mohamed El-Zayet