This repository has been archived by the owner on Sep 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Mitch's Thoughts
mitchskiba edited this page Mar 9, 2012
·
14 revisions
- optionsGame(): table following game interface that produces an options screen for this game mode
- resultsGame(): table following game interface that produces a results screen for the game mode
- setGameList(games): mode is passed the list of selected games before it becomes the active game mode
- hasNextGame(): true/false if there are more games to be played
- nextGame(): next game to play
- nextPlayer(): next player's name
- setResults(float): set results of the game that was just played
- reportGame(table of defaults): overwrites properties in the table that report info about game
- Includes:
- Love callback methods populated with no-ops
- Metadata about game:
- Dificulty
- PRness
- Keys used - even if just a list of strings displayed on spash screen it would be nice
- Game duration - defaults to -1 for just wait for isDone to come up false
- preLoad method called while spash screen is shown
- Includes:
- isDone(): boolean, should game end early
- getResults(): float number -1.0 to 1.0 for how well the player did. For Pass fail anything >0 is considered pass. (Otherwise just more positive is better)
- reportGame(table of defaults): overwrites properties in the table that report info about game
(While I've written procedural code, this is acutally going to have to be encapsulated as state and evaluated during love's update)
Find and light load all games (don't call their preLoad method here)
Show User Screen they can pick and choose games with, by options (difficulty, PR etc). Use Done button to move on
Show User screen they can pick individual games out with (for the ones we know to be broken etc). Use done button to move on
Find and load all game modes
Loop:
- Show User a screen with game modes and descriptions of modes, have them select one
- Ask game mode for its options screen game
- Run options screen game until complete
- Loop while gameMode:hasNexGame():
- get next game and player from gameMode
- call games preLoad
- show splash screen with keys used and player that is up
- swap in game instead of showing splash screen
- wait until game's time is up, or game reports isDone
- gameMode:setResults(game:getResults())
- Run game mode's results screen as a game