sprite

2D: a picture (one frame of a sprite sheet), animated by named clips. Positions in a 2D scene are world units on X (right) and Y (up). Scripts: self.play("run"), self.flip = true.

In scene text

sprite { image "…"  frame_width 1  frame_height 1 }

Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.

Fields 26

FieldTypeUnit / rangeWhat it does
imagetext—The image in Assets ("Sprites/hero.png"; a sheet of equal frames left to right, top to bottom), or "builtin:white" / "builtin:soft".
frame_widthnumberpx, 0 … 8192One frame's width in image pixels (0: the whole image).
frame_heightnumberpx, 0 … 8192One frame's height in image pixels (0: the whole image).
framenumber0 … 100000The frame shown while no clip plays (0 = first).
clipslist of text—Animation clips "name=first-last@fps", optionally " once": ["idle=0-3@6", "run=4-9@14", "jump=10"].
cliptext—The clip playing from the start (empty: just `frame`).
flip_xtrue / false—Mirrored left to right (facing the other way).
flip_ytrue / false—Mirrored top to bottom.
pivot(x, y, z)—The point of the frame on the position, as shares of its size: (0.5, 0, 0) bottom middle (feet), (0.5, 0.5, 0) centre.
layernumber-1000 … 1000Drawing order: higher in front. Tilemaps usually sit at 0, the hero at 10.
tintcolour (r, g, b)—Multiplies its colours (white keeps them).
opacitynumber0 … 10 invisible, 1 solid.
pixels_per_unitnumber0.01 … 100Image pixels per world unit (2: a 128 px frame is 64 units tall).
screentrue / false—Fixed to the screen (HUD icons): position in camera units from the top left, y down.
rimnumber0 … 4Rim light on the edges facing the scene's light (camera_2d light): 0 none, 1 strong. Makes flat art read as round.
rim_colorcolour (r, g, b)—The rim light's colour.
rim_widthnumberunits, 0 … 100How wide the rim light is.
shadingnumber0 … 1Darkens the edges facing away from the light (form shadow).
contact_shadownumberunits, 0 … 10000A soft shadow on the ground below, this wide (0 none); shrinks and fades as it rises.
glownumber0 … 20A soft pulsing glow behind it, this many times its size (0 none): coins, gems, magic.
glow_colorcolour (r, g, b)—The glow's colour.
sparklenumber0 … 60Twinkling glints on it, about this many a second (0 none).
y_sorttrue / false—Walk-behind depth: on the same layer, sprites draw by their feet (higher up the screen draws first, so the hero passes behind a tree above its base and in front below it). Ground tiles on the layer draw first.
sort_offsetnumberunits, -100000 … 100000Moves the sort point (feet) up from the position: a tree's trunk base, a table's front edge. With sort_with: negative draws just behind that object.
sort_withtext—
rooftext—
Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us
Download Arcwright free