Scripting API
The public types of Griff that scripts use, with every public and protected member and what its /// documentation says. A script sees the Griff, Griff.Data, Griff.Input, Griff.Runtime, Griff.Scenes and Griff.Simulations namespaces without a using, and the namespace of each genre its project uses (under Griff.Modules). This page and the ones it links to are written from the code when the site is built. How scripts are written is in the scripting guide.
- Box: An axis-aligned rectangle in world space.
- Circle: A circle in world space.
- Color: An RGBA color with 0–1 float channels.
- DoNotSerializeAttribute: Excludes a public read/write property from scene files and the inspector, and from what a table row fills (a script’s class filled from a row,
row.To<T>()). - Ease: Easing curves for tweens: each maps progress 0–1 to an eased 0–1 (some briefly overshoot, like
OutBack). - Easing: One of the
Easecurves by name, for a component to be set to in the Inspector (aTweenPlayer’s). - GameRandom: Random numbers that a rewind takes back: the same sequence
new Random(seed)gives (Knuth’s subtractive generator, as .NET has always made it from a seed), with where it has got to kept in fields of its own, so a rewind snapshot keeps it and putting the game back puts the numbers back too. - HudRect: A rectangle on a HUD (a strategy game’s, a sandbox’s), in world units: a HUD is laid out over the camera’s view.
- IKeepsState: A part of a running game whose fields are its state: every
GameSystem, the game’s clock and its random numbers. - ModuleAssemblies: The assemblies Griff’s modules run from (see
Griff.Runtime.GameModule). - NotStateAttribute: On a field of a system (or of anything a rewind snapshot keeps, see
IKeepsState): it isn’t the game’s state, so the snapshot leaves it out and a rewind leaves it as it is: a link to another part of the game, a cache it can work out again (inRestored, or as it next looks), a list kept only to reuse. - OmitWhenEmptyAttribute: Leaves a property out of scene and prefab files while it’s empty (null, an empty string or an empty list), so a property added to a component later doesn’t change the files of games that don’t use it: they save byte for byte as they did before it.
- Rand: Random numbers for gameplay: spawn points, loot rolls, a little variety in juice.
- TurnedBox: A rectangle in world space turned by
Angleradians about its center.
Griff.Input
Section titled “Griff.Input”- GamepadButton: Buttons of an Xbox-style controller.
- InputActions: The input actions every game has, whatever its project adds.
- InputBinding: A key, mouse button or gamepad button that triggers an action (see
IInput.Bind). - Key
- MouseButton
- MouseCursor: What the mouse pointer looks like over the game (see
IInput.Cursor): the system’s own pointers, on the desktop and in a browser.
Griff.Modules.Adventures
Section titled “Griff.Modules.Adventures”- AdventureVerb: What a click on a
Hotspotdoes: look at it or use it. - AdventuresModule: Point-and-click adventures: walk areas a character finds its way round (
WalkArea), the character that walks where the player clicks (Walker), things to look at and use (Hotspot), and items to pick up, use on things (UseWith) and put together (InventoryBar), with Create Walk Area, Create Hotspot, Create Walker and Create Item in the Entity menu. - BarPlace: Where an
InventoryBargoes on the screen. - Combination: Two items that go together (see
Combinations): what they make, and what the walker says. - CombinationsAttribute: Marks a list of strings as items that go together, “Grappling Hook = Rope + Hook: I tie the rope to the hook.” (an
InventoryBar’s Combinations): the Inspector lists them a row each, the two items picked, what they make and what’s said. - Hotspot: Something in an adventure to look at and use with the mouse, with no code: a door, a key on the floor, a painting, a character to talk to.
- InventoryBar: An adventure’s inventory, with no code: a bar along the bottom of the screen showing what the walker’s
Inventoryholds, each item’s icon and name. - ItemIcon: An item’s picture on an
InventoryBar: an image in Assets, the part of it to show, and its width over its height. - ItemIconsAttribute: Marks a list of strings as each item’s picture, “Key: Sprites/key.png” or a frame of a sheet, “Rope: Sprites/items.png 4x2 5” (an
InventoryBar’s Icons): the Inspector lists them a row each, the item picked, the image picked from the project’s and its frame set. - ItemLinesAttribute: Marks a list of strings as a line for each item, “Key: A rusty old key.” (an
InventoryBar’s Descriptions): the Inspector lists them a row each, the item picked from what the game gives and the line typed. - UseWith: What using an item on a
Hotspotdoes, with no code: a key on a door, a coin given to a beggar, a bone thrown to a dog. - WalkArea: Where an adventure’s characters can walk (see
Walker): a shape drawn round the floor of a room, its points dragged, added and taken off in the Scene view. - Walker: The player’s character in a point-and-click adventure, with no code: a click on the floor (a
WalkArea) walks there, round whatever’s in the way along the shortest way; a click off it walks as close as it can; a click on aHotspotwalks over to it and uses it, a right click looks at it.
Griff.Modules.Battles
Section titled “Griff.Modules.Battles”- BattleMove: A move a
Battlermakes on its turn. - Battler: A fighter in a turn-based battle, as in an RPG, with no code: on its turn it attacks its
Foe, casts itsSpell(paid for inMana) or uses one of itsItems, a potion that heals or a bomb that hurts. - BattlesModule: Turn-based battles, as in an RPG: fighters that attack, cast spells paid for in mana and use items on their turn, by the numbers of a class’s or an enemy’s table row (
Battler), the computer playing a team, and the RPG Stats template, whose races, classes, items, spells and levels are tables and whose balance simulations show which class is too strong at which level.
Griff.Modules.BlockWorlds
Section titled “Griff.Modules.BlockWorlds”- BlockBuilder: Digs up and puts down the blocks of a
Blocksworld with the mouse: hold the left button on a block to mine it (it goes in theInventory), and click the right button to put down theItem(the one picked on theHotbar). - BlockHud: Where a block world’s HUD goes for a view: the
Hotbaralong the bottom with theCraftinglist over it. - BlockItemsAttribute: Marks a list of strings as items and the tile each puts down, “Dirt 1” (a
Blocks’ Items): the Inspector lists them a row each, the item named and its tile picked off the tileset. - BlockWorldsGame: What a script can ask of a block world, as members of
Game(Game.Craft(player, recipe)). - BlockWorldsModule: Block worlds, Terraria style: worlds made from a seed (
WorldGenerator), blocks that break, fall, glow and are kept in the save data (Blocks), digging and building (BlockBuilder), aHotbarandCrafting, and the Sandbox template. - Blocks: Makes a
Tilemapa world of blocks to dig up and build with: what each tile gives when it’s mined, what each item puts down, how long blocks take to break, blocks that can’t be broken, sand that falls, and torches that glow. - Crafting: Makes things from what the
Inventoryholds. - Hotbar: A row of slots along the bottom of the screen showing what the
Inventoryholds, with how many. - ItemColorsAttribute: Marks a list of strings as items and their colors, “Dirt #8B5A2B” (a
Hotbar’s Colors): the Inspector lists them a row each, the item picked and the color shown. - Recipe: One of a
Crafting’s recipes: what it makes, how many, what it takes, and where. - RecipesAttribute: Marks a list of strings as recipes, “Torch 4 = Wood + Coal @ Workbench” (a
Crafting’s Recipes): the Inspector lists them a row each, what it makes and how many, what it takes picked item by item, and where. - TileAmountsAttribute: Marks a string as tiles (a tile or a range) each with a number, “2 0.8, 3-4 1.2” or “3 6%” (a
Blocks’ Hardness, aWorldGenerator’s Ores): the Inspector lists them a row each, the tile picked off the tileset and the number set. - TileDropsAttribute: Marks a string as tiles and what each gives when mined, “0 Dirt, 6 nothing” (a
Blocks’ Drops): the Inspector lists them a row each, the tile picked off the tileset and the item picked. - WorldGen: Makes the worlds of
WorldGenerators: the same settings and seed always give the same rows of tiles. - WorldGenerator: Fills its
Tilemapwith a world made from aSeed: rolling hills of grass over dirt, stone below with caves and veins of ore, sand, trees, and a floor that can’t be dug through.
Griff.Modules.Cards
Section titled “Griff.Modules.Cards”- Card: A playing card, with no code: it draws itself as a card of its
Colorwith itsTitlealong the top, itsValuein the corner, a picture (Image) and its rulesText, or as its back while it’s face down. - CardEffect: What a card does, with no code: as it’s played (or drawn, discarded, or each turn while it’s on the table) it deals
Damage, gives backHeal, has youDrawcards, has its target’s sideDiscard, gives youGainMana, raises a number (Buff) or does any action (Do), like aTrigger, so a card can drive another part of the game. - CardLayout: How a
PlayZonelays out the cards played onto it. - CardTarget: Whom a
CardEffectis done to. - CardWhen: When a
CardEffecthappens. - CardZone: A place cards go: a
Deck, aHandor aPlayZone. - CardsModule: Card games: cards (
Card) drawn from decks (Deck) into hands (Hand) and played by dragging them onto play zones (PlayZone), shuffled, discarded and sliding between them; the Cards template, a duel against the computer made from a table of cards; and Create Deck, Create Play Zone and Create Card in the Entity menu. - Deck: A pile of cards to draw from, with no code: its cards are the entities inside it with a
Card(the last one is the top), or made from aTable, one for each row, as the game starts. - Hand: The cards a player holds, fanned out along the bottom of the screen, with no code.
- ICardPart: A component on a card’s entity (beside its
Card) that hears what happens to the card and has a say in whether it can be played: an effect that deals damage as it’s played, a cost that has to be paid first. - PlayZone: A place on the table cards are played onto, with no code: drag a card from a
Handonto it (or click the card, then it) and it slides into place, laid out in a row or a pile.
Griff.Modules.Contraptions
Section titled “Griff.Modules.Contraptions”- ContraptionsGame: What a script can ask of the building tools, as members of
Game(Game.Tools,Game.Undo()): what’s held or picked, and undoing what they made. - ContraptionsModule: Contraptions, Garry’s Mod and Wiremod style: building tools used while the game runs (
SandboxTools), welds, ropes and thrusters, wiring with buttons, sensors, gates, lamps and displays, and the Contraption template. - GateKind: What a
WireGatedoes with its inputs. - SandboxTool: A tool of
SandboxTools. - SandboxTools: Garry’s Mod style tools for building contraptions while the game runs: grab and throw things, freeze them in place, spawn props, weld, hinge and rope them together, wire buttons to lamps, thrusters and wheels’ motors, and remove them.
- Thruster: Pushes its
Body(and whatever it’s welded to) alongDirectionwhile it hasPower: wire a button to it to lift a platform or drive a cart. - ToolHud: Where the
SandboxTools’ HUD goes for a view: the tools along the top with the spawn list under them, and the list of an entity’s inputs or outputs the Wire tool pops up. - Weld: Sticks its entity to another, so the two move as one: a plank with a cab, a box with a thruster.
- Wire: Connects an output of another entity to an input of this one, so one drives the other: a button’s “On” to a lamp’s “On”, a sensor to a door’s “Power”, a board’s “Score” to a display’s “Value”.
- WireButton: A button to press with Interact (E) with the mouse over it, or while standing on it.
- WireDisplay: Shows a number wired to its input “Value”, on its
Text(or over it, without one). - WireGate: A logic gate or bit of math for wiring contraptions: inputs A and B, output Out.
- WireLamp: A lamp to wire up: its input “On” lights it from 0 (dark) to 1 (full), tinting its sprite from
OffColortoOnColorand turning up aLighton it. - WirePorts: The inputs and outputs
Wires connect, and reading an output’s value. - WireSensor: Notices things inside its collider (usually a trigger): output “Out” is 1 while anything is there, and “Count” says how many.
Griff.Modules.Dungeons
Section titled “Griff.Modules.Dungeons”- DungeonGen: Makes the dungeons of
DungeonGenerators: the same settings and seed always give the same one. - DungeonGenerator: Fills its
Tilemapwith a dungeon made from aSeed, with no code: rooms of different sizes joined by corridors, walled in. - DungeonLayout: A dungeon made by
DungeonGen: its tiles, rooms, and where everything goes. - DungeonRoom: A room of a
DungeonGenerator’s dungeon: the cells of its floor, from its top-left cell. - DungeonsModule: Dungeons: floors of rooms and corridors made from a seed, floor after floor (
DungeonGenerator), the Roguelike template, and Create Dungeon and Generate Dungeon in the Entity menu.
Griff.Modules.FallingBlocks
Section titled “Griff.Modules.FallingBlocks”- FallingBlocksModule: Boards that pieces fall into, to be slid, turned and dropped so full rows clear (
FallingBoard), the Falling Blocks template, and Create Falling Board in the Entity menu. - FallingBoard: A falling-block board, with no code: pieces of four blocks drop in at the top one after another, the player slides and turns them as they fall, and each locks where it lands.
Griff.Modules.Fighting
Section titled “Griff.Modules.Fighting”- AutoBlock: When a fighter blocks by itself, with no one holding back: for a training dummy, or a computer opponent.
- ButtonsAttribute: Marks a string as a fighter’s buttons and the input action each is, “P Punch, K Kick” (a
FightingCharacter’s Buttons): the Inspector lists them a row each, the button’s letter typed and the action picked from the game’s. - CharacterSelect: A fighting game’s character select, with no code: each player at this machine moves their own cursor over the characters’ cards (the entity’s children, in order, one for each of its
Characters) with their own keys or controller and picks one with a button; once everyone has, the picks are kept in the save data andSceneloads, where aVersusMatchputs them in. - ComputerBehavior: What a
ComputerFighterdoes. - ComputerDifficulty: How well a
ComputerFighterfights. - ComputerFighter: Has the computer play a
FightingCharacter, for one player against the computer and for a training dummy: it walks in, attacks with the fighter’s own moves when it’s close enough, guards (low against a low) as its opponent attacks, jumps in with an air move now and then, and cancels a hit into a special. - FighterMove: One of a
FightingCharacter’s moves: its name, the input that does it (MoveInput), the animation clip it plays (whose hitboxes, drawn in the Clip Editor, are what hit), how many steps it takes before it hits, hits for and takes to recover (its startup, active and recovery frames), where it must be blocked, and what it cancels into. - FightingCharacter: A fighting game’s fighter with no code: walks forward and back, jumps (up, forward or back) and crouches on the directions, faces its opponent by itself, and does its
Moves, each written in numpad notation (5Pa standing punch,2Ka crouching kick,236Pa quarter circle forward and punch,623Pa dragon punch,[4]6Pa charge) and played from an animation clip whose hitboxes (drawn in the Clip Editor) are the part that hits, over the startup, active and recovery frames the move gives. - FightingGame: What a script can ask of a fighting game, as members of
Game:Game.ShowHitboxes. - FightingModule: Fighting games:
Hitboxes, hitboxes and hurtboxes for each frame of an animation’s clips (drawn in the Clip Editor), that land hits with damage, knockback and hitstun; fighters (FightingCharacter) that walk, jump, crouch, block and do moves written in numpad notation (quarter circles, dragon punches, charges) with an input buffer, cancels and combos; a computer to fight (ComputerFighter); aCharacterSelectwhere players at one machine each pick their fighter, and aVersusMatchof rounds against the clock; a sparring pair and a training pair to make from the Entity menu (Genres, Fighting); and the Fighter template, a whole versus fighting game. - FrameBox: One box (or circle) on one frame of an animation clip, as a
Hitboxesholds them: a hitbox that dealsDamage,KnockbackandStun, or a hurtbox that takes hits times itsMultiplier. - FrameBoxKind: What a
FrameBoxdoes: deal a hit, or take one. - FrameBoxesAttribute: Marks a list of strings as hitboxes and hurtboxes, a line each (see
Boxes): the Inspector lists them by clip and frame, and opens the Clip Editor (Art > Animation Clips) to draw them over the frames. - HitInfo: A hit one
Hitboxeslanded on another (or on something with a Health on its Layers). - Hitboxes: Hitboxes and hurtboxes for each frame of the entity’s animation, with no code: a fighter’s punch hits only on the frames its fist is out, and its head takes more than its legs.
- MoveHeight: Where a move’s hits must be blocked: high or low (mid), standing (high, an overhead) or crouching (low).
- MoveInput: What a fighter presses for a move, in the numpad notation fighting games write moves in: the directions as the keys of a number pad, for a fighter facing right (6 forward, 4 back, 2 down, 8 up, 3 down-forward and so on, 5 none), then the button.
5Pis a punch standing,2Ka kick crouching,236Pa quarter circle forward and punch,623Pa dragon punch (forward, down, down-forward),[4]6Pback held a moment (a charge) then forward and punch, andj.Ka kick in the air. - MoveListAttribute: Marks a list of strings as a fighter’s moves, a line each (see
Moves): the Inspector lists each with its input drawn as arrows and its frames, and opens the Move List (Entity > Edit Moves) to edit them. - MovePhase: Which part of a move a fighter is in: starting up, hitting (active) or recovering; or none, free to act.
- MoveTiming: How a move plays: its startup, active and recovery in steps, and the clip they’re shown with (how many frames it has, at what speed, and which of them have hitboxes).
- VersusMatch: A fighting game’s match between two fighters, with no code: rounds (best of three to start with) against a clock, each starting with “Round 1” and “Fight!” and ended by a knockout (a fighter’s
Healthrunning out) or by the time running out (more health left wins), the fighters back in their places at full health for the next; and once a fighter has won enough rounds, “Kenta Wins” and itsWinMessage, which opens a panel with a rematch. - VersusPhase: Where a
VersusMatchhas got to.
Griff.Modules.FirstPerson
Section titled “Griff.Modules.FirstPerson”- Billboard: How a sprite stands in a
FirstPersonView. - Block: Shows the entity as a solid box of wall in a
FirstPersonViewrather than a flat sprite: doors, gates, pillars, secret walls. - FirstPersonGame: What a script can ask of a first-person game, as members of
Game(Game.FirstPersonViewer,Game.Equip(shotgun)): the view, the player looked through, and the weapon in hand. - FirstPersonModule: First-person games: the world seen through the player’s eyes from a flat map (
FirstPersonView), walking and turning (FirstPersonMovement), weapons, billboards and solid blocks, and the Shooter template. - FirstPersonMovement: First-person controls with no code: W and S (or up and down) walk, A and D strafe, the left and right arrows turn, and the mouse looks around once the game is clicked (Esc gives the mouse back).
- FirstPersonView: Shows the game in first person, through the eyes of its
Viewer: the level you paint as a top-down map is stood up around the player. - Weapon: A gun held in first person, with no code: Fire shoots where the player looks.
Griff.Modules.Match3
Section titled “Griff.Modules.Match3”- Match3Module: Boards of gems swapped into lines of three or more of a kind that clear (
MatchBoard), levels with moves and goals, the Match-3 template, and Create Match Board in the Entity menu. - MatchBoard: A match-3 board, with no code: the gems are the tiles of its entity’s
Tilemap, one kind per tile number inGems. - MatchInfo: Gems of one kind lined up and cleared together on a
MatchBoard.
Griff.Modules.PhysicsGames
Section titled “Griff.Modules.PhysicsGames”- Breakable: Something that breaks when it’s hit hard enough, with no code: a plank of wood, a pane of glass, a stone block, a pig in a tower.
- Bumper: A pinball bumper, with no code: whatever touches it is knocked away hard, at
Strength, as it flashes, pops, plays itsSoundand scores itsPoints. - Drain: The drain at the bottom of a pinball table, with no code: a ball that falls into it is lost, and the next of its
Ballsis served onto thePlunger``ServeDelayseconds later, until there are none left and the game’s over. - Flipper: A pinball flipper, with no code: a paddle on a
HingeJointthat snaps up while its button is held and drops back as it’s let go, hitting the ball hard and the same every time. - FlipperSide: Which way a
Flipperswings up. - Lane: A pinball rollover lane, with no code: a ball rolling through it scores its
Pointsand lights it up. - LevelGoal: What a physics puzzler’s level is for, with no code: knock out every target before the slingshot runs out of shots.
- LevelPhase: Where a
LevelGoal’s level has got to. - PhysicsGamesModule: Physics puzzlers: a
Slingshotto pull back and launch shots from, andBreakablethings (planks, panes, blocks, pigs) that crack and break on hard knocks; aLevelGoalthat wins a level once its targets are down (with a bonus for the shots left, and one to three stars) or loses it once the shots run out; a Slingshot and a Tower to make from the Entity menu (Genres, Physics Games); and the Physics template, levels of wood, glass and stone to knock down. - Plunger: A pinball plunger, with no code: the ball rests on its tip; hold its button to pull it back (the longer, the further, up to all the way in
PullTimeseconds) and let go to shoot the ball up the lane, the harder the further it was pulled. - Slingshot: A slingshot that launches things into a physics game, with no code: pull its pouch back with the mouse (or a finger) and let go, and the shot in it flies off the other way, the faster the further it was pulled.
- Target: A pinball target, with no code: the ball hitting it scores its
Pointsand lights it up, and a drop target (Drops) falls out of the way. - Tilt: Nudging and tilting a pinball table, with no code: its
NudgeActionbumps the table, giving every ball on it a small push (and shaking the view), but nudge too often in a short time and it warns, then tilts: the flippers drop and stay down and the bumpers, kickers, targets and lanes go dead until the ball drains.
Griff.Modules.Puzzles
Section titled “Griff.Modules.Puzzles”- Goal: A place to push a crate to, for Sokoban-style puzzles, with no code: it’s covered while a grid crate (a
Pushablewith aGridMovement) rests in its cell, and once every goal with the sameAllCoveredMessageis covered, that message is sent: the puzzle solved. - MoveHistory: Undo and restart for grid puzzles, with no code: each step a grid player takes (with any crates it pushes) is a move.
- PuzzlesModule: Grid puzzles, Sokoban style: goals for crates (
Goal), undo and restart (MoveHistory), the Puzzle template, and Create Goal in the Entity menu.
Griff.Modules.Rhythm
Section titled “Griff.Modules.Rhythm”- ChartNote: A note of a chart: its beat, its lane (from 1) and how many beats it’s held (0 for a tap).
- ChartPlaybackStream: What a chart editor plays: a song from part way in, after a lead-in, with a metronome’s clicks on its beats (always in the lead-in, and through the song when
Metronomeis on) and a tick on each of the notes ofTicksas it’s reached, each starting on its very sample. - ChartRecording: Turns what was tapped along to a song into a chart’s notes: each press at the beat the player heard it (the song as it had reached the speakers, less the player’s audio offset, by the lanes’ tempo and first beat), snapped to the grid; a key held down for half a beat or more is a hold to where it was let go, snapped too.
- ChartRow: A note of a chart table as an editor shows it: its row, what it is, and whether it’s in the difficulty being edited.
- ChartSnap: A grid a chart’s notes snap to: each beat split into
Divisions. 1/4 is a note a beat (in 4/4), 1/8 two, 1/16 four, and the triplets three (1/8 triplets) or six (1/16 triplets). - ChartTable: Changes to a chart table (a row a note: Beat, Lane, Hold and Difficulty), as the editor’s Chart panel makes them: a recorded take put in (added over what’s there, or in place of it), and a note added, taken out, moved or made a hold.
- ChartTap: A lane pressed while recording a chart: the lane (from 1), and how far into the song had been heard when it was pressed and let go, in seconds (
PositiveInfinityfor one still held when the take ended). - ChartTiming: When a chart’s beats are: the tempo in beats a minute, the beats in a bar and how many seconds into the song its first beat (beat 0) is, as the lanes’
BeatClockcounts them. - ChartWriter: Writes a rhythm chart from a tune made in Griff, as a charter would by ear: its notes fall on what the player hears (the melody’s notes, and the drums in its gaps), each in the lane its pitch reaches for (higher to the right), a phrase’s last note held through the rest after it, and the first beat of each phrase a two-note chord.
- DifficultiesAttribute: Marks a property as naming a chart’s difficulty (“Hard”; a
NoteLanes’ Difficulty), or a list of them a row each (aSongSelect’s Difficulties): the Inspector picks from the difficulties the charts have (the names their Difficulty column uses), Easy, Normal and Hard among them. - NoteDirection: Which way a
NoteLanes’ notes travel to its hit line. - NoteJudgment: How well a note was hit, as a
NoteLanesjudges it. - NoteLanes: A rhythm game’s lanes, with no code: notes from a chart (a table of beats and lanes) scroll toward a hit line in time with the music, and the player presses each lane’s key, button or touch zone as its notes reach the line, holding a hold note down until its end.
- RhythmChart: A rhythm chart read from a table: a row a note, with its
Beat, itsLane(from 1), how many beats it’s held (Hold, empty or 0 for a tap) and theDifficultyit’s in (empty for every one, or names separated by commas). - RhythmGame: What a script can ask of a rhythm game, as members of
Game:Game.NoteSpeed. - RhythmModule: Rhythm games: lanes of notes from a chart (a table of beats and lanes) that scroll to a hit line in time with the music (
NoteLanes), each press judged Perfect, Great, Good or Miss against the beat as the player hears it; and Create Note Lanes in the Entity menu, with a song and its chart at three difficulties; aSongSelectto pick a song and difficulty with its best score; and the Rhythm template, a whole rhythm game. - SongSelect: A rhythm game’s song select, with no code: the player moves up and down its songs’ cards (the entity’s children, in order, one for each of its
Songs), left and right through the difficulties, hears each song as it’s picked out, and plays it with a press (or a click or a tap on its card); the song and difficulty are kept in the save data andSceneloads, whereNoteLaneswith a Saved Song and Saved Difficulty play them. - SongsAttribute: Marks a list of strings as songs to pick from, a music file each (a
SongSelect’s Songs): the Inspector lists them a row each, the music picked from the project’s, each saying which table is its chart.
Griff.Modules.Strategy
Section titled “Griff.Modules.Strategy”- Building: A building: it stands still, takes up its
Sizeon the map (units walk around it), and belongs to a team. - Commander: The player’s strategy controls, on the camera: click or drag a box to select units, right-click to send them (to walk, attack, gather or build), hotkeys and the command card for everything else.
- Costs: Hotkey letters, and resources read and written the way
Itemsreads every genre’s items: “150 Gold, 50 Wood” (or “Gold 150”). - Faction: A team in a strategy game: its name (the
TeamandTeamof everything it owns, the same teams every genre shares, seeTeams), its color, and the resources it has to spend. - Fighter: Fights for a
Unitor aBuilding(a tower): it attacks enemies that come within its unit’s sight on its own, and whatever it’s told to. - FogOfWar: Hides what the
Commander’s team can’t see. - Opponent: Lets the computer play a
Faction: it keeps its workers gathering, trains more, puts up the buildings inBuilds, trains an army, and sends it to attack once it’s big enough, a bigger one each time. - Producer: Trains units at a
Building: select it and press a unit’s hotkey (or click its button) to queue one up. - Resource: Something workers gather: a gold mine, a tree.
- StrategyGame: What a script can ask of a strategy game, as members of
Game(Game.Train(producer, "Worker"),Game.Selected): the selection, factions and supply, training, building, the fog and the camera. - StrategyHud: Where everything on the strategy HUD goes for a view: the resources bar along the top, and along the bottom the minimap, what’s selected and the command card.
- StrategyModule: Real-time strategy: factions, units that walk around obstacles and fight, workers that gather and build, buildings that train units, fog of war, the computer playing a side, the player’s controls and HUD, playing online team against team, and the Strategy template.
- Unit: Something a team can select and order about with no code: click it (or drag a box round it) and right-click where it should go or what it should attack.
- UnitOrder: What a unit is doing.
- Worker: Lets a
Unitgather and build.
Griff.Modules.Tactics
Section titled “Griff.Modules.Tactics”- TacticsControls: Lets players command their
TacticsUnits with the mouse, or with a cursor moved by the arrow keys or the stick: click one of your units whose team’s turn it is to pick it, and the cells it can walk to light up inMoveColor, with the cells it can hit from them inAttackColor; hover a cell to see the way it would go. - TacticsModule: Turn-based tactics: units on a grid, picked and sent to a cell in reach or set on a foe, side by side in turns (
TacticsUnit,TacticsControls), the computer playing a team, the Tactics template, and Create Tactics Unit in the Entity menu. - TacticsStance: How a computer-played
TacticsUnitplays. - TacticsUnit: A unit in a tactics game, with no code: on its team’s turn you pick it, see the cells it can walk to (and the cells it can hit from them), then click one to walk there and click an enemy in reach to attack it.
Griff.Modules.VisualNovels
Section titled “Griff.Modules.VisualNovels”- BackgroundsAttribute: Marks a list of strings as a stage’s backgrounds, “Park: Backgrounds/park.png”, “Night: #10183A” or “Dusk: #F2A65A #3A2F5B” (a
Stage’s Backgrounds): the Inspector lists them a row each, the name typed and a picture picked, or a color, or two running from the top to the bottom. - Character: Someone who appears on a visual novel’s
Stage, inside it: on stage while their entity is shown, standing at one of the stage’s positions, looking as theirExpressionsays. - DirectionKind: What a direction to a
Stagedoes: one of the dialogue tags “[show]”, “[hide]”, “[move]” and “[background]”. - ExpressionsAttribute: Marks a list of strings as a character’s expressions, “Happy: Characters/ava-happy.png” or a clip of their animation, “Laugh: Laugh” (a
Character’s Expressions): the Inspector lists them a row each, the name typed and the picture or clip picked. - PositionsAttribute: Marks a list of strings as a stage’s positions, “Left: -4.5” or “FarLeft: -7, -0.5” (a
Stage’s Positions): the Inspector lists them a row each, the name typed and how far across and up set. - Stage: A visual novel’s stage: a background filling its
Size, and the characters inside it (each aCharacter) standing at its namedPositions. - StageDirection: One direction to a
Stage, as a dialogue line’s tag says it: “[show Ava left happy]” is Show, Who “Ava”, Position “Left” and Expression “Happy”; “[background Park fade]” is Background “Park” with a fade. - StageLines: Reading what a visual novel’s stage is told: its positions, backgrounds and a character’s expressions (rows of “Name: value”), the directions on dialogue lines, and the lines themselves taken apart and put back together, for the editor’s Dialogue Editor and for agents.
- StageTransition: How something comes onto a
Stage, leaves it or changes on it. - VisualNovelGame: What a script can ask of a visual novel, as members of
Game: how the player likes dialogue read (Game.SkipUnread,Game.AutoSpeed) and the lines they’ve read (Game.HasRead). - VisualNovelsModule: Visual novels: a
Stagewith backgrounds and the characters on it (Character), at named positions and with expressions, directed by the lines of a dialogue (“[show Ava left happy]”, “[background Park fade]”); the Visual Novel template, a short story with three endings; and Create Stage, Create Character and Create Reading Menus in the Entity menu.
Griff.Runtime
Section titled “Griff.Runtime”- Behavior: Base class for gameplay scripts.
- BodyGroup: Bodies welded into one; see
Groups. - ComponentCount: How many of each kind of component are on a scene’s active entities: one row of
SceneCounts. - Coroutine: A sequence that runs over several frames, started with a behavior’s
StartCoroutineorStartCoroutine. - CrowdAttribute: Marks a script that changes nothing but its own entity in its Update, FixedUpdate and LateUpdate: its own values, its entity’s transform and components.
- DebugCircle
- DebugDraw: Draws lines, boxes, circles and text over the game for one frame, to see what code is thinking: a raycast, an enemy’s sight range, a path.
- DebugLine
- DebugShape: A shape drawn by
DebugDraw, in world space. - DebugText
- EntityPairSet: Pairs of entities, each pair once, in the order they were first added: who touched what in a frame’s physics (see
Touches) and which triggers have what in them (TriggerPairs). - ExportLayout: Layout of an exported game: the player executable sits next to a
gamefolder. - FrameCost: What one thing (a step of the frame, a kind of script, a system: see
Kind) cost a frame, over the frames aFrameProfilerholds: the time it took on average and at worst, in milliseconds, the garbage it made a frame on average (in bytes), and its share of the frame’s work (its steps, building and drawing: 0 to 1). - FrameCostKind: What a cost in a frame is for: one of Griff’s steps, a system a script added, a kind of script, part of building the picture, drawing it, or the editor’s own work.
- FrameDrawing: A running game’s frame as it’s being drawn, handed to each
GameSystemin turn once every entity has drawn itself: first to see the world their own way (a first-person view, in DrawView), then to add what the game knows of and no single entity draws (a strategy game’s fog and HUD, a tactics game’s reachable cells) or change what’s there (hide what’s in the fog), in Draw. - FramePhase: The parts of a step of the game (its frame), in the order they run.
- FrameProfiler: Keeps the last few seconds of a running game’s frames (see
FrameSample), for a profiler to show. - FrameSample: What one frame the screen showed cost, in milliseconds: the whole frame (from the last one shown to this one), and of it, the game’s steps, building the picture to draw (
SceneRenderer) and drawing it. - FrameStep: One step of the frame: a named piece of work in a
FramePhase, belonging to aGameSystem(a script’s, or one of Griff’s that keeps track of something) or to the game itself. - FrameSummary: How a stretch of frames went: how many, the frame rate and its 1% low (the rate of the slowest 1% of frames), the average and worst frame, and what the game’s steps, building and drawing took on average; then the garbage a frame made on average (in bytes), the most one made, and how many times the garbage collector ran in all.
- Game: Runs a scene in steps of the same length (see
FixedDelta): each frame the screen shows,Advancetakes as many as the real time since the last one holds, each going through the parts of the game’sFrame, phase by phase, from starting new behaviors through physics to sound. - GameHostOptions: What a host hands a game it makes (
NewGame): the input its window or page feeds, the sound it plays through, where it keeps its saves, whether it plays over the network and where its problems are said. - GameLoader: Loads an exported game folder (or a project folder) for the player.
- GameModule: A part of Griff that lives in a place of its own: a folder under src/Modules with a namespace to match (Griff.Modules.Match3), holding everything of a genre such as Match-3 or Strategy.
- GamePackage: A game’s content (project.griff, Assets and compiled scripts) zipped onto the end of the player executable, so an exported game is a single file.
- GamePictures: Pictures a running game makes for itself rather than reads from its files, such as the screenshots of its saved games (see
SaveGame), drawn by naming them where an image’s path goes: their names start withMark(“@save/1”). - GameSetup: A game being made, as each
GameModulesees it inAddTo: where it adds its systems, their steps and its network commands. - GameSystem: One part of what the game does each frame, run in its
Phaseafter Griff’s own steps there. - GameTimer: A callback scheduled with
AfterorEvery. - HudButton: A button a system shows on the screen (see
HudButtons): what sort it is (a hotbar’s “Slot”, a tool picker’s “Tool”), its place among those of its sort, what it says, where it is (in the world, over the camera’s view), and what pressing it does. - IAudio: Sound for gameplay code.
- IClaimsBack: A system that has something under way that Back should cancel first.
- IDebugDrawing: A drawing over the game to debug with, which a module’s
GameSystemmakes and a host switches on and off by its name: a fighting game’s hitboxes (“Hitboxes”). - IGridStepListener: A system that hears of a grid mover setting off.
- IHostInput: A game’s input as its host drives it (
HostInput), whereIInputis what the game reads: what the keyboard, mouse, touch screen and controllers do, as they do it; its frames; the project’s controls; the player’s rebinding, kept in the game’s saves; and what the game asks of the host back (the controllers’ rumble, the pointer, holding the mouse). - IHudLayout: A system that shows buttons and the like on the screen (a hotbar, a tool picker).
- IInput: What gameplay code reads.
- IMouseOnHud: A system that draws something on the screen the mouse can be over (a strategy game’s HUD, say).
- INetwork: Multiplayer, as a service of the game (
Game.Network, orGame.Services.Get<INetwork>()): hosting a game, joining one, who’s playing, and messages between machines. - INoticeSource: A system whose HUD shows a short message.
- IPlayerSettings: A system that keeps settings a player chooses for themselves, as the game keeps its own (volume, full screen, the offsets): they’re read back from
SaveDataas the game starts and written as they change, and aSliderorToggleset to one shows and sets it. - IPlayerTools: A system with controls that are one player’s own (a hotbar, building tools), which the host of a network game runs for each player.
- IPlayersListener: A system that settles who plays what in a network game.
- IReadingPreferences: What reading a conversation goes by that’s a player’s own: whether skipping (
Skipping) goes on through lines they haven’t read yet, how quickly reading on by itself (AutoReading) does, and the lines they’ve read before. - ISaveUpgrader: A system that brings games saved by an earlier version of the game up to date as they’re loaded: each one added (
AddSystem, from the title screen’s script or wherever games are loaded) is handed every saved game whoseVersionis lower thanSaveVersion, before it’s read. - ISavesState: A script (a
Behavioror aGameSystem) that writes its own model into a saved game rather than having its fields saved for it:SaveStatewrites what it wants kept, by name, andLoadStatereads it back as the game is loaded (after the script’sStart, before itsOnLoaded). - ISceneEndListener: A system that keeps something when the game leaves its scene.
- ISeesThroughEyes: A system that has the game seen through someone’s eyes (a first-person view’s player).
- ISoundLoop: A sound playing over and over, from
Loop. - IViewDrawer: A system that draws the world its own way (a first-person view) in place of the camera’s view from above: called as each frame is drawn, before any system’s
Draw, to setSprites,ViewandViewProjection(andSeenThrough). - Impact: One hard knock in the last physics step:
Struckwas hit byByatPoint, as hard asStrengthsays. - InputPrompts: Short names for keys and buttons, the way a player reads them on screen: “Space”, “Esc”, “Left Click”, “A”, “RB”.
- InputState: The input every host feeds (
IHostInput) and every game reads (IInput): callSetKey/SetMouseButtonas events arrive andEndFrameafter each game tick. - KeySet: Which keys of the keyboard a player at this machine has.
- LightDraw: A light to draw: its middle in the world, how far it reaches, its color times its brightness, and its softness.
- LoadedGame: Everything needed to start a game: its component types, its start scene, how it loads its other scenes and prefabs, and the project it came from.
- LocalPlayerInput: One player’s share of this machine’s controls (see
LocalPlayers): the keys of their side of the keyboard (or all of it, with the mouse), and their own controller. - LocalPlayers: The people playing at this one machine: two at one keyboard (one on WASD, one on the arrows), on two controllers, or one on the keyboard and one on a controller, each moving their own character.
- MessageListener: Something listening for a message sent with
Send, made with a behavior’sOnorOn. - NetPlayer: Someone in a network game: the host, or a player who joined.
- NetRole: What this machine is in a network game.
- NetSession: A network game in progress on this machine: hosting one, or joining or playing in someone else’s.
- NotSavedAttribute: On a field of a script (a
Behavioror aGameSystem) or of an object one keeps: a saved game leaves it out, so after a load it holds what the script’sStart(or its class) made it: a cache worked out again from the rest, a list kept only to reuse, something set up again inOnLoaded. - OverlayShapes: Shapes and colors the genres’ overlays and HUDs draw with, belonging to the screen rather than any entity.
- Physics: Simple, predictable 2D physics for jam games.
- PlayerDevice: What a player at this machine plays with (see
LocalPlayers). - PrefabChange: A prefab file found to have changed (
Changed). - PrefabLibrary: Creates entities from a project’s prefab files, for
PrefabLoader. - ProjectModules: The modules a game uses (see
GameModule): those a component of which is in one of its scenes or prefabs, and those its scripts were built against. - RaycastHit: Where a ray first touched a collider or a solid tilemap.
- SaveData: Small values that outlive the game: high scores, unlocked levels, settings.
- SaveReader: What a script that saves its own model (
ISavesState) reads back from a saved game. - SaveUpgrade: A game saved by an earlier version of the game, as an
ISaveUpgraderis handed it before it’s read: its scene and the scenes it remembers as the scene file has them (entities by name, components by their saved type name, values by property name), and its flags, to change as this version needs. - SaveWriter: What a script that saves its own model (
ISavesState) writes into a saved game. - SavedGame: A game saved in a slot (see
SaveGame): when it was saved, the scene it was in and the line being said then, and its screenshot. - SceneCounter: Counts a scene (see
SceneCounts) a slice of its entities at a time, so a big one is counted over several goes without holding up a frame: 20,000 entities take about 3.6 ms to count at once in a Debug editor. - SceneCounts: How many entities a scene holds, how many of them are active (the game runs and draws them), and how many of each kind of component the active ones have, the most first (every entity’s Transform left out).
- ScreenLayout: Puts what’s pinned to the screen (
ScreenAnchor) at its point on the main camera’s view: the game each frame (on the window’s shape), and the editor after each edit (on a 16:9 screen), so the Scene view shows a HUD where the game will. - ShadowEdge: One side of something that blocks light, in the world.
- Shadows: What blocks the light of a
LightwithShadowson: solid tiles (slopes included, and hex maps’ hexagons) and solid colliders (boxes, circles and polygons, as they’re turned). - SilentAudio: Audio that does nothing: for tests and headless runs.
- SilentLoop: A loop that makes no sound, for tests and headless runs.
- StepId: Names one step of the frame (see
Frame) for another step to go next to: Griff’s own are the members ofSteps, and a module’s come back fromStepAfterandStepBefore. - Steps: Griff’s own steps of the frame, in the order they run (see
Frame), for a module to put its steps next to (StepAfter). - Time: Game time.
- Timeline: Rewind for play mode: keeps periodic snapshots of the running scene so you can step back in time, inspect or tweak, and resume from there.
- TouchPoint: A finger on a touch screen (see
Touches): which one it is (the same from when it goes down until it’s lifted), where it is in world units, and whether it went down or was lifted this frame. - Tween: A value animated over time, made with
Tweenor a behavior’sMoveTo,ScaleTo,RotateToandFadeTo. - Views: How a scene is seen, which a running game asks as it plays and the renderer reads as it builds a frame (see Griff.Rendering’s SceneRenderer): the main camera and how much of the world it shows, the view’s projection, what’s pinned to the screen, the order things are drawn in (what’s on top), and the lights reaching into the view.
- WaitCondition: Yield from a coroutine to wait until
IsDoneis true. - WaitSeconds: Yield from a coroutine to wait this many seconds of game time.
- WindowSize: A size of the game’s window in pixels, as a player picks it from an options menu (see
WindowSize): written and read as “1280x720”. - Workers: The threads Griff spreads a big scene’s work over: building a frame of thousands of sprites, and running a crowd of scripts (see
CrowdAttribute).
Griff.Scenes
Section titled “Griff.Scenes”- ActionAttribute: Marks a method of a component as something it does that anything in the game can set off with no code: a
Triggerwhen a message arrives, a wire as its signal comes on (see the Contraptions module’s Wire), or a script withGame.Do. - ActionNameAttribute: Marks a string property as naming an action (see
ActionAttribute) of the entities another of the component’s properties names, or of its own entity: the editor’s Inspector lists their actions to pick from, and flags a name none of them has. - ActionNames: Fields that name an action (properties marked
ActionNameAttribute, a trigger’s Do): the actions of the entities they’re done on, and a name none of them has, which the Inspector flags and the game reports as it starts (what the Inspector lists to pick from is Griff.Editing’s NameChoices). - ActionValueAttribute: Marks a string property as the value an action is done with, the action named by another property (a trigger’s With, for its Do): the Inspector gives a number, a tick for true or false, or the names it takes (flags for Set Flag, scenes for Load Scene), as the action wants, and flags a value that isn’t one.
- Amounts: Names and how many of each joined with “+” (“Wood + Coal 2”), as a
Amountscell holds them. - Anchor: A point on the screen’s edge (or its middle) that a
ScreenAnchorholds an entity to. - Animation: Plays frames of the entity’s sprite sheet:
FrameCountframes starting atFirstFrame. - AnimationClip: One named animation of an
Animation’sClips. - AreaAttribute: Marks a component’s
Boxproperty as the part of the world it covers: aRoom’s, a tilemap’s, a collider’s, a strategy map’s. - AssetFileAttribute: Marks a string property as a file in Assets that its name doesn’t say it is (a deck’s Back is a picture, note lanes’ Song is music): the Inspector gives it the picker, preview and maker that image and sound fields get.
- AssetFileKind: What kind of file in Assets an
AssetFileAttributeproperty names. - Attack: Close-up attacks with no code: a sword swing, a punch, a bite.
- AutoTilesAttribute: Marks a string property as runs of 16 tiles that fit themselves to their neighbors (“16-31, 48”, see
AutoTiles): the Inspector lists each run with its 16 pieces shown. - Autosave: Saves the game by itself while its scene is played, in a slot of its own (“Auto”) that a Continue button loads like any other saved game, it being the latest: as the scene starts (a checkpoint as the player arrives), every few minutes of play, and as the game is closed.
- BackgroundMusic: Music for the scene: it starts when the scene does, crossfading over
Fadeseconds from whatever was playing. - Backlog: A log of the lines said so far, to read back: each with who said it and the choices picked, newest at the bottom, scrolled with the mouse wheel, the arrow keys, the D-pad or stick, Page Up and Down, or by dragging it (a finger on a touch screen).
- Bar: A bar that fills up to show
Valueout ofMax: health, a boss’s health, charge, a timer. - BarDirection: Which way a
Barfills up. - BarImages: Pictures for the parts of a bar (see
BarandBar): theFill’s, laid over the whole bar and shown only as far as it’s full, and theBackground’s, shown whole, as a nine-slice whenSliceis more than 0 (likeSliceandSliceSize). - BeatClock: Keeps time with the music: counts its beats and bars as they’re heard (allowing for the sound card’s delay and the player’s own audio offset,
Game.AudioOffset, which aCalibrationmeasures), and sendsBeatMessageon every beat andBarMessageon the first beat of every bar, so sound players, counters, scripts andBeatPulses can follow along, andSpawners,Shooters,Movers andSwitches with Beats set step to it. - BeatPulse: Bops its entity on the beat of a
BeatClock: it’s drawn bigger bySizeas each beat lands and shrinks back before the next, ahead by the player’s visual offset so it’s seen on the beat that’s heard. - Body: Makes an entity with a
Collidermove under velocity and gravity and collide with solids. - Bouncer: A spring, jump pad or bumper, with no code: bodies touching it from the
Directionside are sent flying that way atStrength. - BoxCollider: A box for collisions, centered on the entity (plus
Offset) and scaled by its transform. - BumpAttack: A roguelike’s attack, with no code: its
GridMovementstepping into something withHealthon itsLayershurts it byDamageinstead of bumping, with a lunge toward it and back over a step’s time. - Button: Makes the entity clickable: it lightens under the mouse, darkens while held, and clicks when the mouse is released over it.
- ButtonAction: What a
Buttondoes by itself when clicked, before any script hears about it. - Calibration: Measures how late this player hears the game’s sound (speakers with a delay of their own, like Bluetooth headphones) or sees its screen, and offers to set their offset to it: it plays clicks (or, measuring Visual, flashes its light in silence) on a steady beat, the player taps along with its
TapAction, a click or a touch for a few bars, and it works out how long after each beat the taps came, leaves out the odd ones and offers their average as theResult, which its Apply action makes the player’sGame.AudioOffset(or VisualOffset), kept in their save data. - CalibrationKind: What a
Calibrationmeasures. - CalibrationState: Where a
Calibrationhas got to. - Camera: What the game sees.
- CameraControls: Pan and zoom with no code, for management, building and strategy games: put it on the camera, in place of a
Follow. - CameraDrag: What a
CameraControls’ mouse drag pans with. - CategoryAttribute: Where a component is listed in the editor’s component catalog, e.g.
- CellKind: What a cell of a
RowsAttributerow holds, and so how the Inspector edits it. - Chart: A line or bar graph for the HUD or the world: a few series (a name and a color each) of numbers, the last
Keepof each, drawn in itsSizewith value lines and their numbers, a legend and labels along the bottom. - ChartKind: How a
Chartdraws its points. - ChartRange: Round numbers for a chart’s range: what the editor’s charts and a game’s
Chartfit their points to. - ChartSeriesAttribute: Marks a list of strings as a
Chart’s series, one per row: a name, a color and optionally an output it samples, written “Cards: #4C9AFF = Cards Today”. - Chase: Goes after a
Targetonce it’s withinRange, with no code: zombies, bats, homing mines. - Checkpoint: A place to come back to: when something it accepts (see
Layers) touches it, it becomes the active checkpoint, and aHealthwithRespawncomes back here after dying. - Choice: Turns a
Buttoninto a picker of one of severalOptions: “Difficulty: Normal”. - ChoiceOfAttribute: Marks a string property as naming one of what another member of its component lists, e.g. an animation’s
Clipone of its clips: the Inspector picks from them, and flags a name that isn’t one. - ChoicesOfAttribute: Marks a string property as several names picked from what another member of its component lists (an AI fighter’s Use Moves, from its fighter’s moves), separated by commas: the Inspector ticks them from a list, and flags a name that isn’t one.
- CircleCollider: A circle for collisions, centered on the entity (plus
Offset). - ClaimsKeysAttribute: Marks a component as using keys (and the mouse wheel) for itself while it’s on an entity: other controls on that entity that could read them too leave them to it, and ask
KeyClaimsfirst. - ClipArea: A part of the world draws are cut to (see
Clip): a scrollingLayout’s area. - ClipsAttribute: Marks a string property as an
Animation’s clips (“Idle 0-3, Run 4-9 @12, Die 11-15 once”, seeParseClips): the Inspector lists them a row each, with their frames, speed and whether they play once, and opens the Clip Editor to see them play. - Collider: A shape for collisions: a
BoxCollider, aCircleCollideror aPolygonCollider. - CollisionLayers: Matching collision layer names: case doesn’t matter, and an empty layer is called “Default”.
- Component: A piece of data or behavior attached to an
Entity. - ComponentAction: One thing a component does that anything can set off (see
ActionAttribute): its name, what it’s done with, and the call itself, which allocates nothing. - ComponentActions: The actions (
ActionAttribute) and powered properties (PoweredAttribute) of component types, found the first time each type is asked about and kept for as long as it’s loaded. - ComponentAreas: The areas of component types (see
AreaAttribute), found the first time each type is asked about and kept for as long as it’s loaded. - ComponentFocus: The properties of component types that say whether they take the player’s input (see
FocusAttribute), found the first time each type is asked about and kept for as long as it’s loaded. - ComponentList<T>: The components of one type in a scene, as they were when asked for (see
All), in hierarchy order: entities depth first, and each entity’s in the order they’re attached. - ComponentModel: What a component type exposes, worked out once per type: what’s saved (
Saved), what anything can set off and read (Actions,Outputs), whether it takes input (Focus), the part of the world it covers (Area), what it sends in a network game (Sent), what tables and cards may set (Settable) and what agents read and set (Live,Saved). - ComponentNameAttribute: Sets the name a component type is saved under.
- ComponentOutput: One thing a component knows that anything can read (see
OutputAttribute): its name, what it gives, and the read itself, which allocates nothing. - ComponentOutputs: The outputs (
OutputAttribute) of component types, found the first time each type is asked about and kept for as long as it’s loaded, and reading one by name. - ComponentVersionAttribute: The version of a component’s saved data, 1 without this.
- ControlsList: A controls screen with no hand-placed buttons: while the game runs it makes a row for each input action, its name and a Rebind button showing its keys (“Drop Tool” and “Esc / Right Click”), that the player clicks and then presses a new key for.
- ControlsShown: Which input actions a
ControlsListlists while itsActionsis empty. - Conveyor: Belts on a grid that carry items: a factory’s lines from machine to machine.
- ConveyorCell: One cell of a
Conveyor: its column and row (counted as a tilemap’s are, row 0 at the top), the way it carries (x right, y up, as a grid mover steps) and what it is. - ConveyorCellKind: What a cell of a
Conveyoris. - ConveyorPort: Where a machine meets a
Conveyor, at the cell it stands on: an In port takes what reaches the end of a belt pointing into its cell (or ending on it) into the machine, and an Out port puts what the machine made onto the belt on its cell, or one next to it leading away. - ConveyorPortKind: Whether a
ConveyorPorttakes items off a belt or puts them on. - Counter: Keeps count and shows it in its entity’s
Text: a score, coins, kills. - CounterReach: When a
Counterdoes something as its count reaches a value. - CountsAttribute: Marks a string as names and how many of each, separated by commas: “Coin 3, Map” (a count of 1 left out).
- Crumble: A platform that gives way, with no code: once something on its
Layersstands on it, it shakes forDelayseconds and falls away, coming backRespawnseconds later. - DamageOnTouch: Hurts whatever with
Healthit touches, with no code: spikes, lava, enemies, bullets. - Dialogue: Lines of talk shown one after another in a dialogue box, with choices that branch it, flags that remember what was said, and no code.
- DialogueBox: Makes an entity a dialogue box that shows who’s talking: the
Speaker’s name in itsNameTagand their picture in itsPortrait, each hidden when there’s nothing to show (a sign, someone without a portrait). - DialogueLinesAttribute: Marks a list of strings as a
Dialogue’s lines (seeLines): the Inspector shows them with the Dialogue Editor a click away, which builds each line’s speaker, choices, where they go and its tags from lists, and flags a go-to to a part that isn’t there. - DialogueStart: When a
Dialoguestarts. - DialogueTagsAttribute: Marks a component that dialogue lines direct with tags of its own, starting with these words, e.g. a visual novel stage’s “[show Ava left happy]”: a row of a
Dialogue’s lines starting with one in square brackets is a tag rather than said, done as the line is said by what the component’s module registers for it (GameSetup’s OnDialogueTags, which takes the words from here: they are written once). - DiceAttribute: Marks a string property as dice, as tabletop games write them (“2d6+3”, “d20”, “1d8+1d6-1” or a plain number; see
Dice): the Inspector builds them from how many dice, how many sides and what’s added, and says the lowest, highest and average roll. - DiceRoll: Dice written as text (a component’s “2d6+3”), read once when the text changes: rolled each hit with Rand, or the plain number when it’s empty (or doesn’t read as dice).
- DirectionAttribute: Marks a
Vector2as a direction, e.g. which way a shooter fires or a bouncer launches: (0, 1) is up and (1, 0) right. - DistanceAttribute: Marks a number property as a distance from the entity in world units, e.g. how far a light reaches or how close an enemy notices the player: with the entity selected, the editor’s Scene view draws it as a circle around it, and View > Distance Handles puts a handle on the circle to drag.
- Door: Takes whoever uses it somewhere else, with no code: a level’s exit to the next
Scene, or a door or teleporter to theTargetentity in this one. - Draggable: Something the player picks up with the mouse and drops somewhere else: a card, a puzzle piece, an item in an inventory, a word to put in order.
- DrawSteps: Where a drawable component’s draws go among its entity’s others (see
DrawStep), lower first. - Drawing: What a
IDrawabledraws into: the entity it belongs to, what the camera sees, and quads, lines and text to add. - DropTarget: A place to drop
Draggablethings: a slot in an inventory, a card’s place on the table, a hole a puzzle piece fits, a bin. - EdgePointer: Points the way to something off the screen, as a strategy game’s objective marker does: while its
Targetis out of the camera’s view, the entity sits on the screen’s edge (in byMargin) where the line from the screen’s middle to the target crosses it, turned to point at the target, and slides along the edge as the camera pans or zooms. - EdgePointerInView: What an
EdgePointerdoes while what it points at is in view. - Entity: A thing in a scene: a name, a
Transform, any number of other components, and child entities. - EntityNameAttribute: Marks a string property as naming an entity, e.g. what a camera follows or what a switch turns on: the editor’s Inspector lets you pick one from a list of the scene’s entities or drop one on it from the Hierarchy.
- EntityNames: The one way a name finds an entity, in the running game, in renaming, in the Inspector’s flags and for agents, so the same text means the same entity everywhere.
- EntityReferences: Fields that name entities (properties marked
EntityNameAttribute, a Switch’s Targets or a camera’s Follow target): renaming an entity renames it in them too, and a name that matches nothing can be flagged. - FieldEditorAttribute: Gives a property an editor of its own in the editor’s Inspector, in place of the plain box its type gets, for a value written in a little language of its own: dice, points, tile numbers, clips.
- FieldKind: What kind of field a component’s property is, worked out once from its type, its attributes and its name (see
Kind): the Inspector edits it with this kind’s editor,component_describetells agents what it is, and the tests read the same answer. - FocusAttribute: Marks a component’s true-or-false property as whether it takes the player’s input: a movement’s Controllable, a board’s, the strategy commander’s, the tactics controls’.
- FocusFromAttribute: Marks a component that reads the player’s input but has no focus of its own (see
FocusAttribute): it takes the input only while theTypeit goes with has focus, so the Focus action given to that hands it over too. - Follow: Moves the entity after another one, smoothly: a camera after the player, a pet after its owner.
- FormatAttribute: Marks a string property as text with holes the game fills in as it shows it, e.g. a counter’s “Score: {0}” or a save slot’s “{date} {time}”: the Inspector has a button for each hole, says what each is, and shows how it reads now.
- Formats: The small text formats a field is typed in, each read one way: names (“Bullet, Enemy”), points (“4 0; 4 3”), numbers by kind (“0:20, 3:15”) and items (“150 Gold, Wood 50”, see
Items). - FormerNameAttribute: An earlier name, so scenes saved before a rename keep their values.
- GameSetting: A setting of the game itself that a
Slider,ToggleorChoicecan change with no code. - GameSpeed: The game’s speed, with no code: a sim’s speed buttons (pause, 1x, 2x, 4x, 16x) set it with their Do action (“Set Speed” with 4, or Faster and Slower), and so can a
Triggeron a key’s message or a script. - GenericFields: The editors the Inspector gives fields that have no editor of their own, by their type and what they hold, so a new component’s or script’s field never has to be typed as code: a list of strings is rows (
ListRowsAttribute), or names and values (PairsAttribute) when every line reads “name: value” or “name = value”, their values numbers or colors when they all are. - Grabber: Picks up
Draggablethings with a button and carries them, for games played with a controller or keys: a cursor moved with the stick or the D-pad (give it aTopDownMovementor aGridMovement), or a character who carries things about. - GridCells: The cells grid movers step between: a tilemap’s (its transform and tile size), or with none, world units centered on whole numbers.
- GridChase: Steps its
GridMovementafter aTargetonce it’s withinRange, tile by tile and around walls, with no code: a roguelike’s monsters, a maze’s ghosts, a dungeon’s slimes. - GridMovement: Steps tile by tile with no code, for puzzle games, roguelikes and old-school RPGs: as a player, each press of WASD, the arrow keys, the D-pad or the stick moves it one cell of the scene’s
Tilemap, gliding there overStepTime, and holding a way keeps it walking. - GridPatrol: Walks its
GridMovementround a route of cells with no code: guards, villagers, a maze’s sentries, a block that slides back and forth.Pointsare steps from where it’s placed, e.g. - GridWalls: Where a grid mover can’t go, gathered once so a search can ask about many cells: off its map (when it has to stay on), solid tiles on any tilemap, solid colliders over a cell’s middle, a solid conveyor’s belts (not its crossings), and the cells other grid movers are in or heading into.
- GroupAttribute: Starts a subheading in the editor’s Inspector, e.g.
[Group("Dash")]: this property and the ones declared after it in the same class, up to the nextGroupAttribute, go under it, and fold shut together. - Health: Hit points.
- HingeJoint: Pins its
Bodyto another body (To), or to a point in the world, at one point (itsAnchor), so it turns there: a wheel on a cart, a door, a flipper, a seesaw, a windmill. - IActionReady: A component whose actions (see
ActionAttribute) can’t always be done: a fighter’s spell without the mana, any move off its turn. - IArrivalSpot: A component that says where someone arriving at its entity stands (an adventure’s hotspot: where the walker stands to use it), for a door’s Arrive At in the scene before.
- IBeats: The beat clocks.
- IClipsChildren: A component that cuts what’s drawn inside its entity (its children, and theirs) to an area: a
Layoutwith Clip. - IDialogueStarter: A component that starts the
Dialogueon its entity itself (an adventure’s hotspot, when it’s used), so the dialogue needs no collider for the player to touch. - IDialogues: Dialogue being said.
- IDrawEffect: A component that changes how its entity is drawn without drawing anything itself: a button shading its sprite under the mouse, a platform shaking before it falls, a card being dragged drawn over everything.
- IDrawable: A component that draws something: Griff’s own (sprites, tilemaps, text, bars, particles, boards) and scripts’ alike.
- IDrawsTilemap: A component that draws its entity’s
Tilemapitself (a match-3 board, its gems sliding and falling), so the tilemap draws none of its own tiles. - IFlags: The flags kept in the game’s save data.
- IGameService: One thing the game running a scene does for a component that asks: a component holds its own state and advances it when its system asks, and when one of its actions or steps needs the game (a panel opening, a volley fired, a flag set) it names the service it needs by type, as an action’s first parameter or what its system hands its step.
- IGameServices: The services of the game playing a scene, asked for by type:
Game.Services.Get<IFlags>(). - IGridDriver: A component that moves its entity’s
GridMovementitself, so the player’s keys don’t: a chaser, a patrol, a crate that’s pushed, a tactics unit sent somewhere. - IHealthNews: What an entity’s scripts hear of its
Health(their OnDamage and OnDeath), told at once, whatever dealt the damage: Health reaches it through the services of the game playing its scene (Services). - IHearsMessages: A component that does something when a message is sent with
Game.Send, with no script listening: a dungeon going down a floor on its Next Floor Message. - IHoldsItems: A component that holds items and resources: an
Inventory, a strategy faction’s resources, a card hand’s mana. - IInputFocus: Who has the player’s input.
- ILightSource: A component that gives off light in a dark scene, besides
Lights: glowing blocks of a world. - IMinigames: Minigames played on top of the scene.
- INetSecret: A component that keeps its entity (and what’s inside it) from some players in a network game: their machines aren’t sent it at all, so nothing there can read it, not even by looking at what arrives.
- INetState: A component that says for itself what it sends in a network game, besides its saved and
SentAttributeproperties: values it keeps in a form that can’t be sent as it is (a board’s gems, sent as lines of text), or a property it doesn’t send just now. - IPanels: Panels open over the game.
- IPlayerOffsets: The player’s own settings for how late they hear and see the game.
- IPlaytestReport: A component that tells an agent playing the game (the MCP’s play tool) what it’s up to, beyond where its entity is: a tactics unit’s cell and whether it can act, the unit the mouse has picked.
- IPointOutline: A component whose shape is a ring of points round its entity, written in a string property called Points as “x y” pairs separated by semicolons, in its own units (a
PolygonCollider, an adventure’s walk area or hotspot): the editor’s Scene view puts a knob on each point to drag and a plus on each side to drag out a new one, a double-click takes one off (it keeps at least three), each change one undo step, and a click inside it where nothing is drawn selects it. - IProjectNames: What a project’s tables say, as a field’s editor asks while it’s edited (see
NoteandMoreChoices): the editor knows the project’s names and hands them over through this, so a component’s rows can say what a cell names without the scene’s data knowing the editor. - ISceneTravel: Going from scene to scene.
- ISelectionRules: What a
SelectionStateasks of the game it selects in: what a click or a box picks, what a double-click picks, and what a Shift-click can add. - ISortsInParts: A drawable whose draws sort in several places among the rest when the camera sorts by Y, each part at its own height (it marks them with
SortAtas it draws): a tilemap sorting its rows of tiles by Y. - ISounds: The sounds the scene plays.
- ISpawning: Spawning prefabs (the game’s lifetimes: what’s made and what’s destroyed).
- ITeamMember: A component that puts its entity (and what’s inside it) on a team: a
Team, aTurnTaker, a strategy unit, building or faction, a fighter’s hitboxes. - ITurnReady: A component on a
TurnTaker’s entity that gets ready as each of its team’s turns begins, before the turn is announced (a tactics unit can walk and attack again). - IViewFocus: Any component that says what the view is centred on, such as a
Followon a camera: a screen effect that closes in on the action (the iris) looks there, with no entity called anything in particular. - IVolleys: Shooters’ volleys.
- IWorldPlaced: A component with places in the world it keeps as numbers of its own (a strategy map’s middle), which move with it when the game sets what it’s in somewhere else (a minigame, beside the rest of the world).
- InSceneAttribute: Marks a string property as naming something in another scene, the one another property names (a hotspot’s Arrive At, in the scene its Goes To names): the Inspector lists that scene’s hotspots and other entities to pick from.
- Inventory: What an entity is carrying: keys, potions, the parts of a machine, gold, blocks.
- ItemCountsAttribute: Marks a list of strings as items and how many of each, one a line: “Key 2”, or “Key” for one (an inventory’s Items).
- ItemUsesAttribute: Marks a list of strings as what items do when they’re used, one a line: the item, a colon, and what it does, several separated by commas: “heal 3”, “spawn Explosion” (a prefab), “send Teleport” (a message), e.g.
- Items: Items and resources, the one idea every genre shares: an item is a name (“Key”, “Gold”, “Dirt”, “Mana”) and how many, held by anything that holds items (see
IHoldsItems). - KeepBetweenScenes: Carries its entity (and everything inside it) into the next scenes the game goes to, still running: the player with their health and inventory from level to level, a music player that doesn’t restart, a score kept on screen.
- KeyClaims: Asks what an entity’s components have claimed (see
ClaimsKeysAttribute). - Ladder: Something to climb: a
PlatformerMovementtouching its collider climbs it with up and down, without gravity, and jumps off it with Jump. - Layout: Lines up the entity’s children in a list or a grid, so nothing has to place them: a board of offer cards, a list of quest rows, a shop’s shelf.
- LayoutDirection: Which way a
Layoutlines up its children. - LetterCountsAttribute: Marks a string property as letters, each from a set and each as many times as it comes: a falling-block board’s pieces, “IJLOSTZ” (each once) or “IIO” (twice as many I’s).
- Lifetime: Destroys its entity after
Secondsof game time, optionally fading it out first: bullets, effects, popups. - Light: Lights up the dark around its entity: a torch, a lamp, a glowing mushroom, the player’s lantern.
- LightSpot: A spot of light a component gives off (see
ILightSource): its middle in the world, how far it reaches, its color and softness. - LineCell: One cell of a line laid on a grid (see
LineToolandLineDrag): its column and row (counted as a tilemap’s are, row 0 at the top), the way the line leaves it and the way it came in (x right, y up, as a grid mover steps and aConveyorcarries), and whether it can go there. - LineDrag: A line dragged on a grid from one cell to another, and the rule that lays it: straight along one axis, then (with
Corners) round one corner and along the other, each cell pointing on to the next. - LineFirstLeg: Which leg a dragged line with a corner runs along first (see
LineDrag). - LineJoin: How a cell of a line joins a line already there (see
Join). - LineTiles: The tiles a line laid on this tilemap is drawn with: a straight piece and a corner, each drawn once and turned to follow the line (see
TileTurn), and if you like, pieces for its two ends. - LineTool: Lets the player lay a line on the grid by dragging, as a factory game’s belt tool does: press on a cell, drag, let go.
- LineWay: Which way a single cell of a line points: the way R turns it, clockwise.
- ListOfAttribute: Marks a string as a list of one thing per row (no counts): each a name picked from what the project has, or one of a fixed few (
Choices), in order, separated by commas or whatSeparatorsays. - ListRowsAttribute: A list of strings shown a row each, one thing a row: words, numbers (
Number) or colors (Color), to set, add, remove and reorder. - MessageAudience: Who hears the messages an entity sends (see
MessageScope). - MessageScope: Keeps the messages this entity and everything inside it send to part of the scene instead of everyone: a board’s Score, a switch’s On Message, a goal’s Covered.
- Minigame: Plays another scene on top of this one as a minigame, with no code: an arcade cabinet in a platformer that opens a match-3 board, a lock picked in a falling-blocks puzzle, a card duel in an adventure.
- MinigameRoot: The game puts this on the entity a minigame is played in (see
Minigameand a trigger’s Play Minigame): what the minigame scene had, under one entity of its own, set beside the rest of the world. - MissingComponent: Stands in for a component whose type couldn’t be found when the scene was loaded (for example, a script that was deleted or renamed).
- Mover: Moves its entity along a path with no code: moving platforms, lifts, saws, patrolling hazards.
Pointsare offsets from where it’s placed, e.g. - MoverMode: How a
Movergoes round its points. - Multiplayer: Makes the scene a multiplayer game.
- NameChecks: The names a scene gives without code that resolve to nothing: an action a trigger, button or card does that what it’s done on can’t do, an output a counter, bar or wire reads that what it reads hasn’t got, and a name picked from what its component lists that isn’t listed.
- NameKind: What a
NamesAttributefield names. - NameListAttribute: Marks a property as a list of names in order: a string separated by commas (a turn order’s “Player, Enemy”) or a list of strings, one a line (a choice’s options).
- NameLookup: How
Findnarrows a name down. - NameScope: Where
Findlooks. - NameTag: Shows the name of the player an entity belongs to in its Text, e.g. on a child just above each player’s character, so everyone can see who’s who.
- NamesAttribute: Marks a string property as naming a prefab, scene, input action, collision layer, message, table, table row, font, item, flag, kind or saved value: the editor’s Inspector lets you pick one from a list of those the project has, and flags a name that matches none of them.
- NetLocalAttribute: Each machine in a network game keeps its own copy of an entity with this component: a camera, the HUD, a menu, the music.
- NetMovement: Who moves a player’s character in a network game.
- NetState: What an
INetStatecomponent sends: seeNetwork. - NetSync: Who keeps an entity: shared by everyone in a network game, or each machine’s own.
- Networked: How an entity takes part in a network game.
- NotSentAttribute: Keeps a saved property from being sent in a network game: each machine works it out for itself (an animation’s time) or nobody else needs it (how old something is).
- NumberFormatAttribute: Marks a string property as how a number is written, a .NET number format: “0” whole, “0.00” two decimals, “0.##” up to two, “000” three digits.
- OffsetAttribute: Marks a
Vector2as a point offset from the entity, e.g. where a light shines from or where a shooter’s shots appear: with Distance Handles (D) the Scene view puts a knob there to drag. - OutputAttribute: Marks a property of a component as something it knows that anything in the game can read with no code: a
Counter, aBaror aTextshows it, and a wire (see the Contraptions module’s Wire) carries it. - OutputFormatAttribute: Marks a string property as text that shows an output when another property names one, with
{0}for the output and{1}what it’s out of, each with a format after a colon if it says (“Gold: {0}”, “{0} / {1}”, “{0:0.0} m/s”): aText’s Value. - OutputNameAttribute: Marks a string property as naming an output (see
OutputAttribute) of the entity another of the component’s properties names, or of its own entity (or what it’s inside) without one: the editor’s Inspector lists their outputs to pick from, and flags a name none of them has. - OutputNames: Fields that name an output (properties marked
OutputNameAttribute, a counter’s, bar’s or text’s Output, a wire’s): the outputs of the entity they read, and a name it hasn’t got, which the Inspector flags and the game reports as it starts (what the Inspector lists to pick from is Griff.Editing’s NameChoices). - OutputReader: Reads one output (see
OutputAttribute) for a component that shows or carries it (a counter, a bar, a text, a wire), finding it by the names in that component’s fields once and again only when they change or what it found leaves: reading it every step allocates nothing. - PairsAttribute: A list of names, each with a value: “Sword: 30” a line (or “Sword = 30”,
Separator), as a dictionary holds them. - Panel: A menu that opens over the game and closes again: a pause menu, an options panel, a shop, a map.
- Parallax: Makes a background layer scroll slower than the world as the camera moves, for depth: far hills at 0.2, near trees at 0.7.
- Particle: One live particle, in world space.
- ParticleEmitter: Sprays small fading quads: smoke, sparks, dust, explosions.
- Patrol: Walks back and forth with no code, turning at walls, (optionally) at the edges of what it stands on, and at
LeftandRightwhen they’re set: a platformer’s basic enemy. - PauseGroup: Makes its entity and everything inside it a group that can be paused on its own while the rest of the game runs on: a match-3 minigame on an arcade cabinet, one player’s half of a split screen, the world behind a shop.
- Pickup: Something to collect, with no code: coins, gems, hearts, keys.
- PlainTextAttribute: Says plain text is right for a property that takes text or a list of it, and why: words it shows or says, a name it gives itself that nothing else names, or what the game writes as it runs (
[PlainText("words it shows")]). - PlatformerMovement: A platformer’s player with no code: runs with A/D, the arrow keys, the D-pad or the stick, and jumps with the Jump action (Space or the gamepad’s A), forgivingly: a jump pressed just before landing still happens, and one pressed just after running off a ledge still counts.
- PlayedBy: Which of the people playing at this one machine plays the entity (and everything inside it): Player 1, 2, 3 or 4, each with their own keys or controller.
- PlayerMovementAttribute: Marks a component that moves its entity for the player who controls it, with no code: a platformer’s or top-down game’s movement.
- PlayerSpawn: A place players appear when they join, and when the scene starts.
- PointsAttribute: Marks a string property as a list of points, “x y” pairs separated by semicolons (“4 0; 4 3; 0 3”): the Inspector lists them a row each, with X and Y to set, and adds, removes and reorders them.
- PolygonCollider: A shape for collisions with straight sides between its
Points: a ramp, a wedge, a rock, a hill, a boat’s hull, a cup. - PolygonParts: The shape a
PolygonCollider’s points make, as physics uses it: fixed up where the points don’t make a proper shape (too few, all in a line, sides crossing), going round anticlockwise without repeated points or points along a straight side, and split into convex pieces of at mostMaxCornerscorners each, so a concave shape (an L, a cup, a crescent of rock) collides as the pieces it’s made of. - PoweredAttribute: Marks a component’s true-or-false property as what a
Switch(or a wire into Power) turns on and off, e.g. a mover’s Running or a particle emitter’s Emitting. - PrefabCountsAttribute: Marks a list of strings as prefabs and how many of each, a line each: “Enemy 4”, “Potion 1-2” (a number picked between them) or “Gold” (one).
- PrefabVersion: One version of a prefab file: its text as it was then, and an id that says which it is.
- Problem: One mistake in a game’s data (a prefab that isn’t there, a name that finds nothing, a row that doesn’t read), said once: what it is, and the entity and component it was found on when there is one, so the Inspector can flag the component and an agent can find it.
- ProblemLog: The one place a mistake in a game’s data goes (see
docs/architecture.md): a game, a loader, the scene serializer and a simulation all report here, and the editor’s Output, the Inspector and the agent tools read from here. - Pushable: A crate that bodies push along by walking into it, with no code: sideways in a platformer, any way in a top-down game (when its
Body’s Gravity Scale is 0). - Quads: Quads for shapes, belonging to an entity: what
Drawingdraws with, for code that builds its own lists. - RememberScene: Makes the scene it’s in remember how it was left: going to another scene and coming back finds it as it was (crates where they were pushed, enemies beaten, doors opened, pickups taken, a boss’s health) rather than as the scene file has it.
- RequiresAttribute: Says a component only works with another one on the same entity, e.g.
[Requires(typeof(Body))]. - ResizableAttribute: Marks a
Vector2as the size of a rectangle around the entity, in its own units before its scale: a button’s clickable area, a bar’s or slider’s size, a save slot’s screenshot. - RollsForAttribute: Marks a text property holding dice (
"1d8+2") that are rolled each time the number property it names is used: a hit’s damage rolled for each hit rather than once. - Room: One room of a level, for a camera that moves room by room (a Metroidvania, a dungeon, Celeste’s screens).
- Rope: A rope from its entity to another (
To), to a point in the world, or hanging loose: it hangs and sags under gravity, swings, lies over what it falls on and wraps round corners, and holds what’s tied to it no further than itsLength: hang a crate or a lamp from the ceiling, tie a balloon to a box, tow a cart, swing a wrecking ball. - RowColumn: A column of a
RowsAttribute’s rows: what its cells hold and what the Inspector calls it. - RowsAttribute: Marks a property as a list of rows, each of a few cells (a
RowColumneach): items and how many, a tile and what it drops, a position’s name and where it is. - SaveSlot: Shows a saved game’s slot, for a save or load screen: the game’s screenshot, when it was saved, and the line being said then (or “Empty”).
- SavedData: A component’s saved values as an
UpgradeFromAttributestep sees them, before they’re read into the component. - Scene: A tree of entities.
- SceneTransition: How the screen covers up a scene change (and uncovers the next scene).
- Scope: The part of a scene something works on, from a property naming an entity (a
TurnOrder’s Within): the whole scene when it names none; otherwise that entity and everything inside it (a group), and whatever stands in the part of the world it covers (an area: aRoom’s, a tilemap’s, a collider’s; seeAreaAttribute). - Scoreboard: Lists who’s in a network game in the entity’s Text, one player a line: name, team, score and ping, best score first.
- ScreenAnchor: Pins the entity to a point on the screen, for HUDs and menus: a score in the top-left corner stays there whatever the window’s shape, and it doesn’t move when the camera follows the player or shakes.
- ScreenEffects: Changes the look of the whole screen, HUD included: a dark vignette round the edges, an old TV’s scanlines and curved glass, big chunky pixels, color fringes, and the colors themselves (saturation, contrast, brightness, a tint, or a handheld’s four greens).
- ScreenLook: A
ScreenEffects’s settings as one frame is drawn with them (between the game’s last two steps, for settings a script tweens): what the renderer applies to the finished screen. - ScreenPalette: A limited set of colors for
Paletteto draw the whole screen in. - Selectable: Something the player selects as in a strategy game, with a
SelectionControls: a worker, a machine, a truck. - SelectionControls: Selecting as in a real-time strategy game, with no code: put it on the camera, and
Selectableon what can be selected. - SelectionState: What’s selected, the way real-time strategy games select, and the rules for changing it: a click picks one (adding it or taking it out with AddToSelection held, and a double-click picking every one of its kind on screen), a box picks what’s inside, and control groups are kept and picked again by number.
- SentAttribute: Sends a property in a network game.
- SentProperty: A property a network game sends (see
Sent): whether the player who moves it decides it (ByMover), whether it’s saved, and whether it says who has the player’s input, which the host decides even on a player’s own character. - Shooter: Fires copies of a
Prefabwith no code: turrets, cannons, a boss’s spread, or the player’s own gun (seeAction). - ShowWhen: Shows its entity only while a flag holds, with no code: a HUD whose tools appear one by one as goals are met, a sign that’s put up once the guard has been talked to.
- ShownWhenAttribute: Says a property is only used while another is on, e.g.
[ShownWhen(nameof(Dash))]on a dash’s speed: the editor’s Inspector fades it while the other is off (false, zero or empty), and it can still be set ahead of time. - Slider: A bar the player drags (or moves with the arrow keys, D-pad or stick once picked) to choose a number between
MinandMax. - Smoothed<T>: A value a component (or a game’s system) draws that changes as the game steps, which remembers what it was as the step it last changed in began, so a frame drawn between two steps can show it between the two: draw it with
Of(orTurnOffor an angle). - SortGroup: Draws the entity and everything inside it as one thing among the rest: a pallet with a stack of crates on it, a machine with its operator, a truck with its label.
- SoundPlayer: Plays its
Soundwhen something happens, with no code: whenever itsMessageis sent (by a pickup, a switch, a counter, an enemy’s death message orGame.Send), and when it appears ifOnStartis ticked.PitchVariationmakes each play a little different, so a sound heard over and over doesn’t grate. - SoundSource: A sound that plays over and over where its entity is: a waterfall, a crackling fire, a humming machine.
- Spawner: Spawns copies of a prefab every
Intervalseconds at its position, with no code: enemy waves, falling rocks, collectibles that come back. - Speaker: Someone who talks in dialogue: the name shown over what they say and their portrait, in a
DialogueBox. - Sprite: Draws an image (or a solid rectangle when no image is set) at the entity’s transform.
- SpriteDraw: One quad to draw: a unit quad (-0.5..0.5) placed in the world by
World, which already includes the sprite’s size and flips. - Stars: A row of stars, so many of them filled: how well a level went, out of three.
- StatAttribute: Marks a string property as a number of a target’s components to change, “Value” or “Health.Max” (a component’s name and its property’s): the Inspector lists the number properties of what’s in the scene to pick from, those of the things its targets are first (the components on any entity with one of
targets, and those). - StepBlend: How far the frame being drawn is between the game’s last two steps, for drawing what changes once a step from a component’s own state rather than its transform (a particle’s place, a fade, a gauge’s needle), so it moves smoothly on a screen faster than the game steps.
- Switch: Turns things on and off with no code: levers, pressure plates, buttons, locks.
- SwitchMode: How a
Switchis worked. - TableSetsAttribute: Marks a list of strings as which properties take which of a table’s columns, one a line:
Health.Max = Health(a Table Values’ Sets). - TableValues: Gives its entity’s other components their values from a row of a table, with no code: an enemy’s Health and Damage from the Enemies table’s Slime row.
Setssays which properties take which columns, one a line (Health.Max = Health); left empty, every property named like a column takes it (a column called “Speed” sets every Speed, one called “Health.Max” sets that one). - Team: Puts an entity, and everything inside it, on a team: any genre’s team, the same one a turn order’s Teams, a strategy faction or a network game’s Teams name.
- TeamColor: Paints the
Spriteon this entity in the color of the team of whoever it’s part of: a strategy unit’s or building’s faction color, a network game’s player color (see Network Settings’ Color Players), so a band or banner on a character shows whose it is. - Teams: Teams, the one idea every genre shares: a name (“Player”, “Blue”) that a
Team, a turn order’sTeams, a strategy faction or a network game’sTeamsgives, and that anything on that team (seeITeamMember) carries. - Text: Draws a line (or lines) of text at the entity.
- TextAlign: Where text sits relative to its entity’s position.
- TextField: A box to type into: a player’s name, the address of a game to join.
- TextFieldUse: What a
TextFieldis for. - TextVerticalAlign: Where the lines of text sit up and down relative to its entity’s position.
- TextWrap: Breaking text onto more lines between words, so it fits a width: a
Textwith aWrapWidth(broken by its font’s own letter widths as it’s drawn), a dialogue box’s lines, a log’s. - TileAnimation: A run of tiles that animate one after another; see
AnimatedTiles. - TileAnimationsAttribute: Marks a string property as runs of tiles that animate (“16-19 @6, 30-31 @2”, see
AnimatedTiles): the Inspector lists them a row each, from which tile to which and how fast, with the frames shown. - TileCountsAttribute: Marks a string property as tiles and how many of each, as tile:count pairs separated by commas, e.g.
- TileGrid: A rectangle of a tilemap’s tiles as numbers (-1 for none), from its top left, read from the map and written back to it all at once: a match-3 or falling-block board’s.
- TileNumbersAttribute: Marks a property as tiles of a tilemap’s tilesets, by number: a string of numbers and ranges (“10-15, 20”, see
ParseTileSet), or a whole number for one tile. - TileShape: How a
Tilemap’s cells are laid out; seeShape. - TileTurn: How a tilemap cell’s tile is turned or flipped (see
Turns): flipped left to right first, ifFlipXis in it, then turned clockwise by quarters. - TileTurns: Turning and flipping a
TileTurnfurther, and what it does to points and directions. - Tilemap: A grid of tiles from one or more tileset images, drawn and (optionally) collided with as a whole.
- Tileset: One of a tilemap’s tilesets (see
Tilesets):Imagecut intoColumnsbyRowstiles, numbered fromFirstalong each row, top row first. - TilesetsAttribute: Marks a list of strings as tilesets, a line each: an image in Assets and its tiles across and down (“Tiles/props.png 4x4”, see
MoreTilesets). - Toggle: Turns a
Buttoninto a switch: each click flipsIsOn, and its label can say which way it’s set (“Sound: On”). - TogglesList: A screen of on/off switches with no hand-placed buttons: while the game runs it makes a row for each row of a data table, its label and a
Togglebutton, each remembered in the save data under its own name (SaveAs, e.g. - Tooltip: Says something about the entity while the mouse rests on it: after
Delayit showsValuein a box by the cursor, pinned to the screen, or writes it into theTextnamed inInto(an info line on the HUD). - TopDownMovement: A top-down player with no code: moves in eight directions (or four) with WASD, the arrow keys, the D-pad or the stick, never faster diagonally, with an optional dash.
- Trail: Leaves fading copies of its entity’s
Spritebehind as it moves: dashes, speed, ghosts, bullets with streaks. - TrailCopy: One copy left by a
Trail: where it was drawn, what it showed, and how many seconds ago. - Transform: Position, rotation and scale relative to the parent entity.
- Trigger: When a message arrives, does something with no code: “when Score arrives, Damage the Boss by 2”, “when Beat arrives, End Turn”, “when Matched arrives from Board A, Fire the Cannon”.
- TurnOrder: Turn-based play with no code: teams take turns, each acting on its own turn while the others wait.
- TurnTaker: Takes turns in the
TurnOrderthat covers it: it acts only on itsTeam’s turn. - TweenDirection: Which way a
TweenPlayerplays. - TweenLoop: Whether a
TweenPlayerplays once or over and over. - TweenPlayer: Plays a little animation of how its entity is drawn, with no code: grown or shrunk (
Scale), moved (Move), turned (Rotate) and faded (Fade) at once, eased, as it appears (OnStart), when itsMessageis sent, or from a script withPlay. - Typewriter: Types out its entity’s
Texta letter at a time, for dialogue and story cards. - UpgradeFromAttribute: Marks a static method
static void Name(SavedData data)on a component as the step that upgrades its saved data fromVersionto the next (seeComponentVersionAttribute), e.g.[UpgradeFrom(1)] static void SecondsToFrames(SavedData data) => data.Set("Delay", data.Get<float>("Delay") * 60);Steps run in order, oldest first, before the values are read, and see each property under the name it has now (values saved under aFormerNameAttributeare moved to it first). - Viewport: Draws the camera on its entity into part of the screen, over the main camera’s view: a minimap in a corner, one player’s half of a split screen, a first-person window (a camera with a First Person View) inside a 2D game.
- WallRoom: One room a
WallRoomsfound: an id it keeps as walls change, its cells (top row first, left to right), its area and whether it’s open to the outside. - WallRooms: The rooms walls make on a tilemap’s grid, for heat, air, occupancy or anything else that goes by room: every patch of floor cells joined side by side (four ways; six on a hex map) without crossing a wall.
- Weather: Rain, snow, falling leaves or rising embers all over the view, wherever the camera goes.
- WeatherKind: What a
Weatherfills the view with. - WorksWithAttribute: Points to a component that goes well alongside this one but isn’t needed, e.g. a
Counterworks with aTextto show its count.
Griff.Simulations
Section titled “Griff.Simulations”- GameSimulations: A game playing its own balance simulations (
Game.Simulate("Balance")), the same as the editor does. - SimulationException: Why a simulation can’t run: what’s missing or wrong in its settings, each a line.
- SimulationFight: How one fight in the arena went (see
Fight). - SimulationHost: What a balance simulation plays with: the game’s tables, its component types (scripts’ too), how it loads scenes and prefabs, its step rate and its script simulations.
- SimulationPairResult: How one pair of rows did over its runs.
- SimulationResults: What came of a
Simulation: for each step of its sweep (one without), each pair of rows’ wins, losses and draws, turns and seconds, damage dealt and taken, gold and XP earned and the values tracked, averaged over its runs, with each side’s health and the tracked values over a run; as tables (ToTable,Matrix,SweepTable,OverARun) to show, chart and export, andFindingssaying what stands out: one-sided pairs, rows far from the rest, levels that change nothing and levels that jump. - SimulationRun: One run of a simulation: the pair of rows it plays (
FirstagainstSecond), the tables (with a sweep’s step in them), and what came of it: who won, how many turns and seconds it took, the damage each side dealt, what the first side earned (gold, XP) and any value tracked over the run. - SimulationRunner: Plays a
Simulation: every pair of rows (each of the first side’s against each of the second’s), itsRunstimes, at each step of its sweep, headless and as fast as the computer goes, spread over the cores (seeWorkers). - SimulationScript: A balance simulation written as a script, for what the no-code matchup doesn’t cover: a gauntlet of fights with gold and XP carried from one to the next, an economy, a dungeon run.
- SimulationStepResults: One step of a simulation’s sweep (or its only step): every pair’s results.