Writing a Real Time Strategy Game

April 1, 2008

writing a Real Time Strategy Game

How To go about writing a Real Time Strategy Game (RTS).

If we are talking about strategy games, Age Of Empires, Age Of Mythology and Games line Rise Of Nations are our main choices.
The role of the gamer is like the omnipotent and omnipresent individual looking over on top of things.
The reason why I say this is because in games like this you need to make your own army, your kingdom and protect it from your enemies.
One needs to build a cavalry, train scouts men, create villagers, priests and build a university for scientific research.
All these take time and in that time you, the king, who should have enough power to defend the kingdom or you could be blown out into smithereens thus ending yourself.
One could advance to different ages or civilization modes depending on the wealth you have the amount of research you scholars have done in your universities, the amount of fire power you have etc.
It varies from game to game. But the thing common to all these is that your strengths are your weaknesses so the more you own, the more liable you become.
Building a game like this is not a an easy task and one needs to have two important things before one gets off the ground.

Firstly, a detailed study of the races and the warrior tribes and building the 3d objects which look like the way they looked, creating buildings and monuments they built and lastly, shaping up maps and terrains which are like the ones they lived in.
It is done by using a 3d engine in your game application code, which delegates the 3d drawing and rendering of the objects to another set of relatively lower level graphics drivers.
Yes the latter are the familiar Direct X, OpenGL or X11 versions we have to load into our machine so that the game can run.
Sounds weird? Its not that kind of rocket science.
Basically when you buy a game what you buy is a set up disks, which have the installation, set up of the game for a particular operating system or a set of operating systems, which you install to some directory in your hard drive or you play from the disc itself.
The thing, which actually runs is the executable file of the game.
The game programmers namely the people at Ensemble Studio write a huge program or code in some language say c++, using their 3d engine API suit.
This suit is basically a collection of classes and methods (terms common for any object oriented programming language) which are a kind of helpers to do a certain work like loading a map, moving a object from one point to other at the stroke of a key or click of a mouse, checking for collision avoidance, moving animated objects, creating animated objects etc.
But the library does not know any magic to make it happen. It actually breaks up each of those operations into several steps, which the underlying 3d engine like Direct X or OpenGL can understand and delegates them.
Yes, this might sound a bit complicated to you, but what I am trying to do is actually pretty complicated, though it is a process, programmers love to go through.
This is just an overview on how one can go about writing a game, but if one needs to know the entire process, it will definitely take him or her sometime.
So, if I have been able to give you a vision to take a step forward towards a career of programming and writing games, I will consider myself lucky.