Karawasa,
I gave it some more thought, and I think the main problem, related to income, is that sometimes nobody sends a creep to a particular player, making it difficult to get income.
It gets worse, of course, when it happens to a neophite who doesn't have any minerals at all and ends up feeling frustrated/bored.
I think that RATHER THAN directly giving players a steady income, it would be better to automatically ensure that they have a fresh supply of creeps all the time which they can kill for income.
If I were writing it myself, I think I'd do something like this:
1. Set up an interval time of about 20 seconds.
2. Add up the total mineral cost spent on creeps sent
to each player during that period per player
(Hereafter "creep-dollars per player" or "CDPP")
Include the duplicate set of creeps a player sends
to themselves in this number.
So if Bob sends ten $30 creeps to Jane,
that's $300 of creeps to Bob
and $300 of creeps to Jane.
3. Decide how much money the CPU should spend on
CPU-generated-creeps compared to player-paid-for-creeps.
(I'll use "CCB" later to refer to the "CPU Creep Budget".)
I think dividing the "total creep-dollars" by three
would be a good CCB.
4. Distribute the CCB among the players according to how
many creep-dollars were sent to them, giving people who
didn't get any most of the CCB.
So basically:
foreach_human_player() {
# See how much of the CPU Creep Budget
# should be spent on this player
AvgCD = Total (CPPP);
set hisCCB = CCB *
( 1 - (CD_sent_to_this_player / AvgCD) );
# Figure out what creeps to buy with it.
If (hisCCB <=0) continue;
If ( CCB < (FruitPrice) {
NumberofCreeps = Random(1,5,10,15,or 30);
CreepColor = Random(6-elements or composite);
CreepType = MostExpensiveCreepType(CreepColor,
(thisplayersCCB/NumberofCreeps)+0.5);
# (sometimes round up)
} else { # It's Fruit time
CreepType=Fruit;
CreepColor = Fruit;
NumberofCreeps = hisCCB/FruitPrice;
}
}
Related idea:
In addition to the above, you might want to have the CPU start sending Extra-CPU-Fruit (ECF) to everyone if the game goes on too long.
I know you said that the fruit that players send to each other ought to break any stalemate; I haven't gotten that far before winning or losing (usually winning) so I'm not sure.
But fruit-at-the-end is just a failsafe idea, so if the players do in-fact kill each other, they'll never see the ECF anyways. And besides, it should be much easier to program:
if(gametime > toolong ) call(WhateverMakesFruitInTDMode)
- wwwIdotLA
http://frogsmart.com