Conrad's animations in Flashback executed by a state engine (actor.js) and configured via JSON (conrad.json):
Animation Configuration:
<nme>[String] : Name of the animationsize[Number] : Number of animation framesrate[Number] : Frame rate of the animation (default 20)turn[Boolean] : Animation does turn characterprevious[Array<String>] : Previous animationsnext[String] : Next default animation (if no other animation played before with input)input[Array<String>] : Multiple inputs to trigger animation (keys, env), input combo with+, input negation with!x[Number] : Number of grid units shifted inxdirection for whole animationy[Number] : Number of grid units shifted inydirection for whole animationpx[Array<Number>] : Number of pixels shifted inxdirection for a single animation frame (overridesx)py[Array<Number>] : Number of pixels shifted inydirection for a single animation frame (overridesy)ox[Number | Object<String, Number>] : Number of pixels shifted inxdirection at the end (out) of animation. Can depend on succeeding (in) animation, e.g.{ "<name>": 1 }oy[Number | Object<String, Number>] : Number of pixels shifted inydirection at the end (out) of animation. Can depend on succeeding (in) animation, e.g.{ "<name>": 1 }ix[Number | Object<String, Number>] : Number of pixels shifted inxdirection at the start (in) of animation. Can depend on preceding (out) animation, e.g.{ "<name>": 1 }iy[Number | Object<String, Number>] : Number of pixels shifted inydirection at the start (in) of animation. Can depend on preceding (out) animation, e.g.{ "<name>": 1 }align[Boolean] : Align to grid after animation (2 grid units, default:true)stop[Boolean | Number] : Stop animation at frame index (Number) or at animation end (true)log[Boolean] : Log animation to console
-
Keyboard
Cursor keys: MovementLeft / Right key: Walk, Run, Step, RollUp key: JumpDown key: Crouch
SHIFT: Run, FireSPACE: Draw GunENTER: Action
-
Mouse
- See Touch Controls for Mobile
-
Touch Controls (tap/drag area on screen):
- Use screen as D-Pad
- Far left: Run left
- Middle left: Walk left
- Far right: Run right
- Middle right: Walk right
- Up: Jump
- Down: Crouch
- Middle:
- 1 finger: Shoot
- 2 fingers: Draw Gun
- 3 fingers: Activate
- Dragging can be used to trigger continuous move sequences, e.g.
- Run Jump: Tap far left or right -> Hold -> Drag in Left or Right upper corner
- Run Roll: Down -> Hold -> Drag in Left or Right bottom corner
- Use screen as D-Pad
- Install Node.js
- Clone:
https://github.com/oklemenz/FlashbackJS.git - Terminal:
npm installnpm start
- Browser:
localhost:8080