by Stocha » Fri May 18, 2012 2:14 pm
Here is a sample specification to illustrate the random idea i gave :
The game feature an underground ant colony war.
The games play up on a grid where each square can have only one value at the begining of a turn.
The values for the square are as follow :
Well : spawn water.
Breakable ground : can be digged through. It cannot be pushed
Empty ground : this will let pass everything.
Food ground : can be pushed and digged through.
water ground : can be cleaned up, will spawn water if connected to a well
PlayerQueen : Each player can have ants that act as queen (turn food into eggs).
PlayerDigger : Each player can have ants that act as a digger (can through wall and food).
PlayerPusher : Each player can have ants that act as pushers (can push other ants and food).
PlayerEgg : Each player can have ants that act as Egg (can turn into any type of ant or die-become-a-wall).
The game start with mostly BreakableGround, a few Well and a PlayerQueen for each player surrounded by a few empty ground squares.
Each player will know the whole map state at the begining of each turn.
For each ant he own (egg,queen,digger,pushers), the player can emmit one of 5 actions each turn (Each action represent one of the five adjacent direction North/east/south/west/doNothing).
- a PlayerQueen will transform a food ground into an egg ground in the direction of its action.
- a Playerdigger ant will gain one momentum in the direction of its action. Or if doing nothing it will clean all water (except Well) in a taxi radius of 2 around it. (cleaned water becomes empty ground)
- a Playerpusher will gain one momentum in the direction of its action, and will add its current momentum add any further momentum it gains during this turn to any ant positionned in the direction of its action. If it does nothing then it's moment will always be 0 in all direction.
- a PlayerEgg will transform into a PlayerQueen if it moves North. into a PlayerDigger if it moves east. Into a PlayerPusher if it turn south. it will transform into a player egg if it moves west. Finally it will turn into BreakableWall if it does nothing.
At the end of each turn, each ant momentum is calculated : west and east momentum cancel each other. South and north momentum cancel each other.
If an ant or food has momentum >0 in only one direction, then it will move one step in this direction. if it has momentum in more than one direction (both north and east for example) then it will be eaten (disapears)
If any food or ant other than a digger end up at the same place where already stand a BreakableWall then the wall stays and the ant or food disapear. if a digger ant end up at the same place where already stand a BreakableWall or a food then the BreakableWall or food disapear and the digger ant take its place.
each ant is moved before each food is moved.
water is cleand if in a taxi radius of two around a digger that does nothing. (it drinks the water)
any empty ground that stand next to a water ground will become water if there exist a chain of water (north/west/south/east) that connects it to a well.
If then a square has more than one ant or food then this square turn into a empty ground square.
If a square contains water it turns into water.
Any square that still have an ant on it is considered a empty ground with an ant on it.
each empty ground with no ant on it will have 5/100 chance of turning into a food square.
(this is only a sample specification and will most probably need tuning/clarification before it can actually be turned into an unambiguous game)