Skip to content
This repository has been archived by the owner on Sep 19, 2019. It is now read-only.

Mitch's Thoughts

mitchskiba edited this page Mar 9, 2012 · 14 revisions

game mode interface:

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

game interface:

makeGameInstance(self, objectToFill, {difficulty=?, pastGames=?})
fills up a game object ready to be used
needs lua callbacks
gload - called before game is run
gdraw - draw the state
gupdate(dt) - called on update
keyPressed... etc.
Difficulties: array of strings from ["easy","medium","difficult","impossible"]
PR: string from ["child","rit","sse"]
Keys: array of string from ["full]
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)

Main Game Procedure:

(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
Clone this wiki locally