A small JS game engine with a smaller API. It provides access to true fixed update calls that are aware of input.
core.js is where its at. It exports the key object Core
, create with
var core = new Core(window, canvasContext)
Frequency at which update will be called. Defaults to 1000/60
Array of game objects. Adding an object to this list will attempt to call its draw(context) and update() functions.
Call this once everything is loaded to get things moving. After it is called once, it acts as core.play
Prevent internal time propogation
Continue internal time propogation
Input is accessed through core.input
. All browser key events are avaiable in the correct update calls.
Note: keyCode
is deprecated in most browsers and will be dropped soon. Will switch soon to keyboardEvent.code
and bump version number.
returns true if the Key of code keyCode
was down at time of the current frame.
returns true if the Key of code keyCode was first depressed at time of the current frame (only one frame will see this)
returns true if the Key of code keyCode was released at time of the current frame (only one frame will see this)