- Template: cart_walt - press "Use this template" and you have a working game.
- Docker image:
ghcr.io/notnullgames/null0-cart-walt:latest - Your code:
cart/main.walt, compiled with walt - Bindings:
carts/walt/null0.walt(a reference list to copy from) - WASI is available, so ordinary file and stdio calls work.
building
You do not install walt - 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) \
-v ./cart:/src -v ./webroot:/out \
ghcr.io/notnullgames/null0-cart-walt:latest mygameThe template wraps that in npm start, which also serves the result and rebuilds when you save.
Walt notes
- Imports are per-module: copy the
type+importpair for each function you use. - You need a local memory (
const memory: Memory = { initial: 1 }) even for a plain store. - A
Coloris a *pointer to 4 bytes* you write into memory yourself. - No
malloc, so struct-returning functions do not work on the web host.
a cart, in Walt
This is carts/walt/simple/main.walt in the engine repo - the same file CI builds into the cart below, so it always compiles.
// simple walt cart for null0 (see null0.walt for the full bindings)
//
// Color is a pointer to 4 bytes (r, g, b, a) in memory, not a packed
// scalar - these constants are addresses that _null0_init_colors()
// populates at startup.
// two pages: the colors below live at 65536, which is one page in - with
// `initial: 1` (65536 bytes, addresses 0-65535) every store8 here is off the
// end and the cart traps with "memory access out of bounds"
const memory: Memory = { initial: 2 };
const BLUE: i32 = 65536; // rgba(0, 121, 241, 255)
const RED: i32 = 65540; // rgba(230, 41, 55, 255)
type Clear = (i32) => void;
type DrawCircle = (i32, i32, i32, i32) => void;
import { clear: Clear, draw_circle: DrawCircle } from 'null0';
// called on load
export function load(): void {
i32.store8(65536, 0);
i32.store8(65537, 121);
i32.store8(65538, 241);
i32.store8(65539, 255);
i32.store8(65540, 230);
i32.store8(65541, 41);
i32.store8(65542, 55);
i32.store8(65543, 255);
clear(BLUE);
draw_circle(100, 100, 50, RED);
}
// called on every frame
export function update(): void {}
// other callbacks you can implement:
// export function unload(): void {}
// export function buttonUp(button: i32, player: i32): void {}
// export function buttonDown(button: i32, player: i32): void {}
// export function keyUp(key: i32): void {}
// export function keyDown(key: i32): void {}
// export function mouseDown(button: i32): void {}
// export function mouseUp(button: i32): void {}
// export function mouseMoved(x: f32, y: f32): void {}
carts/walt/simple/main.waltcallbacks
A cart implements the callbacks it cares about. In Walt they look like this:
export function update() {}See anatomy of a cart for the full list and what each one is passed.
more Walt carts
the API, in Walt
Every null0 function, spelled the way Walt 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.
type ColorTint = (i32, i32) => i32;
import { color_tint: ColorTint } from 'null0';Fade a color.
type ColorFade = (i32, f32) => i32;
import { color_fade: ColorFade } from 'null0';Change the brightness of a color.
type ColorBrightness = (i32, f32) => i32;
import { color_brightness: ColorBrightness } from 'null0';Invert a color.
type ColorInvert = (i32) => i32;
import { color_invert: ColorInvert } from 'null0';Blend 2 colors together.
type ColorAlphaBlend = (i32, i32) => i32;
import { color_alpha_blend: ColorAlphaBlend } from 'null0';Change contrast of a color.
type ColorContrast = (i32, f32) => i32;
import { color_contrast: ColorContrast } from 'null0';Interpolate colors.
type ColorBilinearInterpolate = (i32, i32, i32, i32, f32, f32) => i32;
import { color_bilinear_interpolate: ColorBilinearInterpolate } from 'null0';graphics (75)
Create a new blank image.
type NewImage = (i32, i32, i32) => i32;
import { new_image: NewImage } from 'null0';Copy an image to a new image.
type ImageCopy = (i32) => i32;
import { image_copy: ImageCopy } from 'null0';Create an image from a region of another image.
type ImageSubimage = (i32, i32, i32, i32, i32) => i32;
import { image_subimage: ImageSubimage } from 'null0';Clear the screen.
type Clear = (i32) => void;
import { clear: Clear } from 'null0';Draw a single pixel on the screen.
type DrawPoint = (i32, i32, i32) => void;
import { draw_point: DrawPoint } from 'null0';Draw a line on the screen.
type DrawLine = (i32, i32, i32, i32, i32) => void;
import { draw_line: DrawLine } from 'null0';Draw a filled rectangle on the screen.
type DrawRectangle = (i32, i32, i32, i32, i32) => void;
import { draw_rectangle: DrawRectangle } from 'null0';Draw a filled triangle on the screen.
type DrawTriangle = (i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_triangle: DrawTriangle } from 'null0';Draw a filled ellipse on the screen.
type DrawEllipse = (i32, i32, i32, i32, i32) => void;
import { draw_ellipse: DrawEllipse } from 'null0';Draw a filled circle on the screen.
type DrawCircle = (i32, i32, i32, i32) => void;
import { draw_circle: DrawCircle } from 'null0';Draw a filled polygon on the screen.
type DrawPolygon = (i32, i32, i32) => void;
import { draw_polygon: DrawPolygon } from 'null0';Draw a filled arc on the screen.
type DrawArc = (i32, i32, f32, f32, f32, i32, i32) => void;
import { draw_arc: DrawArc } from 'null0';Draw a filled round-rectangle on the screen.
type DrawRectangleRounded = (i32, i32, i32, i32, i32, i32) => void;
import { draw_rectangle_rounded: DrawRectangleRounded } from 'null0';Draw an image on the screen.
type DrawImage = (i32, i32, i32) => void;
import { draw_image: DrawImage } from 'null0';Draw a tinted image on the screen.
type DrawImageTint = (i32, i32, i32, i32) => void;
import { draw_image_tint: DrawImageTint } from 'null0';Draw an image, rotated, on the screen.
type DrawImageRotated = (i32, i32, i32, f32, f32, f32, i32) => void;
import { draw_image_rotated: DrawImageRotated } from 'null0';Draw an image, flipped, on the screen.
type DrawImageFlipped = (i32, i32, i32, i32, i32, i32) => void;
import { draw_image_flipped: DrawImageFlipped } from 'null0';Draw an image, scaled, on the screen.
type DrawImageScaled = (i32, i32, i32, f32, f32, f32, f32, i32) => void;
import { draw_image_scaled: DrawImageScaled } from 'null0';Draw some text on the screen.
type DrawText = (i32, i32, i32, i32, i32) => void;
import { draw_text: DrawText } from 'null0';Save an image to persistant storage.
type SaveImage = (i32, i32) => void;
import { save_image: SaveImage } from 'null0';Load an image from a file in cart.
type LoadImage = (i32) => i32;
import { load_image: LoadImage } from 'null0';Resize an image, return copy.
type ImageResize = (i32, i32, i32, i32) => i32;
import { image_resize: ImageResize } from 'null0';Scale an image, return copy.
type ImageScale = (i32, f32, f32, i32) => i32;
import { image_scale: ImageScale } from 'null0';Replace a color in an image, in-place.
type ImageColorReplace = (i32, i32, i32) => void;
import { image_color_replace: ImageColorReplace } from 'null0';Tint a color in an image, in-place.
type ImageColorTint = (i32, i32) => void;
import { image_color_tint: ImageColorTint } from 'null0';Fade a color in an image, in-place.
type ImageColorFade = (i32, f32) => void;
import { image_color_fade: ImageColorFade } from 'null0';Copy a font to a new font.
type FontCopy = (i32) => i32;
import { font_copy: FontCopy } from 'null0';Scale a font, return a new font.
type FontScale = (i32, f32, f32, i32) => i32;
import { font_scale: FontScale } from 'null0';Load a BMF font from a file in cart.
type LoadFontBmf = (i32, i32) => i32;
import { load_font_bmf: LoadFontBmf } from 'null0';Load a BMF font from an image.
type LoadFontBmfFromImage = (i32, i32) => i32;
import { load_font_bmf_from_image: LoadFontBmfFromImage } from 'null0';Measure the size of some text.
type MeasureText = (i32, i32, i32) => i32;
import { measure_text: MeasureText } from 'null0';Meaure an image (use 0 for screen).
type MeasureImage = (i32) => i32;
import { measure_image: MeasureImage } from 'null0';Load a TTY font from a file in cart.
type LoadFontTty = (i32, i32, i32, i32) => i32;
import { load_font_tty: LoadFontTty } from 'null0';Load a TTY font from an image.
type LoadFontTtyFromImage = (i32, i32, i32, i32) => i32;
import { load_font_tty_from_image: LoadFontTtyFromImage } from 'null0';Load a TTF font from a file in cart.
type LoadFontTtf = (i32, i32) => i32;
import { load_font_ttf: LoadFontTtf } from 'null0';Invert the colors in an image, in-place.
type ImageColorInvert = (i32) => void;
import { image_color_invert: ImageColorInvert } from 'null0';Calculate a rectangle representing the available alpha border in an image.
type ImageAlphaBorder = (i32, f32) => i32;
import { image_alpha_border: ImageAlphaBorder } from 'null0';Crop an image, in-place.
type ImageCrop = (i32, i32, i32, i32, i32) => void;
import { image_crop: ImageCrop } from 'null0';Crop an image based on the alpha border, in-place.
type ImageAlphaCrop = (i32, f32) => void;
import { image_alpha_crop: ImageAlphaCrop } from 'null0';Adjust the brightness of an image, in-place.
type ImageColorBrightness = (i32, f32) => void;
import { image_color_brightness: ImageColorBrightness } from 'null0';Flip an image, in-place.
type ImageFlip = (i32, i32, i32) => void;
import { image_flip: ImageFlip } from 'null0';Change the contrast of an image, in-place.
type ImageColorContrast = (i32, f32) => void;
import { image_color_contrast: ImageColorContrast } from 'null0';Use an image as an alpha-mask on another image.
type ImageAlphaMask = (i32, i32, i32, i32) => void;
import { image_alpha_mask: ImageAlphaMask } from 'null0';Create a new image, rotating another image.
type ImageRotate = (i32, f32, i32) => i32;
import { image_rotate: ImageRotate } from 'null0';Create a new image of a gradient.
type ImageGradient = (i32, i32, i32, i32, i32, i32) => i32;
import { image_gradient: ImageGradient } from 'null0';Unload an image.
type UnloadImage = (i32) => void;
import { unload_image: UnloadImage } from 'null0';Unload a font.
type UnloadFont = (i32) => void;
import { unload_font: UnloadFont } from 'null0';Clear an image.
type ClearImage = (i32, i32) => void;
import { clear_image: ClearImage } from 'null0';Draw a single pixel on an image.
type DrawPointOnImage = (i32, i32, i32, i32) => void;
import { draw_point_on_image: DrawPointOnImage } from 'null0';Draw a line on an image.
type DrawLineOnImage = (i32, i32, i32, i32, i32, i32) => void;
import { draw_line_on_image: DrawLineOnImage } from 'null0';Draw a filled rectangle on an image.
type DrawRectangleOnImage = (i32, i32, i32, i32, i32, i32) => void;
import { draw_rectangle_on_image: DrawRectangleOnImage } from 'null0';Draw a filled triangle on an image.
type DrawTriangleOnImage = (i32, i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_triangle_on_image: DrawTriangleOnImage } from 'null0';Draw a filled ellipse on an image.
type DrawEllipseOnImage = (i32, i32, i32, i32, i32, i32) => void;
import { draw_ellipse_on_image: DrawEllipseOnImage } from 'null0';Draw a circle on an image.
type DrawCircleOnImage = (i32, i32, i32, i32, i32) => void;
import { draw_circle_on_image: DrawCircleOnImage } from 'null0';Draw a filled polygon on an image.
type DrawPolygonOnImage = (i32, i32, i32, i32) => void;
import { draw_polygon_on_image: DrawPolygonOnImage } from 'null0';Draw a filled round-rectangle on an image.
type DrawRectangleRoundedOnImage = (i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_rectangle_rounded_on_image: DrawRectangleRoundedOnImage } from 'null0';Draw an image on an image.
type DrawImageOnImage = (i32, i32, i32, i32) => void;
import { draw_image_on_image: DrawImageOnImage } from 'null0';Draw a tinted image on an image.
type DrawImageTintOnImage = (i32, i32, i32, i32, i32) => void;
import { draw_image_tint_on_image: DrawImageTintOnImage } from 'null0';Draw an image, rotated, on an image.
type DrawImageRotatedOnImage = (i32, i32, i32, i32, f32, f32, f32, i32) => void;
import { draw_image_rotated_on_image: DrawImageRotatedOnImage } from 'null0';Draw an image, flipped, on an image.
type DrawImageFlippedOnImage = (i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_image_flipped_on_image: DrawImageFlippedOnImage } from 'null0';Draw an image, scaled, on an image.
type DrawImageScaledOnImage = (i32, i32, i32, i32, f32, f32, f32, f32, i32) => void;
import { draw_image_scaled_on_image: DrawImageScaledOnImage } from 'null0';Draw some text on an image.
type DrawTextOnImage = (i32, i32, i32, i32, i32, i32) => void;
import { draw_text_on_image: DrawTextOnImage } from 'null0';Draw a outlined (with thickness) rectangle on the screen.
type DrawRectangleOutline = (i32, i32, i32, i32, i32, i32) => void;
import { draw_rectangle_outline: DrawRectangleOutline } from 'null0';Draw a outlined (with thickness) triangle on the screen.
type DrawTriangleOutline = (i32, i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_triangle_outline: DrawTriangleOutline } from 'null0';Draw a outlined (with thickness) ellipse on the screen.
type DrawEllipseOutline = (i32, i32, i32, i32, i32, i32) => void;
import { draw_ellipse_outline: DrawEllipseOutline } from 'null0';Draw a outlined (with thickness) circle on the screen.
type DrawCircleOutline = (i32, i32, i32, i32, i32) => void;
import { draw_circle_outline: DrawCircleOutline } from 'null0';Draw a outlined (with thickness) polygon on the screen.
type DrawPolygonOutline = (i32, i32, i32, i32) => void;
import { draw_polygon_outline: DrawPolygonOutline } from 'null0';Draw a outlined (with thickness) arc on the screen.
type DrawArcOutline = (i32, i32, f32, f32, f32, i32, i32, i32) => void;
import { draw_arc_outline: DrawArcOutline } from 'null0';Draw a outlined (with thickness) round-rectangle on the screen.
type DrawRectangleRoundedOutline = (i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_rectangle_rounded_outline: DrawRectangleRoundedOutline } from 'null0';Draw a outlined (with thickness) rectangle on an image.
type DrawRectangleOutlineOnImage = (i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_rectangle_outline_on_image: DrawRectangleOutlineOnImage } from 'null0';Draw a outlined (with thickness) triangle on an image.
type DrawTriangleOutlineOnImage = (i32, i32, i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_triangle_outline_on_image: DrawTriangleOutlineOnImage } from 'null0';Draw a outlined (with thickness) ellipse on an image.
type DrawEllipseOutlineOnImage = (i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_ellipse_outline_on_image: DrawEllipseOutlineOnImage } from 'null0';Draw a outlined (with thickness) circle on an image.
type DrawCircleOutlineOnImage = (i32, i32, i32, i32, i32, i32) => void;
import { draw_circle_outline_on_image: DrawCircleOutlineOnImage } from 'null0';Draw a outlined (with thickness) polygon on an image.
type DrawPolygonOutlineOnImage = (i32, i32, i32, i32, i32) => void;
import { draw_polygon_outline_on_image: DrawPolygonOutlineOnImage } from 'null0';Draw a outlined (with thickness) round-rectangle on an image.
type DrawRectangleRoundedOutlineOnImage = (i32, i32, i32, i32, i32, i32, i32, i32) => void;
import { draw_rectangle_rounded_outline_on_image: DrawRectangleRoundedOutlineOnImage } from 'null0';gui (10)
Begin a GUI window. Returns false if the window is collapsed or closed - skip its contents, but still call gui_end_window.
type GuiBeginWindow = (i32, i32) => i32;
import { gui_begin_window: GuiBeginWindow } from 'null0';End the current GUI window.
type GuiEndWindow = () => void;
import { gui_end_window: GuiEndWindow } from 'null0';A static text label.
type GuiLabel = (i32) => void;
import { gui_label: GuiLabel } from 'null0';A block of wrapping text.
type GuiText = (i32) => void;
import { gui_text: GuiText } from 'null0';A checkbox. Returns the (possibly changed) state.
type GuiCheckbox = (i32, i32) => i32;
import { gui_checkbox: GuiCheckbox } from 'null0';A slider. Returns the (possibly changed) value.
type GuiSlider = (f32, f32, f32) => f32;
import { gui_slider: GuiSlider } from 'null0';Set the current layout row - the column widths (negative for flexible), and the row height.
type GuiLayoutRow = (i32, i32, i32) => void;
import { gui_layout_row: GuiLayoutRow } from 'null0';Finish building the GUI for this frame. Called automatically at the end of update if you do not call it.
type GuiEnd = () => void;
import { gui_end: GuiEnd } from 'null0';Draw the GUI to an image (0 is the screen).
type GuiDraw = (i32) => void;
import { gui_draw: GuiDraw } from 'null0';input (12)
Has the key been pressed? (tracks unpress/read correctly.)
type KeyPressed = (i32) => i32;
import { key_pressed: KeyPressed } from 'null0';Is the key currently down?
type KeyDown = (i32) => i32;
import { key_down: KeyDown } from 'null0';Has the key been released? (tracks press/read correctly.)
type KeyReleased = (i32) => i32;
import { key_released: KeyReleased } from 'null0';Is the key currently up?
type KeyUp = (i32) => i32;
import { key_up: KeyUp } from 'null0';Get current position of mouse.
type MousePosition = () => i32;
import { mouse_position: MousePosition } from 'null0';sound (7)
Load a sound from a file in cart.
type LoadSound = (i32) => i32;
import { load_sound: LoadSound } from 'null0';Play a sound.
type PlaySound = (i32, i32) => void;
import { play_sound: PlaySound } from 'null0';Stop a sound.
type StopSound = (i32) => void;
import { stop_sound: StopSound } from 'null0';Unload a sound.
type UnloadSound = (i32) => void;
import { unload_sound: UnloadSound } from 'null0';Speak some text and return a sound. Set things to 0 for defaults.
type TtsSound = (i32, i32, i32, i32, i32, i32, i32) => i32;
import { tts_sound: TtsSound } from 'null0';Create Sfx sound.
type SfxSound = (i32) => i32;
import { sfx_sound: SfxSound } from 'null0';Create Sfx parameters.
type SfxGenerate = (i32) => i32;
import { sfx_generate: SfxGenerate } from 'null0';tile (38)
Load a tilemap (a Tiled map, exported as JSON) from a file in cart.
type LoadTilemap = (i32) => i32;
import { load_tilemap: LoadTilemap } from 'null0';Unload a tilemap.
type UnloadTilemap = (i32) => void;
import { unload_tilemap: UnloadTilemap } from 'null0';Update a tilemap's animation timers (deltaTime is in seconds).
type TileUpdate = (i32, f32) => void;
import { tile_update: TileUpdate } from 'null0';Get the size of a tilemap, in tiles.
type TileMapSize = (i32) => i32;
import { tile_map_size: TileMapSize } from 'null0';Get the size of a single tile of a tilemap, in pixels.
type TileTileSize = (i32) => i32;
import { tile_tile_size: TileTileSize } from 'null0';Get a custom property of a tilemap, by name (PROP_NONE when there is no such property.)
type TileMapProp = (i32, i32) => i32;
import { tile_map_prop: TileMapProp } from 'null0';Get the number of custom properties on a tilemap.
type TileMapPropCount = (i32) => i32;
import { tile_map_prop_count: TileMapPropCount } from 'null0';Get a custom property of a tilemap, by index (PROP_NONE when out of range.)
type TileMapPropAt = (i32, i32) => i32;
import { tile_map_prop_at: TileMapPropAt } from 'null0';Draw a tilemap on the screen.
type TileDraw = (i32, i32, i32) => void;
import { tile_draw: TileDraw } from 'null0';Draw a tilemap on the screen, tinted by a color.
type TileDrawTint = (i32, i32, i32, i32) => void;
import { tile_draw_tint: TileDrawTint } from 'null0';Draw a tilemap on an image.
type TileDrawOnImage = (i32, i32, i32, i32) => void;
import { tile_draw_on_image: TileDrawOnImage } from 'null0';Render a whole tilemap to a new image.
type TilemapImage = (i32) => i32;
import { tilemap_image: TilemapImage } from 'null0';Get the number of layers in a tilemap. Layers are numbered depth-first, so the children of a group layer have their own indexes too.
type TileLayerCount = (i32) => i32;
import { tile_layer_count: TileLayerCount } from 'null0';Get the index of a layer of a tilemap, by name (-1 when there is no such layer.)
type TileLayerIndex = (i32, i32) => i32;
import { tile_layer_index: TileLayerIndex } from 'null0';Get the name of a layer of a tilemap.
type TileLayerName = (i32, i32) => i32;
import { tile_layer_name: TileLayerName } from 'null0';Get the kind of a layer of a tilemap.
type TileLayerType = (i32, i32) => i32;
import { tile_layer_type: TileLayerType } from 'null0';Get the size of a layer of a tilemap, in tiles.
type TileLayerSize = (i32, i32) => i32;
import { tile_layer_size: TileLayerSize } from 'null0';Get whether a layer of a tilemap is visible. Drawing a layer that Tiled marked hidden draws nothing.
type TileLayerVisible = (i32, i32) => i32;
import { tile_layer_visible: TileLayerVisible } from 'null0';Get a custom property of a layer of a tilemap, by name (PROP_NONE when there is no such property.)
type TileLayerProp = (i32, i32, i32) => i32;
import { tile_layer_prop: TileLayerProp } from 'null0';Get the number of custom properties on a layer of a tilemap.
type TileLayerPropCount = (i32, i32) => i32;
import { tile_layer_prop_count: TileLayerPropCount } from 'null0';Get a custom property of a layer of a tilemap, by index (PROP_NONE when out of range.)
type TileLayerPropAt = (i32, i32, i32) => i32;
import { tile_layer_prop_at: TileLayerPropAt } from 'null0';Draw a single layer of a tilemap on the screen.
type TileDrawLayer = (i32, i32, i32, i32) => void;
import { tile_draw_layer: TileDrawLayer } from 'null0';Draw a single layer of a tilemap on the screen, tinted by a color.
type TileDrawLayerTint = (i32, i32, i32, i32, i32) => void;
import { tile_draw_layer_tint: TileDrawLayerTint } from 'null0';Draw a single layer of a tilemap on an image.
type TileDrawLayerOnImage = (i32, i32, i32, i32, i32) => void;
import { tile_draw_layer_on_image: TileDrawLayerOnImage } from 'null0';Render a single layer of a tilemap to a new image.
type TileLayerImage = (i32, i32) => i32;
import { tile_layer_image: TileLayerImage } from 'null0';Get the gid of the tile at a column/row in a tilemap layer.
type TileGetTile = (i32, i32, i32, i32) => i32;
import { tile_get_tile: TileGetTile } from 'null0';Set 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.
type TileSetTile = (i32, i32, i32, i32, i32) => void;
import { tile_set_tile: TileSetTile } from 'null0';Draw a single tile from a tilemap on the screen.
type TileDrawTile = (i32, i32, i32, i32) => void;
import { tile_draw_tile: TileDrawTile } from 'null0';Get a copy of the image of a single tile in a tilemap.
type TileImage = (i32, i32) => i32;
import { tile_image: TileImage } from 'null0';Get 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.
type TileGidProp = (i32, i32, i32) => i32;
import { tile_gid_prop: TileGidProp } from 'null0';Get the number of custom properties on a tile of a tilemap.
type TileGidPropCount = (i32, i32) => i32;
import { tile_gid_prop_count: TileGidPropCount } from 'null0';Get a custom property of a tile of a tilemap, by index (PROP_NONE when out of range.)
type TileGidPropAt = (i32, i32, i32) => i32;
import { tile_gid_prop_at: TileGidPropAt } from 'null0';Get the number of objects on an object-layer of a tilemap.
type TileObjectCount = (i32, i32) => i32;
import { tile_object_count: TileObjectCount } from 'null0';Get an object from an object-layer of a tilemap.
type TileObject = (i32, i32, i32) => i32;
import { tile_object: TileObject } from 'null0';Get the index of an object on an object-layer of a tilemap, by name (-1 when there is no such object.)
type TileObjectIndex = (i32, i32, i32) => i32;
import { tile_object_index: TileObjectIndex } from 'null0';Get a custom property of an object of a tilemap, by name (PROP_NONE when there is no such property.)
type TileObjectProp = (i32, i32, i32, i32) => i32;
import { tile_object_prop: TileObjectProp } from 'null0';Get the number of custom properties on an object of a tilemap.
type TileObjectPropCount = (i32, i32, i32) => i32;
import { tile_object_prop_count: TileObjectPropCount } from 'null0';Get a custom property of an object of a tilemap, by index (PROP_NONE when out of range.)
type TileObjectPropAt = (i32, i32, i32, i32) => i32;
import { tile_object_prop_at: TileObjectPropAt } from 'null0';utilities (5)
Get system-time (ms) since unix epoch.
type CurrentTime = () => i64;
import { current_time: CurrentTime } from 'null0';Get the change in time (seconds) since the last update run.
type DeltaTime = () => f32;
import { delta_time: DeltaTime } from 'null0';Get a random integer between 2 numbers.
type RandomInt = (i32, i32) => i32;
import { random_int: RandomInt } from 'null0';Get the random-seed.
type RandomSeedGet = () => i64;
import { random_seed_get: RandomSeedGet } from 'null0';Set the random-seed.
type RandomSeedSet = (i64) => void;
import { random_seed_set: RandomSeedSet } from 'null0';