BigCalm : SWOS Java : Spec

Java SWOS Specification


Game Loop Most of this will probably have to be re-ordered:
Do
	Process Events 

	Check for collisions

   Move Ball

	Move Passive Players

	Move Active Players

	Change Active/Passive Players if necessary

	Draw
Until GameOver

notes:
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 collisionsBetween active players and ball/players. Between ball and pitch edges (including goal)
Move BallOooh don't you just love physics
Move Passive PlayersCoupled to tactics
Move Active PlayersDependent on keys pressed or computer AI
Change Active/Passive Players if necessaryOoch, this could be hard and contentious
DrawTransform virtual co-ordinates to screen co-ordinates, draw everything to a back-buffer and flip!


Classes:

MethodsPropertiessuperclass
Class
BallX,Y,Z,Quadrant,velocityx,velocityy,velocityz,ImagePlaceBall(x,y,z) ; Move() ; Strike(?) ; ApplyAftertouch(?) ;2dSprite
TeamName, gamestats, etc. ; PlayerArray()?None
PlayerX,Y,Z,Vx,Vy,Vz,AIState,ImageMove(Tactic) ; Move(X,Y,Z) ; ChangeState(?) ; MoveRelative(?,?,?)2dSprite
2dSprite??Image?
TacticProbably a matrix of ball positions and ideal player positionsLoad/SaveNone
PitchImage, Backbuffer?coordinate transformsImage?
swosgameloadscontainer of main game loopNone (extends Applet)

These classes will be arranged like this in coding structure:
Class Ownership diagram

4th April 2002 Jonathan Daniel 2002