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 10, 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, {difficulty=?, pastGames=?})
fills up a game object ready to be used
update(dt) - called on update
mousepressed
mousereleased
keypressed
keyreleased
draw
getReady - load all assets
getScore
-1 to 1, for pass fail use >0 is pass - Otherwise just more positive is better
Difficulties: array of strings from ["easy","medium","difficult","impossible"]
PR: string from "child","rit","sse","deans car"
Keys: array of string from "full keyboard","arrows","wasd","mouse"

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