/FlashbackJS

Conrad's animations in Flashback

Primary LanguageJavaScript

FlashbackJS

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 animation
  • size [Number] : Number of animation frames
  • rate [Number] : Frame rate of the animation (default 20)
  • turn [Boolean] : Animation does turn character
  • previous [Array<String>] : Previous animations
  • next [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 in x direction for whole animation
  • y [Number] : Number of grid units shifted in y direction for whole animation
  • px [Array<Number>] : Number of pixels shifted in x direction for a single animation frame (overrides x)
  • py [Array<Number>] : Number of pixels shifted in y direction for a single animation frame (overrides y)
  • ox [Number | Object<String, Number>] : Number of pixels shifted in x direction 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 in y direction 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 in x direction 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 in y direction 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

Play GitHub Version

  • Browser: https://oklemenz.github.io/FlashbackJS
  • Keyboard
    • Cursor keys: Movement
      • Left / Right key: Walk, Run, Step, Roll
      • Up key: Jump
      • Down key: Crouch
    • SHIFT: Run, Fire
    • SPACE: Draw Gun
    • ENTER: Action

Play Locally

  • Install Node.js
  • Clone: https://github.com/oklemenz/FlashbackJS.git
  • Terminal:
    • npm install
    • npm start
  • Browser: localhost:8080