Process events | in Java, this is in a separate thread, and as such, we don't actually need to worry about where in the loop this goes) |
Check for collisions | Between active players and ball/players. Between ball and pitch edges (including goal) |
Move Ball | Oooh don't you just love physics |
Move Passive Players | Coupled to tactics |
Move Active Players | Dependent on keys pressed or computer AI |
Change Active/Passive Players if necessary | Ooch, this could be hard and contentious |
Draw | Transform virtual co-ordinates to screen co-ordinates, draw everything to a back-buffer and flip! |
| Methods | Properties | superclass |
Class | | | |
| | | |
Ball | X,Y,Z,Quadrant,velocityx,velocityy,velocityz,Image | PlaceBall(x,y,z) ; Move() ; Strike(?) ; ApplyAftertouch(?) ; | 2dSprite |
Team | Name, gamestats, etc. ; PlayerArray() | ? | None |
Player | X,Y,Z,Vx,Vy,Vz,AIState,Image | Move(Tactic) ; Move(X,Y,Z) ; ChangeState(?) ; MoveRelative(?,?,?) | 2dSprite |
2dSprite | ?? | | Image? |
Tactic | Probably a matrix of ball positions and ideal player positions | Load/Save | None |
Pitch | Image, Backbuffer? | coordinate transforms | Image? |
swosgame | loads | container of main game loop | None (extends Applet) |