- Template: cart_jik - press "Use this template" and you have a working game.
- Docker image:
ghcr.io/notnullgames/null0-cart-jik:latest(linux/amd64 only - runs emulated on Apple Silicon) - Your code:
cart/main.jik, compiled with jik (transpiles to C) + wasi-sdk - Bindings:
carts/jik/null0.jik(a reference list to copy from) - WASI is available, so ordinary file and stdio calls work.
building
You do not install jik (transpiles to C) + wasi-sdk - the docker image has it, and the current null0 bindings, baked in. That is the whole point: there is nothing in your project to keep in sync with the engine.
docker run --rm --user $(id -u):$(id -g) --platform linux/amd64 \
-v ./cart:/src -v ./webroot:/out \
ghcr.io/notnullgames/null0-cart-jik:latest mygameThe template wraps that in npm start, which also serves the result and rebuilds when you save.
Jik notes
- Jik's types don't line up with the null0 ABI, so null0.jik is a set of
externdeclarations and C wrappers to copy into your cart's@embedblock.
a cart, in Jik
This is carts/jik/simple/main.jik in the engine repo - the same file CI builds into the cart below, so it always compiles.
// null0 Jik example: color bars
//
// NOTE: Jik does not have u8, f32, or uint types, so we use C wrappers
// in the @embed block to bridge the gap.
@embed{C_END}
#include "null0.h"
// C wrappers to bridge Jik's type system to null0's ABI
static void jik_clear(int r, int g, int b, int a) {
Color c = { (unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a };
clear(c);
}
static void jik_draw_rect(int x, int y, int w, int h, int r, int g, int b, int a) {
Color c = { (unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a };
draw_rectangle(x, y, w, h, c);
}
static void jik_draw_rect_outline(int x, int y, int w, int h, int t, int r, int g, int b, int a) {
Color c = { (unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a };
draw_rectangle_outline(x, y, w, h, t, c);
}
static void jik_draw_circ(int cx, int cy, int rad, int r, int g, int b, int a) {
Color c = { (unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a };
draw_circle(cx, cy, rad, c);
}
C_END
// Jik extern declarations for the C wrappers
extern func jik_clear as clear(r: int, g: int, b: int, a: int) -> void
extern func jik_draw_rect as draw_rect(x: int, y: int, w: int, h: int, r: int, g: int, b: int, a: int) -> void
extern func jik_draw_rect_outline as draw_rect_outline(x: int, y: int, w: int, h: int, t: int, r: int, g: int, b: int, a: int) -> void
extern func jik_draw_circ as draw_circle(cx: int, cy: int, rad: int, r: int, g: int, b: int, a: int) -> void
func rect(x: int, w: int, r: int, g: int, b: int):
draw_rect(x, 10, w, 460, r, g, b, 255)
draw_rect_outline(x, 10, w, 460, 1, 255, 255, 255, 255)
end
func load():
w := (640 - 11 * 10) / 10
// circles for visual interest
draw_circle(320, 240, 150, 255, 255, 255, 255)
draw_circle(320, 240, 100, 230, 41, 55, 255)
draw_circle(320, 240, 50, 0, 0, 0, 255)
// colored bars
rect(10, w, 230, 41, 55)
rect(10 + (w + 10) * 1, w, 255, 161, 0)
rect(10 + (w + 10) * 2, w, 253, 249, 0)
rect(10 + (w + 10) * 3, w, 0, 228, 48)
rect(10 + (w + 10) * 4, w, 0, 121, 241)
rect(10 + (w + 10) * 5, w, 200, 122, 255)
rect(10 + (w + 10) * 6, w, 255, 109, 194)
rect(10 + (w + 10) * 7, w, 102, 191, 255)
rect(10 + (w + 10) * 8, w, 0, 158, 47)
rect(10 + (w + 10) * 9, w, 255, 0, 255)
end
func update():
end
func main():
end
carts/jik/simple/main.jikcallbacks
A cart implements the callbacks it cares about. In Jik they look like this:
export func update() -> voidSee anatomy of a cart for the full list and what each one is passed.
more Jik carts
the API, in Jik
Every null0 function, spelled the way Jik spells it. These are read out of the generated bindings themselves, so they match what your editor completes.
colors (7)
Tint a color with another color.
extern func color_tint as color_tint(color: int, tint: int) -> intFade a color.
extern func color_fade as color_fade(color: int, alpha: double) -> intChange the brightness of a color.
extern func color_brightness as color_brightness(color: int, factor: double) -> intInvert a color.
extern func color_invert as color_invert(color: int) -> intBlend 2 colors together.
extern func color_alpha_blend as color_alpha_blend(dst: int, src: int) -> intChange contrast of a color.
extern func color_contrast as color_contrast(color: int, contrast: double) -> intInterpolate colors.
extern func color_bilinear_interpolate as color_bilinear_interpolate(color00: int, color01: int, color10: int, color11: int, coordinateX: double, coordinateY: double) -> intgraphics (75)
Create a new blank image.
extern func new_image as new_image(width: int, height: int, color: int) -> ImageCopy an image to a new image.
extern func image_copy as image_copy(image: Image) -> ImageCreate an image from a region of another image.
extern func image_subimage as image_subimage(image: Image, x: int, y: int, width: int, height: int) -> ImageClear the screen.
extern func clear as clear(color: int) -> voidDraw a single pixel on the screen.
extern func draw_point as draw_point(x: int, y: int, color: int) -> voidDraw a line on the screen.
extern func draw_line as draw_line(startPosX: int, startPosY: int, endPosX: int, endPosY: int, color: int) -> voidDraw a filled rectangle on the screen.
extern func draw_rectangle as draw_rectangle(posX: int, posY: int, width: int, height: int, color: int) -> voidDraw a filled triangle on the screen.
extern func draw_triangle as draw_triangle(x1: int, y1: int, x2: int, y2: int, x3: int, y3: int, color: int) -> voidDraw a filled ellipse on the screen.
extern func draw_ellipse as draw_ellipse(centerX: int, centerY: int, radiusX: int, radiusY: int, color: int) -> voidDraw a filled circle on the screen.
extern func draw_circle as draw_circle(centerX: int, centerY: int, radius: int, color: int) -> voidDraw a filled polygon on the screen.
extern func draw_polygon as draw_polygon(points: *int, numPoints: int, color: int) -> voidDraw a filled arc on the screen.
extern func draw_arc as draw_arc(centerX: int, centerY: int, radius: double, startAngle: double, endAngle: double, segments: int, color: int) -> voidDraw a filled round-rectangle on the screen.
extern func draw_rectangle_rounded as draw_rectangle_rounded(x: int, y: int, width: int, height: int, cornerRadius: int, color: int) -> voidDraw an image on the screen.
extern func draw_image as draw_image(src: Image, posX: int, posY: int) -> voidDraw a tinted image on the screen.
extern func draw_image_tint as draw_image_tint(src: Image, posX: int, posY: int, tint: int) -> voidDraw an image, rotated, on the screen.
extern func draw_image_rotated as draw_image_rotated(src: Image, posX: int, posY: int, degrees: double, offsetX: double, offsetY: double, filter: int) -> voidDraw an image, flipped, on the screen.
extern func draw_image_flipped as draw_image_flipped(src: Image, posX: int, posY: int, flipHorizontal: bool, flipVertical: bool, flipDiagonal: bool) -> voidDraw an image, scaled, on the screen.
extern func draw_image_scaled as draw_image_scaled(src: Image, posX: int, posY: int, scaleX: double, scaleY: double, offsetX: double, offsetY: double, filter: int) -> voidDraw some text on the screen.
extern func draw_text as draw_text(font: Font, text: *char, posX: int, posY: int, color: int) -> voidSave an image to persistant storage.
extern func save_image as save_image(image: Image, filename: *char) -> voidLoad an image from a file in cart.
extern func load_image as load_image(filename: *char) -> ImageResize an image, return copy.
extern func image_resize as image_resize(image: Image, newWidth: int, newHeight: int, filter: int) -> ImageScale an image, return copy.
extern func image_scale as image_scale(image: Image, scaleX: double, scaleY: double, filter: int) -> ImageReplace a color in an image, in-place.
extern func image_color_replace as image_color_replace(image: Image, color: int, replace: int) -> voidTint a color in an image, in-place.
extern func image_color_tint as image_color_tint(image: Image, color: int) -> voidFade a color in an image, in-place.
extern func image_color_fade as image_color_fade(image: Image, alpha: double) -> voidCopy a font to a new font.
extern func font_copy as font_copy(font: Font) -> FontScale a font, return a new font.
extern func font_scale as font_scale(font: Font, scaleX: double, scaleY: double, filter: int) -> FontLoad a BMF font from a file in cart.
extern func load_font_bmf as load_font_bmf(filename: *char, characters: *char) -> FontLoad a BMF font from an image.
extern func load_font_bmf_from_image as load_font_bmf_from_image(image: Image, characters: *char) -> FontMeasure the size of some text.
extern func measure_text as measure_text(font: Font, text: *char, textLength: int) -> intMeaure an image (use 0 for screen).
extern func measure_image as measure_image(image: Image) -> intLoad a TTY font from a file in cart.
extern func load_font_tty as load_font_tty(filename: *char, glyphWidth: int, glyphHeight: int, characters: *char) -> FontLoad a TTY font from an image.
extern func load_font_tty_from_image as load_font_tty_from_image(image: Image, glyphWidth: int, glyphHeight: int, characters: *char) -> FontLoad a TTF font from a file in cart.
extern func load_font_ttf as load_font_ttf(filename: *char, fontSize: int) -> FontInvert the colors in an image, in-place.
extern func image_color_invert as image_color_invert(image: Image) -> voidCalculate a rectangle representing the available alpha border in an image.
extern func image_alpha_border as image_alpha_border(image: Image, threshold: double) -> intCrop an image, in-place.
extern func image_crop as image_crop(image: Image, x: int, y: int, width: int, height: int) -> voidCrop an image based on the alpha border, in-place.
extern func image_alpha_crop as image_alpha_crop(image: Image, threshold: double) -> voidAdjust the brightness of an image, in-place.
extern func image_color_brightness as image_color_brightness(image: Image, factor: double) -> voidFlip an image, in-place.
extern func image_flip as image_flip(image: Image, horizontal: bool, vertical: bool) -> voidChange the contrast of an image, in-place.
extern func image_color_contrast as image_color_contrast(image: Image, contrast: double) -> voidUse an image as an alpha-mask on another image.
extern func image_alpha_mask as image_alpha_mask(image: Image, alphaMask: Image, posX: int, posY: int) -> voidCreate a new image, rotating another image.
extern func image_rotate as image_rotate(image: Image, degrees: double, filter: int) -> ImageCreate a new image of a gradient.
extern func image_gradient as image_gradient(width: int, height: int, topLeft: int, topRight: int, bottomLeft: int, bottomRight: int) -> ImageUnload an image.
extern func unload_image as unload_image(image: Image) -> voidUnload a font.
extern func unload_font as unload_font(font: Font) -> voidClear an image.
extern func clear_image as clear_image(destination: Image, color: int) -> voidDraw a single pixel on an image.
extern func draw_point_on_image as draw_point_on_image(destination: Image, x: int, y: int, color: int) -> voidDraw a line on an image.
extern func draw_line_on_image as draw_line_on_image(destination: Image, startPosX: int, startPosY: int, endPosX: int, endPosY: int, color: int) -> voidDraw a filled rectangle on an image.
extern func draw_rectangle_on_image as draw_rectangle_on_image(destination: Image, posX: int, posY: int, width: int, height: int, color: int) -> voidDraw a filled triangle on an image.
extern func draw_triangle_on_image as draw_triangle_on_image(destination: Image, x1: int, y1: int, x2: int, y2: int, x3: int, y3: int, color: int) -> voidDraw a filled ellipse on an image.
extern func draw_ellipse_on_image as draw_ellipse_on_image(destination: Image, centerX: int, centerY: int, radiusX: int, radiusY: int, color: int) -> voidDraw a circle on an image.
extern func draw_circle_on_image as draw_circle_on_image(destination: Image, centerX: int, centerY: int, radius: int, color: int) -> voidDraw a filled polygon on an image.
extern func draw_polygon_on_image as draw_polygon_on_image(destination: Image, points: *int, numPoints: int, color: int) -> voidDraw a filled round-rectangle on an image.
extern func draw_rectangle_rounded_on_image as draw_rectangle_rounded_on_image(destination: Image, x: int, y: int, width: int, height: int, cornerRadius: int, color: int) -> voidDraw an image on an image.
extern func draw_image_on_image as draw_image_on_image(destination: Image, src: Image, posX: int, posY: int) -> voidDraw a tinted image on an image.
extern func draw_image_tint_on_image as draw_image_tint_on_image(destination: Image, src: Image, posX: int, posY: int, tint: int) -> voidDraw an image, rotated, on an image.
extern func draw_image_rotated_on_image as draw_image_rotated_on_image(destination: Image, src: Image, posX: int, posY: int, degrees: double, offsetX: double, offsetY: double, filter: int) -> voidDraw an image, flipped, on an image.
extern func draw_image_flipped_on_image as draw_image_flipped_on_image(destination: Image, src: Image, posX: int, posY: int, flipHorizontal: bool, flipVertical: bool, flipDiagonal: bool) -> voidDraw an image, scaled, on an image.
extern func draw_image_scaled_on_image as draw_image_scaled_on_image(destination: Image, src: Image, posX: int, posY: int, scaleX: double, scaleY: double, offsetX: double, offsetY: double, filter: int) -> voidDraw some text on an image.
extern func draw_text_on_image as draw_text_on_image(destination: Image, font: Font, text: *char, posX: int, posY: int, color: int) -> voidDraw a outlined (with thickness) rectangle on the screen.
extern func draw_rectangle_outline as draw_rectangle_outline(posX: int, posY: int, width: int, height: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) triangle on the screen.
extern func draw_triangle_outline as draw_triangle_outline(x1: int, y1: int, x2: int, y2: int, x3: int, y3: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) ellipse on the screen.
extern func draw_ellipse_outline as draw_ellipse_outline(centerX: int, centerY: int, radiusX: int, radiusY: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) circle on the screen.
extern func draw_circle_outline as draw_circle_outline(centerX: int, centerY: int, radius: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) polygon on the screen.
extern func draw_polygon_outline as draw_polygon_outline(points: *int, numPoints: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) arc on the screen.
extern func draw_arc_outline as draw_arc_outline(centerX: int, centerY: int, radius: double, startAngle: double, endAngle: double, segments: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) round-rectangle on the screen.
extern func draw_rectangle_rounded_outline as draw_rectangle_rounded_outline(x: int, y: int, width: int, height: int, cornerRadius: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) rectangle on an image.
extern func draw_rectangle_outline_on_image as draw_rectangle_outline_on_image(destination: Image, posX: int, posY: int, width: int, height: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) triangle on an image.
extern func draw_triangle_outline_on_image as draw_triangle_outline_on_image(destination: Image, x1: int, y1: int, x2: int, y2: int, x3: int, y3: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) ellipse on an image.
extern func draw_ellipse_outline_on_image as draw_ellipse_outline_on_image(destination: Image, centerX: int, centerY: int, radiusX: int, radiusY: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) circle on an image.
extern func draw_circle_outline_on_image as draw_circle_outline_on_image(destination: Image, centerX: int, centerY: int, radius: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) polygon on an image.
extern func draw_polygon_outline_on_image as draw_polygon_outline_on_image(destination: Image, points: *int, numPoints: int, thickness: int, color: int) -> voidDraw a outlined (with thickness) round-rectangle on an image.
extern func draw_rectangle_rounded_outline_on_image as draw_rectangle_rounded_outline_on_image(destination: Image, x: int, y: int, width: int, height: int, cornerRadius: int, thickness: int, color: int) -> voidgui (10)
Begin a GUI window. Returns false if the window is collapsed or closed - skip its contents, but still call gui_end_window.
extern func gui_begin_window as gui_begin_window(title: *char, rect: int) -> boolEnd the current GUI window.
extern func gui_end_window as gui_end_window() -> voidA static text label.
extern func gui_label as gui_label(text: *char) -> voidA block of wrapping text.
extern func gui_text as gui_text(text: *char) -> voidA checkbox. Returns the (possibly changed) state.
extern func gui_checkbox as gui_checkbox(label: *char, state: bool) -> boolA slider. Returns the (possibly changed) value.
extern func gui_slider as gui_slider(value: double, low: double, high: double) -> doubleSet the current layout row - the column widths (negative for flexible), and the row height.
extern func gui_layout_row as gui_layout_row(widths: *int, numWidths: int, height: int) -> voidFinish building the GUI for this frame. Called automatically at the end of update if you do not call it.
extern func gui_end as gui_end() -> voidDraw the GUI to an image (0 is the screen).
extern func gui_draw as gui_draw(dst: Image) -> voidinput (12)
Has the key been pressed? (tracks unpress/read correctly.)
extern func key_pressed as key_pressed(key: int) -> boolIs the key currently down?
extern func key_down as key_down(key: int) -> boolHas the key been released? (tracks press/read correctly.)
extern func key_released as key_released(key: int) -> boolIs the key currently up?
extern func key_up as key_up(key: int) -> boolGet current position of mouse.
extern func mouse_position as mouse_position() -> intsound (7)
Load a sound from a file in cart.
extern func load_sound as load_sound(filename: *char) -> SoundPlay a sound.
extern func play_sound as play_sound(sound: Sound, loop: bool) -> voidStop a sound.
extern func stop_sound as stop_sound(sound: Sound) -> voidUnload a sound.
extern func unload_sound as unload_sound(sound: Sound) -> voidSpeak some text and return a sound. Set things to 0 for defaults.
extern func tts_sound as tts_sound(text: *char, phonetic: bool, pitch: int, speed: int, throat: int, mouth: int, sing: bool) -> SoundCreate Sfx sound.
extern func sfx_sound as sfx_sound(params: *int) -> SoundCreate Sfx parameters.
extern func sfx_generate as sfx_generate(type: int) -> *inttile (38)
Load a tilemap (a Tiled map, exported as JSON) from a file in cart.
extern func load_tilemap as load_tilemap(filename: *char) -> TilemapUnload a tilemap.
extern func unload_tilemap as unload_tilemap(tilemap: Tilemap) -> voidUpdate a tilemap's animation timers (deltaTime is in seconds).
extern func tile_update as tile_update(tilemap: Tilemap, deltaTime: double) -> voidGet the size of a tilemap, in tiles.
extern func tile_map_size as tile_map_size(tilemap: Tilemap) -> intGet the size of a single tile of a tilemap, in pixels.
extern func tile_tile_size as tile_tile_size(tilemap: Tilemap) -> intGet a custom property of a tilemap, by name (PROP_NONE when there is no such property.)
extern func tile_map_prop as tile_map_prop(tilemap: Tilemap, name: *char) -> intGet the number of custom properties on a tilemap.
extern func tile_map_prop_count as tile_map_prop_count(tilemap: Tilemap) -> intGet a custom property of a tilemap, by index (PROP_NONE when out of range.)
extern func tile_map_prop_at as tile_map_prop_at(tilemap: Tilemap, index: int) -> intDraw a tilemap on the screen.
extern func tile_draw as tile_draw(tilemap: Tilemap, posX: int, posY: int) -> voidDraw a tilemap on the screen, tinted by a color.
extern func tile_draw_tint as tile_draw_tint(tilemap: Tilemap, posX: int, posY: int, tint: int) -> voidDraw a tilemap on an image.
extern func tile_draw_on_image as tile_draw_on_image(dst: Image, tilemap: Tilemap, posX: int, posY: int) -> voidRender a whole tilemap to a new image.
extern func tilemap_image as tilemap_image(tilemap: Tilemap) -> ImageGet the number of layers in a tilemap. Layers are numbered depth-first, so the children of a group layer have their own indexes too.
extern func tile_layer_count as tile_layer_count(tilemap: Tilemap) -> intGet the index of a layer of a tilemap, by name (-1 when there is no such layer.)
extern func tile_layer_index as tile_layer_index(tilemap: Tilemap, name: *char) -> intGet the name of a layer of a tilemap.
extern func tile_layer_name as tile_layer_name(tilemap: Tilemap, layer: int) -> *charGet the kind of a layer of a tilemap.
extern func tile_layer_type as tile_layer_type(tilemap: Tilemap, layer: int) -> intGet the size of a layer of a tilemap, in tiles.
extern func tile_layer_size as tile_layer_size(tilemap: Tilemap, layer: int) -> intGet whether a layer of a tilemap is visible. Drawing a layer that Tiled marked hidden draws nothing.
extern func tile_layer_visible as tile_layer_visible(tilemap: Tilemap, layer: int) -> boolGet a custom property of a layer of a tilemap, by name (PROP_NONE when there is no such property.)
extern func tile_layer_prop as tile_layer_prop(tilemap: Tilemap, layer: int, name: *char) -> intGet the number of custom properties on a layer of a tilemap.
extern func tile_layer_prop_count as tile_layer_prop_count(tilemap: Tilemap, layer: int) -> intGet a custom property of a layer of a tilemap, by index (PROP_NONE when out of range.)
extern func tile_layer_prop_at as tile_layer_prop_at(tilemap: Tilemap, layer: int, index: int) -> intDraw a single layer of a tilemap on the screen.
extern func tile_draw_layer as tile_draw_layer(tilemap: Tilemap, layer: int, posX: int, posY: int) -> voidDraw a single layer of a tilemap on the screen, tinted by a color.
extern func tile_draw_layer_tint as tile_draw_layer_tint(tilemap: Tilemap, layer: int, posX: int, posY: int, tint: int) -> voidDraw a single layer of a tilemap on an image.
extern func tile_draw_layer_on_image as tile_draw_layer_on_image(dst: Image, tilemap: Tilemap, layer: int, posX: int, posY: int) -> voidRender a single layer of a tilemap to a new image.
extern func tile_layer_image as tile_layer_image(tilemap: Tilemap, layer: int) -> ImageGet the gid of the tile at a column/row in a tilemap layer.
extern func tile_get_tile as tile_get_tile(tilemap: Tilemap, layer: int, column: int, row: int) -> intSet the gid of the tile at a column/row in a tilemap layer. Swapping a gid is how a cart keeps changing state in the map itself.
extern func tile_set_tile as tile_set_tile(tilemap: Tilemap, layer: int, column: int, row: int, gid: int) -> voidDraw a single tile from a tilemap on the screen.
extern func tile_draw_tile as tile_draw_tile(tilemap: Tilemap, gid: int, posX: int, posY: int) -> voidGet a copy of the image of a single tile in a tilemap.
extern func tile_image as tile_image(tilemap: Tilemap, gid: int) -> ImageGet a custom property of a tile of a tilemap, by name (PROP_NONE when there is no such property.) These come from the tileset, so every tile with this gid shares them.
extern func tile_gid_prop as tile_gid_prop(tilemap: Tilemap, gid: int, name: *char) -> intGet the number of custom properties on a tile of a tilemap.
extern func tile_gid_prop_count as tile_gid_prop_count(tilemap: Tilemap, gid: int) -> intGet a custom property of a tile of a tilemap, by index (PROP_NONE when out of range.)
extern func tile_gid_prop_at as tile_gid_prop_at(tilemap: Tilemap, gid: int, index: int) -> intGet the number of objects on an object-layer of a tilemap.
extern func tile_object_count as tile_object_count(tilemap: Tilemap, layer: int) -> intGet an object from an object-layer of a tilemap.
extern func tile_object as tile_object(tilemap: Tilemap, layer: int, index: int) -> intGet the index of an object on an object-layer of a tilemap, by name (-1 when there is no such object.)
extern func tile_object_index as tile_object_index(tilemap: Tilemap, layer: int, name: *char) -> intGet a custom property of an object of a tilemap, by name (PROP_NONE when there is no such property.)
extern func tile_object_prop as tile_object_prop(tilemap: Tilemap, layer: int, index: int, name: *char) -> intGet the number of custom properties on an object of a tilemap.
extern func tile_object_prop_count as tile_object_prop_count(tilemap: Tilemap, layer: int, index: int) -> intGet a custom property of an object of a tilemap, by index (PROP_NONE when out of range.)
extern func tile_object_prop_at as tile_object_prop_at(tilemap: Tilemap, layer: int, index: int, propIndex: int) -> intutilities (5)
Get system-time (ms) since unix epoch.
extern func current_time as current_time() -> intGet the change in time (seconds) since the last update run.
extern func delta_time as delta_time() -> doubleGet a random integer between 2 numbers.
extern func random_int as random_int(min: int, max: int) -> intGet the random-seed.
extern func random_seed_get as random_seed_get() -> intSet the random-seed.
extern func random_seed_set as random_seed_set(seed: int) -> void