Perhaps a bit of a late addition to this thread, but I figured I'd throw in my two cents. First post on the board, by the way. Hello, everyone!
What exactly is understood by "sharing" energy? Is it that you can shuffle energy from one to another? Is it that the team has one large pool that everyone uses? I believe there are several angles to this:
- One big pot. Everyone's energy gains go into one big pot, and everyone withdraws from the big pot. This is probably the easiest to implement, but it leaves the potential of aggravating other players.
- Gainers, keepers. You have your own energy stash. When you build something, you draw from your own stash, until you run dry. Then, and only then, you will get dips on the gains of your team players (but their own needs take priority). Basically:
- Code: Select all
if (need more energy) then
alliedEnergy = sum of all allies' net gains
pctTaken = needed / alliedEnergy
for-each ally do
ally's net gain *= (1 - pctTaken)
This requires a bit more work. Possibly, a limit drain could be implemented, customizable by the host (perhaps as a cmdline parameter initially). Setting that drain to 50% would mean that, at any time, at most 50% of your net energy revenue can be used by your allies.
- Share the wealth. When one player needs more energy, a percentage of the energy of other players is taken. Say players A through C are on the same team. A needs more energy. B has 500 left, C has 1500. When A needs, say, 1000 energy, he takes 50% of both player's stash: 250 from B and 750 from C. Possibly, a minimum can be set by the players ("never share anything under 500").
I probably forgot a few options, but you get my drift.
If you take, say, Gainers Keepers, and keep the option to donate energy directly to a player when needed, you can probably cover most bases without inconveniencing team mates of a particularly energy-devouring player.
Of course, I wonder how the AI would handle all this... I suppose it would do okay either way.
As for control, since I've seen Starcraft referenced, I feel I should add that Starcraft did offer some basic protection in the sense of showing what units where selected by other players. This should keep you from accidentally
moving units under direct control of your peers.
Anyway, hope I haven't been too longwinded. Cheers!