The editor
Griff’s editor is where a game is made and played at once. These are its parts and what each does, starting with the shortcuts. Every command is listed in the command reference.
When you’re done with a project, File → Close Project puts the editor back as it starts, with no project open: it stops the game if one is playing, asks whether to save what’s unsaved (save, don’t save or cancel), and lets go of the scene, prefabs, scripts and everything the project held. Open or create a project to carry on.
Shortcuts
Section titled “Shortcuts”| Action | Shortcut |
|---|---|
| New project (pick a template) | Ctrl+Shift+N |
| Open project | Ctrl+O |
| Save scene | Ctrl+S |
| Undo / redo (in what you worked on last) | Ctrl+Z / Ctrl+Y or Ctrl+Shift+Z |
| Add Entity (find something to make by typing) | Ctrl+Shift+A |
| Create empty entity | Ctrl+Alt+N |
| Rename, duplicate, delete | F2, Ctrl+D, Delete |
| Play / pause / step (a paused game) / stop | F5 / F6 / F10 / Shift+F5 |
| Play fullscreen, and back to the editor | Alt+Enter |
| Play with 2 players (a window for player 2) | Ctrl+F5 |
| Breakpoint on the line (in a script) / remove them all | F9 / Ctrl+Shift+F9 |
| Stopped at a line: continue / step over / step into / step out | F5 (or F6) / F10 / F11 / Shift+F11 |
| Cut / copy / paste entities | Ctrl+X / Ctrl+C / Ctrl+V |
| Build game / small game | Ctrl+B / Ctrl+Shift+B |
| Mute the editor (kept between sessions) | Ctrl+Shift+M |
New Project takes a name, a folder and a template. Its template list scrolls (mouse wheel, or the arrow keys, Page Up/Down, Home and End once it has focus) and keeps the picked template in view, while the name, the folder and Create always show. The window can be resized, and like every editor window that opens centered (the Component Catalog, Controls, the Sprite Painter…), it opens no bigger than the work area of the screen it opens on, and wholly on it, whatever that screen’s size and scaling.
The Scene view draws the scene with the game’s own renderer, so everything looks as it does in the game (a match-3 or falling-blocks board’s tiles included), less what a camera adds: it isn’t dark or lit, has no screen effects, and shows parallax layers where they’re placed. Over that it draws what only the editor shows: camera frames, the reach of lights, colliders (a tilemap’s walls once its tiles are 6 pixels or more across), links and the selection’s handles. In the Scene view:
- Scroll to zoom.
- Middle-drag, right-drag or Alt-drag to pan.
- Click to select; Ctrl- or Shift-click adds one or takes it away.
- Drag from empty space to select everything inside the box (hold Ctrl or Shift to add to the selection).
- Drag to move: everything selected moves together, as one undo step (hold Ctrl to snap the one picked last to the grid).
- Drag the round handle above the selected entity to rotate it. With several selected, they all turn around the one picked last, as one undo step. Angles land on whole degrees; hold Ctrl to snap to 15 degrees.
- Drag the square handles on the selected entity’s corners to scale it, or on its edges to stretch it one way. It grows or shrinks around its position, along its own axes; with several selected, they all scale around the one picked last, as one undo step. Hold Shift to keep its proportions, and Ctrl to snap to tenths; otherwise the scale lands on hundredths.
- Press R (or View → Resize Handles) and the square handles resize the selected entity’s sprite instead, changing its Size rather than its scale, so a platform grows longer without stretching the coins on it. They resize the areas of its UI parts too, each outlined while they’re out: a button’s clickable area, a slider’s, bar’s, chart’s, text field’s or backlog’s Size, a save slot’s screenshot (keeping its opposite edge by moving its Picture Offset). Like the scale handles it grows around its position: the opposite edge moves out as much, and its colliders and children stay where they are. Press C (Collider Handles) for green handles on its box and circle colliders: a box’s edges and corners change its Size and Offset (the opposite side stays put), and a circle’s edge changes its Radius around its middle. Hold Shift to keep proportions, and Ctrl to snap sizes to half units (a circle’s radius to quarters); otherwise they land on hundredths. Each drag is one undo step. Press S to go back to scaling; the corner of the Scene view says which handles are out.
- The selected entity’s distances show as dashed circles around it: how far its light reaches, its sound is heard, it notices the player or shoots, a unit sees. Press D (View → Distance Handles) for a round knob on each circle, named beside it: drag one to change how far it reaches, as one undo step. Hold Ctrl to snap to half units; otherwise it lands on hundredths. A distance of 0 (often “anywhere”) has no circle; set it in the Inspector. With the same handles out, its offsets get knobs too (where a light shines from, where a shooter’s shots appear, at the end of a dashed line from the entity), and its directions are arrows out from it with a knob at the tip (which way a shooter fires or a bouncer launches): drag an offset’s knob to move it, a direction’s round to turn it. Ctrl snaps an offset to half units and a direction to the nearest of the eight ways. Agents drag them with
ui_invokeon the SceneView’sDragVector(“Shooter.Direction” and a point), asVectorslists them. - A selected mover’s path and a selected patrol’s or grid patrol’s route have knobs to drag, whichever handles are out. A Mover’s points are numbered from its start (where it’s placed: move the entity to move the start); drag one to move it, drag the small plus between two points (or past the last, or on the way back to the start of a loop) to add one there, and double-click one to take it off. A Grid Patrol’s points work the same way, but each lands in the middle of the cell it’s dropped on (counted in cells from the one it was placed on), and its pluses sit in cells too: the one halfway between two points, and the next along its last stretch. A Patrol’s Left and Right turns slide along its route; drag one back past where the patrol was placed to clear it, so it walks on until a wall or an edge on that side (a hollow knob at the end of a dotted arrow; drag it out to set it). Hold Ctrl to snap to half units; otherwise points land on hundredths (a grid patrol’s always land on cells). Each drag is one undo step.
- Arrows link the selection to the entities its fields name, and to it from the fields elsewhere that name it, each labelled with its fields: what a switch turns on and hides, what a camera follows, where a door leads, what a trigger drives (labelled with what it does there, “Score: Damage 2”). Where something comes from (a wire’s or a trigger’s From, what a counter, bar or text reads in its Track) points the other way, from it, labelled with what comes: a wire’s “On to Power”, a counter’s “Score”. A name several entities share links to each of them; one that matches nothing has no arrow (the Inspector flags it).
- Press F to frame the selection.
- Arrow keys nudge everything selected by half a unit (Shift for a tenth).
- Drop an image to create a sprite, or a prefab to place a copy of it (linked to the prefab: see Prefabs).
Arranging panels
Section titled “Arranging panels”Drag a panel’s tab (Hierarchy, Inspector, Assets, Output, Profiler, Tables, Simulations) to move it; a box shows where it will go before you let go. Drop it right by an edge of the window to dock it along that whole side, near an edge of another panel (or of the Scene and Game tabs) to dock it beside that, or on another panel’s tabs or middle to tab it with them. Drop it on the Scene and Game tabs, or in the very middle of the Scene view, and it goes among the documents: a tab beside the scene, prefab and script tabs that fills the whole area (a big Tables or Chart panel, say); drag its tab out again to put it back among the panels, or choose Put in the Documents on its right-click menu. Drop it anywhere else over the Scene view, or outside the editor, and it floats in a window of its own, which keeps the editor’s shortcuts; hold Ctrl to float it wherever it’s dropped, and press Escape to call a drag off. Drag the gutters between panels to resize them. Closing a floating window puts its panels back with the ones they start beside.
Drag a tab along its group’s tabs to put the panels in the order you want; the box shows the gap it will go in. Close a panel you don’t need with the × on its tab (it shows on the tab showing and under the mouse), a middle-click, or Close on its tab’s right-click menu, which can also Float it or Put Back where it starts out. View → Panels lists every panel: picking one brings it to the front, opening it again where it starts out if it was closed (Data → Tables and Game → Profiler do the same for theirs).
Saving layouts
Section titled “Saving layouts”The editor opens where you left it, with the panels where you left them, floating windows and all. View → Save Layout… saves where they are (the order of their tabs and which are closed too) under a name (an art layout, a level-building one, one for recording), View → Layouts switches to one, View → Delete Layout forgets one, and View → Reset Layout puts every panel back where it starts out, opening any you closed. Layouts are yours, not the project’s: they’re kept for every project you open. A floating window that was on a screen that’s since gone opens in the middle of the editor.
- Lock a backdrop or a big tilemap so clicks and box selections pass through it to what’s behind: click the lock by its row in the Hierarchy (it shows when you hover), or Entity → Lock. Everything inside a locked entity is locked with it. Locked entities can still be selected in the Hierarchy, and nudged or edited in the Inspector; the game ignores locking.
- Hide a pause menu, a dialogue box or a tilemap layer that covers the level while you work on what’s under it: click the eye by its row in the Hierarchy (it shows when you hover), press H in the Scene view or the Hierarchy, or Entity → Hide. The Scene view doesn’t draw it or anything inside it, and clicks and box selections go to what’s underneath. Hidden is saved with the scene, so it stays out of the way next time; the Hierarchy still selects it (and the Scene view outlines it while it’s selected), and the game shows it as usual.
In the Hierarchy:
- Type in the filter at the top to show only the entities whose names have it in them (
slimefinds Slime and Big Slime), with the entities they’re inside shown faintly and opened to show them. Escape (or the ×) empties it and puts the tree back as it was; it stays while you work, so new slimes show up in it. - Expand All and Collapse All (the double arrows by the + at the top) open every entity that has entities inside it, or fold them all shut to the top-level ones; the arrow keys and numpad + and − still open and shut one row, and numpad * opens a row’s whole branch. Every panel with a tree or sections that fold has the same two buttons: the Inspector beside its filter, the Assets panel on its toolbar (opening or folding every folder but Assets itself, in either view) and the script editor above the code (folding every class, method and comment). Agents run them as commands,
Hierarchy_ExpandAll,Inspector_CollapseAll,Assets_ExpandAll,Script_CollapseAlland so on. - Click to select; Ctrl-click adds or takes one away, Shift-click selects every row from the last one clicked (Ctrl+Shift-click adds them).
- Delete, duplicate, cut, copy and paste work on everything selected, as one undo step. Duplicates go right after their originals, pastes after the selected entity, and the copies end up selected.
- Drag a row onto another to put it inside, or above or below it.
- The lock by a row locks it in the Scene view (all of the selection, if the row is one of them). Locked rows keep their lock showing; rows a parent’s lock covers show it faintly.
- The eye by a row hides it in the Scene view the same way, and shows it again. Hidden rows keep a shut eye and a faded name; rows a parent’s hiding covers show it faintly.
- The Inspector edits them all at once, and the Scene view outlines them all.
The Assets panel
Section titled “The Assets panel”The Assets panel shows the files in the project’s Assets folder, and keeps up with them: whatever is copied in, renamed or deleted outside Griff shows up within a moment, with no import step. On the left is the folder tree, starting at Assets itself; click a folder to show what’s in it on the right as tiles, its folders first. A picture’s tile is a thumbnail of it (a sprite sheet or tileset whole), read once and again whenever its file changes, so painting over it shows straight away; everything else has an icon for its kind: scene, prefab, sound, music, script, font, table, simulation, folder or other file. The scene the game starts on has a small play mark. The slider above the tiles makes them bigger or smaller, the line beside Up says which folder is showing, and Backspace goes up a folder too.
- Double-click a tile to open it: a folder shows its contents, a scene or prefab opens in a tab, a script in its editor, a picture in the Sprite Painter, a sound plays, a table or simulation opens in its panel, and anything else in the program Windows has for it. Enter opens the tile picked.
- Drag a picture or a prefab’s tile into the Scene view to add it there, or onto an Inspector field that takes it.
- Drag a prefab’s tile onto a folder (in the tree, or its tile) to move it there; every copy stays linked. Dropped among the tiles, it goes in the folder showing.
- Right-click a tile for what it can do (a scene’s Set as Start Scene, a prefab’s Rename…, a sound’s Edit in Sound Maker…), then the New items, New Folder… (in the folder showing, or the one right-clicked) and Show in Explorer.
The two buttons at the top left switch between these tiles and the Tree view, every folder and file in one tree as Griff used to show them, where the same double-clicks, drags and menus work on the rows. Where the panel is narrower than about 420 pixels (docked down a side, say), the folder tree goes above the tiles rather than beside them, with a gutter between to drag. The view and the tile size are kept for every project. Agents reach it all with ui_inspect and ui_set on AssetsPanel (SelectedFolder, Items, TileSize, ViewMode) and ui_invoke (OpenAsync, GoUp, RenamePrefab, MovePrefab, NewFolder).
The Controls window
Section titled “The Controls window”Game → Controls… lists every input action the game has and the keys, mouse buttons and gamepad buttons that do each. Pick an action, click Press a Key and press one (or click the button with a mouse button) to add it; controller buttons come from Add Button with no controller needed, or Press on Controller with one. A key that another action also uses is pointed out, the × on a key takes it off, and Reset to Default puts one of Griff’s forty actions (Jump, Fire, Dash, Attack, Interact, Pause, EndTurn, Undo, Restart, Skip, Auto, Log, LeftFlipper, RightFlipper, Plunger, Nudge, Punch, Kick, Lane1 to Lane4, a rhythm game’s lanes, PanUp, PanDown, PanLeft and PanRight, which Camera Controls pans with, and Select, Command, AddToSelection, AssignGroup and Group1 to Group9, which Selection Controls and a strategy Commander select with, and Rotate, which a Line Tool turns with) back; they can be rebound but keep their names, since components use them. Add Action makes one of the game’s own (Shield), which scripts read with Input.WasPressed("Shield") and button prompts and Rebind buttons work with. Changes are saved in project.griff as you make them (only what differs from Griff’s defaults), reach a running game straight away, and go into exported games. The file changed outside the editor (in a text editor, by a pull or an agent) is read again by itself, as tables and prefabs are: its controls, step rate and start scene take over, in this window and a running game too (the editor saves its own changes as they’re made, so there’s nothing of its own to keep), and a file that doesn’t read leaves the settings as they were and says so in Output. A player’s own Rebind choice still wins over them, and a script’s Input.Bind over both; the window says when a choice you made while testing is in the way (Game → Clear Save Data clears it).
Keys while the game plays
Section titled “Keys while the game plays”While the game plays (not paused) and has focus, its keys are its own: F10 is not Step Frame then, which is for a
paused game, and any other plain Game menu shortcut (no Ctrl, Alt or Shift) goes to the game when one of its input
actions (Game → Controls…, or Input.Bind) is bound to that key. Three always win, even if the game binds them,
as the way out: Pause (F6), Stop (Shift+F5) and Play Fullscreen (Alt+Enter). Paused, or typing in a field or the code
(F9 breakpoints included), every shortcut works as usual.
Playing fullscreen
Section titled “Playing fullscreen”Game → Play Fullscreen (Alt+Enter) plays the game over the whole of the screen the editor is on, with no border, as a built game plays fullscreen: from the Game tab while it plays, or straight from the Scene view, playing the open scene. Alt+Enter again (or the menu item, ticked meanwhile) brings it back to the Game tab, still playing. The game’s view is the screen’s size, so its camera, HUD and mouse work as they would on a player’s screen. Pause (F6), Stop (Shift+F5) and the rest of the Game menu’s shortcuts work over it, except that the game keeps its own keys (below); paused, the timeline shows above the game to rewind it, and the other shortcuts work as in the editor’s window. A breakpoint, or a pause on an error, brings the game back to the editor to show what happened (Alt+Enter goes fullscreen again after Continue), and Stop does too. Alt+Tab away leaves it fullscreen behind the other window, and going back to the editor goes back to the game. Escape stays the game’s (most games pause with it), and F11 is Step Into, so the editor uses Alt+Enter where a built game uses F11.
The game’s own Fullscreen (a toggle set to it, or Game.Fullscreen in a script) follows it: it’s on while the game
is fullscreen, and setting it goes fullscreen and back. Play always starts in the Game tab, whatever the game saved last.
Agents play fullscreen with the Game_Fullscreen tool, or read and set IsFullscreen on PlayMode with ui_inspect and
ui_set. Over Play with Players, only the Game tab’s game (player 1) goes fullscreen.
Step rate
Section titled “Step rate”Game → Step Rate sets how many steps a second the game takes: 60 unless you change it, with 30, 120 and 240 in its submenu (the one in use is ticked) and any rate from 10 to 240 when you run it from an agent or give it a number. A faster rate gives fast bodies finer steps for more work a second; the screen is drawn smoothly between steps whatever it is. It’s saved in project.griff straight away (undo puts it back, without leaving the scene unsaved), reaches a running game, and goes into exported games; a script can still change Time.StepRate as the game runs. A game fast-forwarded (a Game Speed or Time.FastForward) takes that many more steps of the same length a frame; Step Frame still takes one.
Game → New Random Numbers Each Game (ticked when on) makes every new game start its Rand numbers from the clock, so its rolls differ each Play. It’s off unless you turn it on: then every game one running editor (or exported player) makes starts from the same numbers, which is repeatable but means the same offers or loot come up each Play until you restart the editor. It’s saved in project.griff and goes into exported games; rewinding still draws the same numbers again, and Rand.Seed in a script still wins.
Game → Save Version sets the version of the game’s saved games (0 to begin with), saved in project.griff and given to the game played here and exported: each saved game keeps the version it was saved by, so a later version of the game can bring older saves up to date (see Saves that outlast updates).
The Profiler
Section titled “The Profiler”The Profiler panel (beside Assets and Output, or Game → Profiler) shows how the game playing in the Game tab runs. Its graph has a bar for each of the last ten seconds of frames, newest on the right: how long the frame was, and from the bottom, what of it the game’s steps took (scripts, physics and everything else that moves it on; orange), building the picture to draw (blue) and drawing it (green), the rest being time to spare, with dashed lines where a frame is as long as 60 and 30 frames a second allow (the graph’s height doubles to fit a long frame). Above it are the frame rate over the graph’s frames, its 1% low (the rate of its slowest 1% of frames), the average and worst frame, what the steps, building and drawing took on average, and the garbage a frame makes on average (memory the game takes for a moment and lets go, which the garbage collector has to clear up, holding up a frame now and then) with how many times the collector ran. Beside it, Costs a frame lists what each kind of script (all the Bunny scripts together, their Update, FixedUpdate and LateUpdate), each of the game’s own steps (Physics, Animations, Particles, Movers…: Griff’s components at work), each system a script added, each part of building the picture, drawing it, and the editor’s own work (its rewind snapshots and its panels following the game, which an exported game doesn’t do) cost a frame on average, in milliseconds, and the garbage each makes, the most first, with a bar for its share of the frame’s work; what takes next to nothing and makes no garbage is left out. Building the picture is split by what’s drawn (marked Build): each kind of component that draws (Sprite, Tilemap, Text, ParticleEmitter, a script’s own drawing), with its entities’ upkeep (placing each between steps, what it sorts by), each system’s Draw (Griff’s own too, like Tactics or Strategy, named for the system), Sorting (putting the draws back to front; for a big scene built across the cores, merging the chunks’ runs and putting each draw in its place), Lights (which lights reach the view and their shadows, in the dark), Clearing (emptying the last frame’s draws to reuse them; a big scene’s frame overwrites them instead), Camera, Systems (getting the frame ready for them) and Screen (fades, flashes and debug shapes over it all); together they’re the whole build, timed a run of one kind at a time, so a crowd of 50,000 sprites costs a pair of timestamps (built across the cores, its sprites are timed as they’re drawn on all of them at once: the time the frame waits for them). A crowd of scripts (see Crowds, under Scripting) is timed as its kind the same way, and the garbage counted includes what the worker threads make. Then come how many entities the scene holds, how many are active (enabled, with every parent enabled: what the game runs and draws), how many things were drawn in the newest frame, and how many of each component the active entities have, the most first, counted twice a second. The game is timed only while the panel is on screen and recording, so with its tab hidden it costs nothing; Record pauses the recording to hold the graph still while the game plays on, Clear starts it afresh, and each Play starts a fresh graph. Agents show it with the Game_Profiler tool, pause and clear it with Profiler_Record and Profiler_Clear, and read it with ui_inspect on ProfilerPanel (Summary, Costs, Counts). A script or tool timing frames of its own sets a FrameProfiler as Game.Profiler: whatever runs the game adds each frame it shows to it, and while it’s set the game times its steps, scripts and systems, and the parts of its picture, into it (FrameProfiler.Costs; FrameCostKind.Build for the picture’s parts); with none set, the game takes the same steps it always does, timing nothing.
The BunnyMark template
Section titled “The BunnyMark template”The BunnyMark template is a benchmark rather than a game: bunnies pour in from the top left and bounce about the view, more and more while the game keeps up 60 frames a second, until it has found how many this computer holds there. Each bunny is an ordinary entity, a Sprite and a Bunny script (falling, bouncing off the floor and the sides), copied from the Bunny prefab, so the count says how much an ordinary game can put on screen. Bunny is a crowd script ([Crowd]: it changes nothing but its own bunny), so the bunnies’ scripts run across the cores, as their sprites are drawn. The BunnyMark script starts with Start Count (100) and times each count for Window (1) second: while the frame rate (the frames the screen shows a second, from Time.DrawnFrames and Time.RealTotal; the game itself takes 60 steps a second however many frames are drawn) keeps up Target Fps (a frame missed in the second still counts), it adds Growth (0.5, half as many again); when it falls behind, it takes the last lot away and tries half the step, until a step would add less than Precision (0.02). Then it holds the count for Hold Seconds (10, after two to settle), timing every frame the screen shows: the frame rate, its 1% low (the frame rate of the slowest frames, from the time 99 frames in 100 came within: a frame that misses the screen’s beat takes twice as long, so a low under the frame rate means some did) and the garbage collections meanwhile. It shows Holds 1,015 bunnies at 60 fps (best 1,147); held for 10 s: 60 fps, 1% low 60 fps, 0 garbage collections and saves them (held, best, fps, low and collections). Hold Count holds that many bunnies straight away rather than finding the count, to check a count (Held 50,000 bunnies for 10 s: …). The frame rate and the count show in the top left all the while, and Space runs it again. It’s silent, so it times nothing but itself. While it plays, entity_get shows its count, held, fps, low, collections and isDone.
Editors in tabs
Section titled “Editors in tabs”The Sprite Painter, the Sound Maker, the Clip Editor, the Move List and the Dialogue Editor open in tabs of their own beside the Scene and Game tabs (as prefabs and scripts do), not in windows, so they have the whole middle of the editor with the Hierarchy and Inspector still beside them. The Sprite Painter and the Sound Maker open a tab for each picture or sound (opening one that’s open brings its tab forward); the Clip Editor, Move List and Dialogue Editor have a tab each that follows the selection. A tab with changes that aren’t saved has a dot in place of its ×; closing it (the ×, a middle-click, or the editor’s own Close button) asks whether to save them, as a scene’s does, and so does closing the project. Click the Scene tab to see the scene again; a tab that’s smaller than its editor needs scrolls. Agents reach each by its tab’s name (“Sprite Painter: slime.png”) with ui_roots, ui_inspect and ui_invoke, and editor_screenshot takes a picture of one.
Painting sprites and tilesets
Section titled “Painting sprites and tilesets”Art → New Sprite opens the Sprite Painter, for pixel art, in a tab of its own. Paint with the Pencil (B), Eraser (E), Fill (G), Line (L), Rectangle (R) and Ellipse (O), or pick a color off the picture with the picker (I, or Alt-click); right-dragging erases. Mirror (M) paints both halves at once, and Ctrl+Z (or Edit → Undo) undoes a stroke at a time. Colors come from a palette (Jam, Earth, Handheld or Grays) or any #RRGGBB. Pick a starting point (Creature, Ship, Item, Ground or Bricks) for a fresh one made from scratch, and Another for a different one. A sprite is frames played in order: Add Frame copies the one you’re on, Onion skin shows the frame before underneath, and the preview plays them at the Speed you set. Art → New Tileset (or the Tileset button) paints a grid of tiles instead, numbered from 0 as a tilemap’s rows name them, with a preview that repeats the tile to check it joins up. Save puts it in Sprites/ or Tiles/ as a PNG that remembers its frames or tiles, so it opens again exactly as it was made. Every image field in the Inspector (a sprite’s or tilemap’s Image, particles, first-person weapons) shows a preview, a list of the project’s pictures, and a Paint button that opens the painter on its picture (or a new one) and puts each save on it in one undo step: a sprite takes its Columns and Rows and an Animation to play several frames, a tilemap its tile grid, and a colored placeholder box loses its tint. Art → Paint Selected does the same for the selected sprite or tilemap. Double-click a picture in the Assets panel to paint over it; saved changes show in the scene and the running game straight away.
Animation clips
Section titled “Animation clips”Art → Animation Clips opens the Clip Editor in a tab beside the scene. It follows the selection, listing the selected entity’s clips (an Animation’s Clips) with each one’s frames, speed and whether it loops, and plays the one you pick in a preview, cut from the sprite sheet the way the game cuts it, with a strip of its frames underneath. Pause and step through them (Space, Left and Right, or click a frame in the strip); a clip that plays once stops on its last frame. Add makes a clip (the first takes the animation’s own frames, later ones the frame after the last clip’s), Rename (F2) and Remove (Delete) change the one picked, and Start With This makes it the clip the game starts playing (marked starts); each is one undo step, and the clip the game starts with follows a rename. Until it has clips, or when the game starts without one, the list shows the animation’s own frames (its First Frame and Frame Count), which is what plays then. Selecting a sprite with no animation offers Add Animation, which plays every frame of its sheet. The whole sheet is shown under the preview with the picked clip’s frames marked: drag across frames to make the clip play those (a click picks one), or Shift-click to stretch it to reach a frame. Speed (frames a second) and Loops set how it plays; a clip that leaves them out uses the animation’s (the editor says so), and setting them here gives it its own. For the own frames, all three set the animation’s First Frame, Frame Count, Frames Per Second and Loop. Each change is one undo step, and the Clips field in the Inspector shows the text it writes. Onion skin (O), under the preview, shows the frame before faintly underneath.
A genre can add what it draws over the frame and lists beside it: for fighting games, Boxes lists the hitboxes and hurtboxes of the frame showing (a Hitboxes’s), drawn over the picture: Hitbox (H) or Hurtbox (U) and drag to draw one, snapped to the picture’s pixels (Draw circles, C, for circles); Select (S) to pick one, move it and drag its corners to resize it, and set its Damage, Knockback, Stun and Group (a hurtbox’s Multiplier); Delete removes it. Copy From Previous Frame (Ctrl+D) gives the frame the boxes of the one before, and with Onion skin on, that frame’s boxes show dashed. Each change is one undo step (Ctrl+Z and Ctrl+Y work in the Clip Editor too), the first box adds a Hitboxes, and renaming or removing a clip takes its boxes along. See Fighting games.
A fighter’s moves have an editor of their own: select it and choose Entity → Edit Moves… for the Move List, its moves with their inputs drawn as arrows (↓↘→ P), each move’s motion picked from a list of the common ones (quarter circles, dragon punches, charges) and its button, clip, frame data (drawn as a bar, with what it leaves on hit and on block), height and cancels. See The Move List.
A rhythm chart has a panel of its own: choose Entity → Edit Chart and the chart (or select Note Lanes, which shows theirs) for the Chart panel (at the bottom, beside Tables), the chart on a timeline in its lanes over the song’s bars and shape. Record and tap the lanes’ keys along to the song to put notes in, snapped to a grid and allowing for your audio offset, each take one undo step; click, drag and right-click the timeline to add, move, lengthen and take out notes; Play to hear it back with a tick on each note. See Recording a chart.
Making sounds and music
Section titled “Making sounds and music”Audio → New Sound opens the Sound Maker in a tab of its own. Pick a starting point (Coin, Jump, Shoot, Explosion, Power Up, Hit, Blip or Random) and it makes a fresh retro sound of that kind and plays it; click again for another. Mutate nudges every setting for “like that, but different”, the Wave buttons change its tone, and the sliders shape it (its envelope, pitch slides, vibrato, a “ba-ding” change of pitch, repeats, a phaser and filters), playing it after every change. Save puts it in Sounds/ as a WAV. Audio → New Music (or the Music button) writes a looping tune instead: pick a Mood (Bright, Chill, Tense, Spooky or Heroic: each has its own scale, chords, beat and accompaniment), then New Tune for another in the same mood, and set its Tempo, Bars, Lead sound and which Parts play (melody, bass, chords, drums). It’s saved in Music/, and its end runs straight into its start, so it can play under a level forever. Sounds made here remember how they were made: double-click one in the Assets panel to play it, or right-click it and choose Edit in Sound Maker to tweak it and save over it (heard straight away, even in the running game). The Platformer, Top-down, Isometric, Arcade, Strategy, Shooter, Sandbox, Contraption, Multiplayer, Puzzle, Match-3, Falling Blocks, Physics and Pinball templates come with their sounds and a theme tune made this way, already hooked up: jumps, coins, swings, hits, explosions, checkpoints, doors, switches, springs, menu buttons, orders, digging, building, crafting, the tools, crates sliding onto their marks, gems clearing, blocks turning, locking and clearing, a slingshot stretching and twanging, wood cracking, glass shattering, stone crumbling, grubs popping and stars pinging in, and flippers, bumpers, a plunger, a bell, the multiplier going up, an extra ball, a new best and the game over.
Adding entities
Section titled “Adding entities”The Entity menu sorts what it makes into categories, a submenu each: Basics (an empty entity, a sprite, text, a camera), Characters (platformer, top-down and grid players, a grid enemy, an attack for the selected entity), Gameplay (a turn order), Level (a tilemap, a room, a ladder, a switch), Physics (a crate, a spring), UI (a button, toggle, slider, choice, bar, chart and panel), Story (a dialogue box), Audio (music, a looping sound, a sound that plays on a message, a beat clock) and Lights and Effects (a light, particles, weather), then Genres, with one for each genre module that makes something (Adventures, Cards, Dungeons, Falling Blocks, Match-3, Puzzles, Tactics), so a new module never makes the menu taller. Each item has an icon, and hovering it says in a line what it makes. Right-clicking the Hierarchy has the same submenus. What’s made goes inside the selected entity (on empty space in the Hierarchy, nothing is selected, so it goes at the top) and is selected.
Entity → Add Entity… (Ctrl+Shift+A, or the + at the top of the Hierarchy) opens a searchable list of all of it: type a few letters and the best match is picked (enemy finds Grid Enemy), and words find things by their category or by what they do too (audio lists the sounds, waterfall finds a Sound Source). Up and Down move through it, Enter (or a click) makes the picked one, and the line under the list says what it is (the info mark on a row shows its description when you rest the mouse on it). What you made lately, from the menus or the list, is listed first under Recent, kept between sessions. Something that needs a selection (Add Attack gives the selected entity one) is faded until there is one.
Where something is listed comes from the code: each EntityPreset (Griff’s own and every module’s) has a [Category("...")], the way a component’s does in the catalog, and its one line is the first sentence of its /// summary, which is also what agents read about its tool. The commands keep their ids, so the tools are the same (Entity_CreateGridEnemy), and each tool’s description says where it’s listed (“Menu: Entity > Characters > Grid Enemy”, “Menu: Entity > Genres > Match-3 > Match Board”).
Adding components
Section titled “Adding components”The Inspector’s Add Component opens a list of every component by category with a search box ready: type a few letters (patr) and the one you mean is picked, Up and Down move through what’s left, and Enter (or a click) adds it. Along with it come whatever it needs that the entity doesn’t have yet, as one undo step: a Patrol brings a BoxCollider and a Body, and the line under the list says so before you press Enter. A component is described only when you ask: the picked one’s description is in a line under the list, and the small info mark on each row shows it when you rest the mouse on it, so no tooltip pops up over the names while you look for one. Components that need something show what in the list (“Needs Body, Collider”). A component whose entity lacks something it needs (a Platformer Movement left without its Body) is flagged under its name, “Needs a Body, which Player doesn’t have”, with a button that adds one; a need any kind will fill, like a collider, adds a Box Collider. Removing a component that another one there needs asks first and says which (“Platformer Movement needs it on Player, and won’t work without it”), and the remove button’s tooltip says it too; a second collider can go without asking, since either one will do. Agents see the same: entity_get says what each component needs and lacks, and removing a component with entity_update notes what that left without something it needs.
Component catalog
Section titled “Component catalog”Next to Add Component (the quick list), the Inspector’s Catalog button (or Browse Catalog… at the bottom of the list, which opens it on what you’d typed) opens every component by category, searchable, with what it does, what it Requires on the same entity (checked against the selected entity, with what’s missing marked), what it Works well with, what it’s Needed by, and each property’s kind, starting value and description. Names in the text are links to that component. Add puts it on the selected entity (on each of them, with several selected) along with any requirement it’s missing (a Patrol brings a Body and a BoxCollider), as one undo step. Scripts are listed too, described by their /// comments.
In the Inspector, components and their choices read as words (Platformer Movement, Ping Pong), and every field explains itself: hover its name for what it does and in what units (a component’s name, and each choice in a list, explain themselves the same way). Drag a number’s name sideways to change it, or a vector’s X, Y and Z: the further from 0 it is, the faster it goes, so an Acceleration of 70 reaches 90 in a short flick while 0.5 still moves by hundredths (Shift for fine steps, Ctrl for coarse; a click without dragging puts you in the box to type). While typing in a number, Up and Down or the mouse wheel nudge it by a tenth of its size (1 for 70, 0.1 for 7), and a run of nudges is one undo step. Fold a component’s section shut with the arrow by its name and it stays shut on every entity, and the next time the editor starts, until you open it again; Collapse All beside the filter folds every section and subheading the selection shows at once, and Expand All opens them all. Big components put their fields under subheadings that fold the same way (a Platformer Movement’s Jump, Walls, Dash, Control and Sounds and Effects; a State heading for what the game keeps count of, like a turn order’s round), and fields only used while something else is on fade until it is: Dash Speed with Dash off, Wall Slide Speed with Wall Slide off, a button’s Panel unless its Action opens one. A faded field’s name says what it waits for, and it can still be set ahead of time. While the game is playing, typing in the Inspector doesn’t reach the game; click the game to give it the keyboard back.
Colors, Transforms and finding fields
Section titled “Colors, Transforms and finding fields”Click a color field’s swatch for a picker: drag in the square for how strong and how bright, along the strips for the hue and how see-through it is, or type a hex. Under them are the Sprite Painter’s palette (choosing another palette there changes the painter’s too) and the colors you picked lately in any color field, kept for next time. The color changes as you drag, on every selected entity, and each drag or pick is one undo step. The Transform shows in 2D: Position and Scale in X and Y, and Rotation as one angle (degrees, counterclockwise). The 3D switch on its header shows Z as well, for every entity and next time; in 2D, a Z that isn’t at rest is named under the Transform (“Also set in 3D: Position Z 2”), since it still counts (a position’s Z orders what’s drawn). Type in the filter at the top of the Inspector to show only the fields whose names have it in them (speed shows Speed, Dash Speed and Wall Slide Speed and nothing else), or all of a component’s or subheading’s when its name has it, folded or not; components with no match are left out. The filter stays as the selection changes, so you can step through entities comparing one field; Escape empties it.
A component’s menu
Section titled “A component’s menu”Right-click a component’s header in the Inspector for Reset to Defaults (every value back to what a new one starts with), Copy Values and Paste Values (onto the same kind of component, on this entity or another), Move Up and Move Down (its place in the entity’s list; the Transform stays first) and Remove Component. Each works on every selected entity at once, as one undo step; one that can’t be used is greyed and says why. Each is a command (Component.Reset, Component.CopyValues, Component.PasteValues, Component.MoveUp, Component.MoveDown, Component.AddToAll, Component.Remove) that agents call with the component’s name ({"entity": "Hero", "component": "Health"}), and a field a prefab copy changed has Revert to Prefab and Apply to Prefab the same way (Component.RevertField, Component.ApplyToPrefab, with {"field": "Pickup.Amount"}).
One undo
Section titled “One undo”Everything you edit has its undo: the scene or prefab (the Scene view, the Hierarchy, the Inspector and the Clip Editor change it), a table, a simulation, a rhythm chart and the sprite sheet in the Sprite Painter. Edit → Undo and Redo (Ctrl+Z, and Ctrl+Y or Ctrl+Shift+Z) go to whichever you worked in last: click into the Tables panel or change a cell and they undo the table; click into the Scene view or the Hierarchy, or change the scene, and they undo the scene. The status bar says what was undone, and where (“Undid Set Fireball’s Damage in the Spells table”). Working in a tab with a document of its own (the Sprite Painter, a table) makes it the one they go to; a panel’s Undo and Redo buttons undo its own document. Typing in a text box or the script editor undoes the typing, as anywhere. Agents call Edit_Undo and Edit_Redo the same way (ui_inspect ActiveDocument says which document they go to, and what they’d undo).
Naming entities
Section titled “Naming entities”Fields that name another entity (a Follow’s Target, a Dialogue’s Box, a Wire’s From, a door’s Prompt) have a button listing the scene’s entities, indented as in the Hierarchy: pick one to name it (type a few letters to narrow the list, Up and Down to move, Enter to pick), or drag an entity from the Hierarchy onto the field. Fields that name several, separated by commas (a Switch’s Targets and Hides), add each one picked or dropped, and picking a ticked one takes it out again; with several switches selected each keeps its own other names. An attack’s Hitbox and a panel’s First control list only what’s inside the entity. Typing a name still works, for something that isn’t in the scene yet.
Renaming an entity (in the Hierarchy or the Inspector) renames it in every field that names it, as one undo step: rename the player to “Hero” and the camera still follows it, the enemies still chase it. A field keeps its name when it means another entity by it, as the game finds it: one inside its own entity (each lever’s own Hint), or any of several with that name. A name that matches nothing in the scene (a typo, or something deleted) is shown in yellow with a warning sign by it, saying which names it can’t find; a prefab’s name counts as a match, since the game can bring one in.
Naming prefabs, scenes, actions, layers and messages
Section titled “Naming prefabs, scenes, actions, layers and messages”Fields that name something else the project has are picked from a list of those too, flagged in yellow when they name something it hasn’t: a Spawner’s or Shooter’s Prefab and the effects things leave behind (a Pickup’s Effect, a Weapon’s Projectile, a worker’s Builds) list the project’s prefabs, a Door’s or Button’s Scene its scenes, an Attack’s or Shooter’s Action and a Panel’s Open On the input actions (every game’s own and those added in Game → Controls), the Layers fields (who can collect a pickup, use a door, work a switch) the collision layers colliders and tilemaps are on, here or in any scene or prefab, and message fields the messages the project sends and listens for, each marked “sent”, “heard” or both (a Pickup’s Message, a Counter’s, a Health’s Death Message, a dialogue’s [send] tags, and the names scripts give Game.Send and On). A counter listening for a message nothing sends is flagged, and so is a message sent that nothing listens for (unless it’s still the component’s own, like a Faction’s “Defeated”). A collider’s own Layer is where layers come from, so it’s listed but never flagged; a new layer or message is typed in (the list offers to use it as typed). Fields naming several, like Layers, tick each one picked and take it out again when picked twice. Prefabs and scenes can be dropped on their fields from the Assets panel too. Every list, entities, images and sounds included, has a search box ready as it opens: type to narrow it. Agents open a field’s list with ui_set (IsPickerOpen, its Picker.Search) and pick with ui_invoke (Pick), and scene_tree and entity_get report the names that match nothing, as component_describe says what each field names.
Items, flags and kinds
Section titled “Items, flags and kinds”While the game plays, a mistake in a component’s data that only shows as it runs (a prefab it spawns that won’t load, a table row it names that isn’t there) is flagged under that component’s heading, said once in Output, and listed by scene_tree for agents; the game goes on, and the flag goes when it stops.
Three more kinds of name are picked from what the project has, the same way. A door’s or switch’s Key (and a counter’s Item) lists the items something gives: a pickup’s Item, or an item a script adds with inventory.Add("Key"). A door’s or switch’s Needs Flag lists the flags a trigger’s Set Flag or Clear Flag, a dialogue’s [set] or [clear], or a script’s Game.SetFlag sets, each also with “not” in front, for while it isn’t set. A goal’s Accepts lists the kinds the crates say they are (a pushable’s Kind), and only crates’ kinds: a card’s kinds are another list; a drop target’s Accepts lists the draggables’ Kinds the same way. An item nothing gives, a flag nothing sets or a kind no crate is gets flagged in yellow. An inventory’s own Items count as given, and what its Item Uses send counts as sent.
Names in the save data are picked the same way: a button’s Needs Saved and Saved Scene, a Table Values’ Saved Row and a Stars’ Saved list the names something keeps a value under (a slider’s, toggle’s or choice’s Save As, a counter’s Save Best As, an inventory’s, a level goal’s .Stars and .Best, a script’s SaveData.Set("best", ...)), and the flags, which are saved there too; one nothing saves is flagged. A turn taker’s, a strategy unit’s, a fighter’s hitboxes’ or a Team’s Team, a turn order’s Computer Teams and Current, and a player spawn’s Team list the teams the scene has, whoever names them (a turn order’s Teams, a strategy faction, a Multiplayer, a Team; flagged when there’s no such team), and a button’s Slot the slots the save slots and buttons name.
Fields with editors of their own
Section titled “Fields with editors of their own”Some fields used to take something written in a little language of its own, typed from memory. Now each has an editor made for it under the value as typed (which still works, and pastes):
- Dice (a battler’s Damage Roll and the rest of its rolls, a bump attack’s Damage Roll, damage on touch’s Amount Roll): how many dice, their sides from the tabletop set, and what’s added, with what they roll (“Rolls 3 to 9, 6 on average”). Dice of two kinds, like
1d8+1d6, show as typed. - Points (a mover’s and grid patrol’s Points, a polygon collider’s Points): a row each with X and Y (whole cells for a grid patrol), a button to move one up the list and one to take it out (down to the fewest it needs: one to go to, three corners), and Add Point, a step on from the last. The Scene view’s knobs drag the same points.
- Tile numbers (a tilemap’s Background, One Way, Ladder and Slope tiles, a dungeon generator’s Wall Tile and Floor Tile): the tileset button beside them opens the map’s tilesets, each tile shown: click one to add it or take it out (or, for a single tile, to pick it). They’re written as numbers and ranges,
1-3, 8. - Animated Tiles and Auto Tiles: a row a run, from which tile to which and how fast, with its frames (or an auto-tile run’s 16 pieces) shown; Add Run puts one after the last.
- More Tilesets: a row each, its image picked from the project’s, its tiles across and down, and the numbers its tiles get (“Tiles 100-115”); pick an image in the list under them to add it, cut up as it was painted.
- Clips (an animation’s): a row each, its name, first and last frame, speed (0 for the animation’s own) and Once; Add Clip puts one after the last clip’s frames, and Clip Editor shows them playing (Art → Animation Clips). The animation’s Clip, the one it starts with, is picked from its clips, and flagged when it names none of them.
- Spawns (a dungeon generator’s): a row a prefab, picked from the project’s (in yellow when there’s no such prefab), with the fewest and most of it; pick a prefab in the list under them to add it.
- Directions (a shooter’s and a bouncer’s Direction): a compass of the eight ways beside its X and Y; with Distance handles out, an arrow in the Scene view.
- A Text’s Value, while it shows an Output: buttons put in the output (
{0}), what it’s out of ({1}), one decimal or three digits, and it says how it reads now (“Reads now: HP 5 / 5”). - Text with holes (a counter’s, turn order’s and choice’s Format, a save slot’s): a button for each hole the game fills in, its tooltip saying what it is (
{0}the count,{1}the best;{slot},{date},{line}), and how it reads now (“Reads now: Score: 12”, “Reads now: Player’s turn”). A hole it hasn’t got ({5}) or a brace left open is flagged. - Number formats (a wire display’s Format): the common ones to pick (whole numbers, one or two decimals, three digits, thousands with commas, a percent), and a number written that way (“Shows 3.14”).
- Lists of names (a turn order’s Teams, a Multiplayer’s Teams, a choice’s Options): a row each to rename, move up and take out, and Add Team (or Option); a name given twice is flagged.
- Pieces (a falling board’s): a count for each of I, J, L, O, S, T and Z, each with its shape drawn: how many of it come in a round.
- With (a trigger’s and a button’s, for the action its Do names): a number box for an amount, a tick for true or false, or a list of the flags (Set Flag, Clear Flag) or scenes (Load Scene) it takes, as the action wants, saying under it what it takes (“Damage takes a number (amount); empty uses 1.”). A value the action can’t take is flagged.
- Items (an inventory’s): a row each, the item picked from those the game gives or typed, and how many; and its Item Uses, a row an item with what it does under it, a row each: heal so many, spawn a prefab or send a message, picked from the project’s.
- Collect (a match board’s): a row a gem, with its picture and how many; click a gem under them to add it or take it out. Its Gems are tiles clicked off the tileset.
- Sets (a Table Values’): a row a line, the property picked from the entity’s components (Health.Max) and the column from the table’s (or the one named like it).
- A wire’s Input: picked from its entity’s inputs (Power, Show, a gate’s A and B, a lamp’s On…) and actions. A thruster’s Direction has the compass.
- A dialogue’s Lines: as typed, what they hold (“5 lines: 2 choices, 1 part”), and Dialogue Editor, which builds each line from lists (see The Dialogue Editor); a go-to or choice going to a part that isn’t there is flagged.
- Offsets in the Scene view (Distance handles): a grabber’s Hold Offset, a save slot’s Picture Offset and Text Offset.
Each change is one undo step on every selected entity; a value that doesn’t read (dice that aren’t dice, a point missing its Y) is flagged under it. Script fields get the same editors by marking them as Griff’s are: [Dice], [Points], [TileNumbers], [TileAnimations], [AutoTiles], [Tilesets], [Clips], [ChoiceOf(nameof(ClipNames))], [PrefabCounts], [Direction], [OutputFormat(nameof(Output))], [Format("{0} the price")], [NumberFormat], [NameList], [LetterCounts("ABC")], [ItemCounts], [ItemUses], [TileCounts], [ActionValue(nameof(Do))], [DialogueLines], [TableSets(nameof(Table))], [Pairs] and [ListRows] (and [PlainText("why")] where typing is right, [Offset] for a knob in the Scene view, [Resizable] for resize handles on a size); [Names(NameKind.Item)], NameKind.Flag, NameKind.Kind and NameKind.Saved for the pickers, also on an action’s value (void Unlock([Names(NameKind.Flag)] string flag)). Agents get the same: component_describe says what each of these fields takes (and lists the items, flags and kinds there are), scene_tree and entity_get report values that don’t read, and each editor is the field’s Editor in the Inspector, for ui_inspect, ui_set (a dice editor’s Count) and ui_invoke (a points editor’s Add or Set, a tile editor’s Toggle, a direction’s Point).
What every field of the core components (Basics, Rendering, Physics, Movement, Combat, Level and Audio) and of the gameplay and UI ones (Gameplay, UI, Story, Wiring, Data and Multiplayer) gets is listed in the editor’s tests (FieldEditorAuditTests): pickers for names, sounds and images, these editors for the little languages, and plain boxes only for numbers, toggles, choices, colors and the text marked [PlainText] (see Every field has an editor): the few names a component gives itself (a battler’s Title, a speaker’s Name), words it shows (a toggle’s On Text, a scoreboard’s Title) or what the game writes (a backlog’s Lines). FieldEditorTemplateTests draws every editor from its template with the editor’s theme loaded, so a template that would fail in the Inspector fails there.
The genres’ fields
Section titled “The genres’ fields”The genre components’ lists are rows too, each row a few cells: a box, a picker (the small list beside a box offers what the project has; a name it has none of is yellow), a number to drag, a tile with its picture and the tileset a click away, a picture or a sound from the project’s, a color with the palette to pick from, or a list of parts with how many of each. A row’s up arrow moves it up the list and its × takes it out; Add puts a new one on the end, already named after something the project has. Rows of several cells take the section’s whole width, under the field’s name. A row typed so it doesn’t read shows as typed, with what’s wrong, to put right.
| Genre | Field | What it gets |
|---|---|---|
| Adventures | Hotspot Use Gives, Use With Gives | items and how many, a row each; what’s given counts as given, so other fields offer it |
| Inventory Bar Descriptions, Icons, Combinations | an item and its line; an item and its picture, with the sheet’s frames across and down and which; the two items, what they make (parts with how many) and the line said | |
| Use With Item, Hotspot and Use With Needs Flag, Look Flag, Use Flag, Flag | items and flags picked; a flag a hotspot sets offers “not” to clear it | |
| Hotspot Look With, Use With, Use With With, Card Effect With | a box to fit what the action takes: a number, a tick, a name (a flag for Set Flag), or a word that it takes nothing | |
| Hotspot Arrive At (and a Door’s, from its Scene) | the next room’s hotspots, then its other entities, from the scene Goes To names | |
| Hotspot and Walk Area Points, Hotspot Stand At | point rows (a walk area keeps three); a knob in the Scene view with Distance handles | |
| Blocks | Blocks Items, Drops, Hardness, World Generator Ores | an item and its tile; a tile and what it gives (or nothing); a tile (or range) and its seconds, or its share of the stone |
| Unbreakable, Falling Tiles, Glowing Tiles | tiles clicked off the tileset | |
| Crafting Recipes, Hotbar Colors, Block Builder Item | what it makes and how many, the workbench, and what it takes as parts; an item and its color; an item picked | |
| Cards | Card Kind, Play Zone Accepts | card kinds picked from what the cards say they are |
| Card Effect Damage Roll, Heal Roll, Buff Stat | dice built; the numbers of the scene’s cards and what has health (“Value”, “Health.Max”) | |
| Deck Prefab Column, Count Column, Back | the table’s columns picked (the deck’s own defaults aren’t flagged on a table without them); a picture picked | |
| Contraptions | Sandbox Tools Tools | the tools in order, a row each picked |
| Fighting | Fighting Character Moves, Hitboxes Boxes | the moves listed with their inputs as arrows and their frames, Move List a click away; the boxes by clip and frame, Clip Editor a click away |
| Fighting Character Buttons, Computer Fighter Use Moves | a button’s letter and its input action; the moves ticked from the fighter’s own | |
| Character Select Pick Actions, Hitboxes Team | actions and teams picked | |
| Physics games | Bumper, Plunger and Tilt Direction | a compass (a bumper’s middle is none: straight away from it); turned with the entity in the Scene view |
| Slingshot Pouch, Default Pull | knobs in the Scene view, the pull’s from the pouch | |
| Rhythm | Note Lanes Song, Difficulty, Actions, Colors | music picked; a difficulty the chart has; actions picked; a color a row |
| Song Select Songs, Difficulties | music a row, each saying which table is its chart and its notes and difficulties; the difficulties the charts have | |
| Strategy | Faction Resources, Unit and Building Cost, Resource Kind | resources and how much, picked from what the factions have and the resources give |
| Team fields, Hotkey | the factions’ teams; a letter | |
| Visual novels | Stage Positions, Backgrounds, Background | a name and how far across and up; a name and a picture, or a color or two; picked from its backgrounds |
| Character Expressions, Expression, Position | a name and a picture or one of its animation’s clips; picked from its expressions and its stage’s positions | |
| First person | Weapon Ammo, Needs Item | items picked |
Names kept in the save data are picked the same way: a song select’s Save As and Save Difficulty As, a level goal’s, a block world’s, a character select’s and a walker’s Save Room As keep things there, and note lanes’ Saved Song and Saved Difficulty, a song select’s Best From and a versus match’s Picks read them (what’s kept under “Level1” reads as “Level1.Stars” too), flagged when nothing keeps it. Script fields get these editors the same way: [Counts(NameKind.Item)], [ListOf(Choices = [...])], [ChoicesOf(nameof(...))], [ActionValue(nameof(Do))], [InScene(nameof(Scene))], [Stat], [AssetFile(AssetFileKind.Image)], [Names(NameKind.Saved)] and [Names(NameKind.Column, Table = nameof(Table))], and a script can make its own kind of rows by deriving from RowsAttribute (its columns, and how a row reads and writes). Agents work the rows through ui_invoke on the field’s Editor (Add, Set(2, "Item", "Key"), Remove, MoveUp) or ui_set on Rows[1].Cells[0].Value; component_describe lists what each column can name. What every genre field gets is in GenreFieldEditorAuditTests.
Every field has an editor
Section titled “Every field has an editor”No field of Griff’s that takes names, a list, a path or something written like code is a plain box to type it in: each has a picker or an editor of its own, or says why typing is right for it. Text a component shows or says (a card’s Text, a toggle’s On Text), a name it gives itself that nothing else names (a hotspot’s Name), and what the game writes as it runs (a walker’s Route, a fighter’s History) are marked [PlainText("why")] in the code, the reason on the field; a list marked so keeps its lines as one block of text (a tilemap’s Tiles, painted in the Scene view). The editor’s tests (FieldCoverageTests) check every field of every component, and the templates’ scripts’, and fail for one with neither, saying what to mark it from its name (a string called Win Level names a scene: [Names(NameKind.Scene)]); a whole number named like a tile (a world generator’s Grass Tile, a falling board’s First Tile) is picked off the tileset, as its tile numbers are.
Whatever has no editor of its own, a script’s field above all, gets the best one its type and name allow:
- Lists (a list of strings): a row each, to set, move up and take out, and Add Item on the end. When they’re all numbers each row is a number to drag (Add Number), and when they’re all colors (
#F2607E) a swatch with the palette (Add Color). - Names and their values (a dictionary, written a line each as
Sword: 30orSword = 30): a row each with the name and its value side by side, the value a number or a color when they all are. A name given twice is flagged. - A choice of many (an enum of more than twelve: a button’s Action and Shortcut, a wire gate’s Kind, the sandbox tools’ Undo Key): the choice, and a list to search by typing a few letters, rather than a drop-down to scroll.
- Rotations (a
Quaternion): the angles it turns by about X, Y and Z in degrees, as a Transform’s Rotation shows, rather than its four numbers. - What a name says: a string called Font, Prefab, Scene or Message, or ending in one (Next Scene, Bullet Prefab, Win Message), picks from the project’s fonts, prefabs, scenes or messages without being marked; one ending in Sound, Music or Image (Jump Sound, Music, Fire Image) is a sound, music or a picture, played, picked and made from the Inspector; and a vector called Direction or ending in it (Facing Direction) gets the compass.
- Numbers, toggles, colors and vectors get the editors they always have.
Each change is one undo step, and agents work them the same way: ui_invoke on a list’s Editor (Add, Set(2, "Value", "35"), Remove, MoveUp), a choice’s Pick("PageDown"), and component_describe says what each takes (“Names and their values, one per line…”, “Plain text: words it shows”, “A sound in Assets”) and ends each field with its kind (“(Field: a sound.)”). What kind of field each is, is worked out once, from its type, its attributes and its name (PropertyDescriptor.Kind), and the Inspector and agents both read that answer.
Editing several at once
Section titled “Editing several at once”With several entities selected, the Inspector edits the components they all have, changing all of them together, as one undo step. Components only some of them have are listed after, greyed, with how many have them (“on 2 of 3”, and which in the tooltip) and Add to All, which gives the rest a copy of the one shown, its values and whatever it needs included. A value they don’t share shows as — (a check box half-filled, a list blank) until you set it. A vector’s axes are separate, so typing an X lines them all up across while each keeps its own Y. The checkbox by the name enables or disables them all; Add Component and the remove button add and remove a component on every one of them. Names stay one per entity.
In the Assets panel:
- Drag an image or a prefab into the Scene view to place it there, or right-click it for Add to Scene (a prefab goes where it was saved from, an image at 0, 0). Either way it’s one undo step, and inside a prefab’s tab it goes inside the prefab.
- Right-click a file for Open in Another Program (programs and scripts aren’t run), or anything for Show in Explorer.
- Drag any asset onto an Inspector text field to fill in its path.
- Double-click a scene to open it; right-click it to make it the start scene (or pick it under File → Set as Start Scene, which lists every scene).
- Rename a prefab from its right-click menu, or drag it onto a folder (or into empty space, for Assets itself) to move it there; New Folder on the right-click menu makes somewhere to put it. Every copy stays linked: in every scene, inside other prefabs and in open tabs (the open scene takes it as an undo step, and its file is relinked too). A prefab’s name is what
Game.Spawnand fields like a Spawner’s Prefab use, so renaming one means changing those.