Basic Concepts - boxgaming/gx GitHub Wiki

The World

The world is an imaginary two-dimensional space that expands out forever* in every direction (north, south, east and west). Positions in this flat expanse are identified by X and Y pixel coordinates. Negative coordinates indicate positions north or east of the universe center (0, 0).
* By "forever" we mean any position between (-2147483648, -2147483648) and (2147483647, 2147483647)
** Yes, I know this drawing is not to scale. Let's press on anyway.

Entities

An entity is any object that can be placed in the world. An entity could be a spaceship, an enemy monster, a tree, a little plumber... any thing that needs to be in a certain place in the world. Entities have X and Y positions that indicate their location in the world. Movement can be indicated by setting an entity's X and/or Y velocity. Entities can be visible or hidden and can be rendered programmatically or have their appearance automatically rendered from a sprite sheet image:

The Scene

The scene is the viewport into the world at large. While the world is infinite*, the view into this world is a fixed size and defines the part of the world we see on the screen. So, for example, if we create a new scene that is 320 pixels x 200 pixels in size we would initially see any content in the world that is between position (0,0) and (320, 200):

* By "infitite" we mean 4.29B x 4.29B pixels.

Maps