Flash Game Toolkit

The working journal for the Flash Game Toolkit. Read all about the progress and challenges I encounter in the Open Source Project. The key bits of knowledge I am hoping to gain is how to run an Extreme Programming Project and a large scale project in ActionScript. MacroMedia Flash ActionScript is a great language to prototype games in. The Flash Game Toolkit intends to build the components a board/dice/card game designer would need to put together a game.

Sunday, June 15

Version 1.0 Specification

The first version of the Flash Game Toolkit is going to be simplistic. The goal is to get something working and some samples. Network suppport and some of the board game functionality will have to wait. But enough about what it isn't going to be...

Version 1.0 Objects and their Public Methods:

Game - The underlying game mechanics
StartGame() - initialize the game
EndGame() - the game is over
StartRound()
EndRound()
int GetCurrentRound();
SetMaxRounds( int );
int GetMaxRounds();
SetNumberPlayers( int )
int GetNumberPlayers()
Player GetPlayer(index)
Player GetCurrentPlayer()
SetCurrentPlayer(index)
NextPlayer()

Callback (application can overwrite)
OnStartGame()
OnEndGame()
OnStartRound()
OnEndRound()
OnStartTurn()
OnEndTurn()


Player - the participants
string GetName() -
SetName( string ) - the printable name
bool IsPlaying() - true if the player is active
Playing(bool) - indicate if the player is active
Token GetToken() - physical representation


Token - physical representation of player
GetColor()
SetColor()
SetOwner(Object)
Object GetOwner()
GetLocation()
SetLocation()


Bank - to handle deposits and withdrawals
float GetBalance()
SetBalance(float)
Withdraw(float)
Deposit(float)
bool IsInfinite() - some banks don't have a limit
SetInifite(bool)

Callbacks
OnBankrupt() - bank is out of money


Chip - physical representation of money
GetColor()
SetColor()
float GetValue()
SetValue(float)
SetOwner(Object)
Object GetOwner()
GetLocation()
SetLocation()


Board - keeps track of player locations and other items (cards, tokens)
[TBD]


BoardControl - the thing that draws the board
[TBD]


RandomGenerator - base object for spinners/dice
int GetValue() - get the spinner value.
SetNextValue(int) - set the final value (when spinner stops)
SetUseRandom(bool) - ignore SetNextValue()
bool IsUseRandom() - checks to see if spinner is random
int GetMinValue() - get minimum value
SetMinValue(int) - set minimum value
int GetMaxValue() - get maximum value
SetMaxValue(int) - set maximum value


Spinner - a spinning device to generate random values
* derived from RandomGenerator
Spin() - start the spinning.
bool IsSpinning() - check if spinner is moving
Stop() - force the spinning to stop
float GetFriction() - get the spinner friction
SetFriction(float) - set the spinner friction (0.0 : never stops -> 1.0 : stops immediately)
float GetVelocity() - get spinning velocity (positive for clockwise)
SetSpinVelocity(float) - start spinning velocity


SpinnerControl - the spinner display
* sample


Dice - properly called die
* derived from RandomGenerator
* derived from Object3D
Roll() - start the roll
bool IsRolling() - check if dice is moving
Stop() - force the rolling to stop
float SetGravity() - get the gravity value
SetGravity(float) - set the dice gravity (0.0 : never stops -> 1.0 : stops immediately)


DiceControl - the dice display
* sample


Card - two sided item
GetOwner()
SetOwner()
bool IsShowing() - is the front up
SetShowing(bool)
Flip() - turn over (toggle showing)
GetValue()
SetValue()
GetType()
SetType()


CardControl - physical dispay of a card
* sample


Deck - collection of cards
GetOwner()
SetOwner()
Shuffle()
Card GetCard(index)
Push(Card)
Card Pop()
IsEmpty()
GetCount()


DeckControl - physical display of a deck
* sample


Vector2D
x
y

Vector3D
x
y
z


Things likely not get pushed out...

Universe - collection of objects and mapping to 2D space
[TBD but requires gravity, bounding box,


Object3D - just the representation. drawing is up to user.
Vector3D GetPosition()
SetPosition( Vector3D )
Vector3D GetRotation()
SetRotation( Vector3D )
Vector3D GetVelocity()
SetVelocity( Vector3D )
Vector3D GetRotationalVelocity()
SetRotationalVelocity(float) - start spinning velocity
Vector3D GetAcceleration()
SetAcceleration( Vector3D )
Vector3D GetRotationalAccelaration()
SetRotationalAcceleration(float) - start spinning velocity

0 Comments:

Post a Comment

<< Home