section Core API section
Description
The lowest level functions and classes. The Core API
contains objects
automatically generated when the engine and game are loaded.
Namespaces
-
SGF
The
SGF
namespace is the single global object that gets exported to the global scope ofSimple Game Framework
's JavaScript environment.
Classes
-
EventEmitter
A base class that implements the observer pattern commonly used throughout the
Resources API
classes,Game
andInput
, to name just a few. -
Game
Represents your game itself. That is, an instance of
Game
is automatically created every time an SGF game is loaded. TheGame
class is in charge of the "game loop", and invokes it's ownGame#update
andGame#render
functions to execute the game. -
Input
Contains information and utility methods concerning player input for games. This covers mouse movement, mouse clicks, and key presses.
-
Screen
Contains information about the screen the game is being rendered to.