From 89cff7adc85cb97232da30783f484308f1ff1ebe Mon Sep 17 00:00:00 2001 From: Sam Caldwell Date: Tue, 20 Oct 2015 11:36:37 -0400 Subject: [PATCH] flesh out protocol description --- examples/platformer/game.rkt | 57 +++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/examples/platformer/game.rkt b/examples/platformer/game.rkt index 7019b7b..1d2725d 100644 --- a/examples/platformer/game.rkt +++ b/examples/platformer/game.rkt @@ -1 +1,56 @@ -#lang prospect \ No newline at end of file +#lang prospect + +(require racket + "./geometry.rkt" + "./periodic_timer.rkt") + +#| + +Layers: +- External Events + * key press/release +- Ground +corresponds to computer itself - device drivers and applications + +- Game +running application +per-game state, such as score and count-of-deaths +process which spawns levels + +- Level +model of the game world +actors represent entities in the world, mostly +misc actors do physicsish things + + + +title Jump Sequence + +Player -> Physics: (jump 'player) +note right of Physics: Considers the request. +note right of Physics: Denied -- Player is not on a surface. + +Player -> Physics: (jump 'player) +note right of Physics: Considers the request. +note right of Physics: Accepted. +note right of Physics: Updates velocity, position +Physics -> Subscribers: (vel 'player ...) +Physics -> Subscribers: (pos 'player ...) + + + + +title Display Control Updates + +Physics -> DisplayCtl: (pos 'player ...) +note right of DisplayCtl: Compares player pos to level size +DisplayCtl -> Subscribers: (at-meta (at-meta (scroll-offset ...))) + + + + + + + + +|# \ No newline at end of file