Range and bge
The engine API lives in the Range module, with a capital R. Range Engine chose the capital letter so it isn’t confused with Python’s range() function.
import Rangefrom Range import logic, eventsThe old name bge also works. The engine registers each submodule under both names, so Range.logic and bge.logic are the same object:
import bgefrom bge import logicThis documentation uses Range in every example.
| Range | bge | What it is for |
|---|---|---|
Range.logic |
bge.logic |
Scene, objects, time, global properties and file loading |
Range.types |
bge.types |
Classes of game objects: objects, cameras, lights, sensors, actuators |
Range.render |
bge.render |
Window, resolution, VSync, mouse cursor and debug drawing |
Range.events |
bge.events |
Key, mouse button and input state constants |
Range.constraints |
bge.constraints |
Physics joints, vehicles and physics engine settings |
Range.application |
bge.application |
Application info, such as version and platform |
Range.texture |
bge.texture |
Dynamic textures: video, image, camera and render to texture |
Range.imgui |
bge.imgui |
Interface windows and controls for debugging |
Range.network |
bge.network |
Multiplayer: connection, messages and object replication |
