szerda, november 30th, 2011 | Author:
Vagabond
It is the last day of the month, and I still haven’t finished the game. I have a handful of remaining tasks to make it work, and a few others to make it good. But I don’t really care about the deadline, because for this I have as much time as I want to spend on it.
Anyway, when I have free time – eating, travelling, etc. – I am trying to plan ahead. There is one last large task in my list, here is the broken down step-by-step guide for it:
- Validations
- Is there anyone playing the game?
- Players might be deleted
- If 0 players are found, end the game
- If 1 players is found, add extra score, end the game
- Loading turns
- Active turns only – a turn is active as long as no other turn was submitted for the same game from the same player
- More validations
- Does the player still exist?
- “Jump out”s are not included in active
- If 0 or 1 actives are present, skip the turn – Turn count is increased, though., so skip to no. 9
- Robots acting
- Player substitution?
- Player positions calculated, “jump out”s are removed from the list
- Explosion calculations
- coos with bomber player ids
- Checking affected players
- Effect types:
- Self effect: negative score
- Other effect: (Can happen in parallel with no. 1)
- Score to the bomber
- Death to to affected
- Affected jumps out until net activity
- Store player scores
- Recalc high scores
- Store movie data
- Store turn result data
- Mark processed turns as executed in turn X, but keep them active
- Check game end criteria:
- Turn based: If turn count is >= max turns, close the game
- Deathmatch:
- If there is only one survivor, close the game, give extra score to survivor, recalc high scores?
- 0 survivors: Close the game
- Start a new game if needed?
|
This is about 5 hours worth of work – about three evenings.