Globals
Welcome to the API Reference, a technical overview of every JoBase feature.
Objects
These are globals that control the window, and handle user input.
-
Manage the main window
-
Control the rendering of things
-
Handle cursor input
-
Handle keyboard input
Classes
-
Draw rectangles
-
Draw images
-
Draw text
-
Draw polygons
-
Draw lines
-
Render to an offscreen buffer
-
Play audio
Functions
run() -> None
Run the main game loop. If your file contains a def loop() function, it will be called continuously.
random(x = float, y = 1) -> float
Find a random float between x and y.
x: floatThe starting limit of the random number
y: floatThe end limit of the random number
Colours
JoBase supports a set of default colours. Learn how to create your own.
WHITE = 1, 1, 1 BLACK = 0, 0, 0 GRAY = 0.5, 0.5, 0.5 DARK_GRAY = 0.2, 0.2, 0.2 LIGHT_GRAY = 0.8, 0.8, 0.8 BROWN = 0.6, 0.2, 0.2 TAN = 0.8, 0.7, 0.6 RED = 1, 0, 0 DARK_RED = 0.6, 0, 0 SALMON = 1, 0.5, 0.5 ORANGE = 1, 0.5, 0 GOLD = 1, 0.8, 0 YELLOW = 1, 1, 0 OLIVE = 0.5, 0.5, 0 LIME = 0, 1, 0 DARK_GREEN = 0, 0.4, 0 GREEN = 0, 0.5, 0 AQUA = 0, 1, 1 BLUE = 0, 0, 1 LIGHT_BLUE = 0.5, 0.8, 1 AZURE = 0.9, 1, 1 NAVY = 0, 0, 0.5 PURPLE = 0.5, 0, 1 PINK = 1, 0.75, 0.8 MAGENTA = 1, 0, 1
Fonts
DEFAULTDefault sans serif font. Passed to Text.font.
CODEA monospace font. Passed to Text.font.
SERIFA serif font. Passed to Text.font.
DISPLAYA display font. Passed to Text.font.
PIXELA pixel font. Passed to Text.font.
Images
MANDefault image of the JoBase mascot. Passed to Image.name.
COINPassed to Image.name.
ENEMYPassed to Image.name.