personal web page
Real-time strategy (RTS)
This was the best video game project I've made, I always wanted to create my own RTS game. Here I really tried my best to make a good GUI and get rid of bugs, so I was working on this project for two years. After implementing the multi-player mode, however, I put the project aside for I had to do my coursework.
I made the game in 3 iteration, 2 months each. First I made a 2 players game, a basic AI, obstacles on the battlefield and abandoned the project for a while.
Then being encouraged on game developers forums I increased the game performance, fixed bugs, made up to 8 players in the game, save/load game option. I was experimenting with the gameplay: construction of the bases, harvesting resources, but eventually I came to the original basic gameplay.
And lastly I made a descent GUI (buttons, forms, etc.), imploved graphics, added sounds, even tried to compose a background soundtrack, increased performance. Added the fog of war and implemented the multi-player mode by local network, which, however, I had not tested well.
When creating this game the most challenging problems were: synchronization in multi-player mode, path search, units interaction (game allows up to 20000 units on the battlefield).
A player controls units on a 2d battlefield trying to destroy all enemy units. There are polygonal obstacles on the battlefield.
There are also "bases" that can be captured by any player. The captured base can produce units.
Victory: destroy all enemy units and capture all bases
Defeat: when all units and bases are lost
When a unit steps on a base then the player captures it; in the beginning every player has one base.
There are 6 types of units in the game:
A missile damage is 24. The units of type 2 frequently (with 87.5% possibility) deflect the missiles, making this type of units efficient against firing units. The units of type 6 can go backwards from the enemy firing at the same time.
The bases produce and repair the units. In order to repair units select them and click on the shield icon in the bottom left corner. This way these units will go to the nearest base to protect it and be repaired. In order to produce units click on the "Build Units" button in the top right corner. In this case all the captured bases on the battlefield will produce units, including the enemy bases. Note that the enemy bases will produce 2 times more units so it is better to wait when the enemy starts the building of units. Or you should capture 2 times more bases on the map than your enemy did. There are 5 types of bases that differ by the unit types they can produce:
In fact the mouse only will do to play this game. Left mouse button to select units of bases, click on menu buttons etc. Right mouse button to send units at a specific battlefield position, setup the destination of just created units for bases.
Scroll mouse wheel to change scale (there is no mini-map). By holding Ctrl you can add route points for units, so they could visit multiple places.
The icons in the bottom right corner set the selected units behavior:
Shield - unit goes to the nearest player base.
Sabre - unit attacks enemies if sees them.
Anchor - unit holds his ground.
F1 - on/off game speed restriction
A group of units attacks together and its viewing range is a bit more than of a single unit. However if the group is spread it becomes vulnerable, in this case better to ungroup the units.
Only units of the same type can be grouped and the group number must be in the range from 50 to 160 units.
To play the multi-player mode run the server net.exe - this is a console program in game archive. When started enter the number of players. In ServerIP.txt file you will find th IP adress of the current PC. This file must be the same for every player and contain the IP of the server PC.
After the server prints "Listerning for connections..." you can proceed: every player starts the game (SGame.exe) and creates a new multi-player game. After that the game will try to connect to the server using the IP from ServerIP.txt.
The first player that succeeded to connect to the server shooses to game settings. After all players are connected and the game is set up the game begins.
||© 2009-2022 Nikolay Gavrilov|