Skip to content

oklemenz/FlashbackJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  • Mouse

    • See Touch Controls for Mobile
  • Touch Controls (tap/drag area on screen):

    Mobile

    • 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

Play Locally

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

About

Conrad's animations in Flashback

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published