[airstrike] Player statistics (was: Airstrike levels and goal oriented game-play)

Eero Tamminen eero.tamminen at netsonic.fi
Sun Aug 14 18:23:35 EDT 2005


On Sunday 14 August 2005 23:16, Ulf Ekström wrote:
> > 6) Currently game shows only information about level name, that bombs
> > or fuel have ended and reason for level ending, but there should be
> > indications about score and number of remaining lives, fuel and bombs.
> > (The tricky thing about adding these is that player is an AI object,
> > but it's biplane sprite that has these properties...)
> Don't we also have some kind of "player" object?

Yes, but number of "lives" is not associated with the "player", but the 
generator generating the corresponding sprite types.  After player
generator has re-generated the indicated sprite-type given number of
times, it marks the player dead and stops.

I mean:
- Player name and AI are stored with the "player" object
- Spritetype and number of sprites ("lives") for the *current level* is
  associated with the co. player generator.  The generator asks player
  object to set AI for the generated sprite
- Count of bombs and fuel are stored to the generated sprite
As a result:
- Sprite doesn't know about generator nor player
- Generator knows about player and the sprite
- Player knows about the AI and could know about the sprite
  (through AI setting)
- AI doesn't know about player or generator

So, I don't know how to deal with showing "lives".  There would also need to 
be an additional API to retrieve the information about bombs and fuel from
any sprite that player could control.

Scores would also be problematic.  E.g. if bullet does something, there's 
nothing linking the bullet hit back to AI or player object.

Do you have any ideas how to solve this?
(We haven't yet implemented multiple inheritance for APIs ;-))

> We should, otherwise, for stats that carries over between levels
> (like the players name). 

I think I need to do some additional class diagrams for this...

	- Eero

More information about the airstrike mailing list