Documentation
¶
Overview ¶
Package gram is a modular game engine for Go: a game.Game — named game.Stage values, each with its own entity-component world and its own [game.Scene]s — driven by an engine that runs the goke ECS in a window's loop, a tick and a picture a frame, the picture drawn on the GPU through WebGPU (gogpu). Everything beyond the tick loop is a plugin.Plugin: the built-in ones give a Stage a world of moving boxes, collisions, sight, a board with terrain, pathfinding and mouse selection; a game adds its own the same way. Run is the whole public surface of this package.
Game, Stage and Scene ¶
A Game supplies game.Props (window, tick rate) and its Stages by name. A Stage is one context the game can be in — a menu, the gameplay — with its own ECS, built fresh as game.Runtime.SwitchStage enters it: Init installs its plugins through a game.Initializer, Spawn seeds a fresh game, Loaded stands in for Spawn when the Stage is entered from a save, Update is one tick. A game defines a Stage a section at a time with package game/stage — World, Plugins, Players, Effects, Rules, Commands, Kinds, Controls, Spawn, Scenes, Update — in that order, which the compiler keeps. Saving and loading are commands like any other (game.Save, game.Load, game.Enter, game.Quit), bound to keys or ui buttons.
A Scene is one thing a Stage can show: its renderers and its input handling. The Stage's game.Scenes is the registry of them; the live game.Composition over it says which are visible, in what order, and which is active, the only one whose HandleEvents runs. game.Runtime — pause, quit, switch Stage, persistence, full screen — reaches a Stage and every Scene alike. A scene's screen is a tree of elements of package ui, the world among them as its picture, everything the Stage's plugins draw (world.Read.Picture), through a camera ([ui.Image] of a render.Feed); the cameras are the cameras plugin's, made beside the feed that shows them. A player owns no camera: it acts through the picture a scene wires it to.
Plugins and rules ¶
A plugin.Plugin is used from a Stage's Plugins section. Its Install only queues ECS wiring, flushed in one ecs.Setup after Init returns, and says what the plugin draws (plugin.Installer.Draws, the Stage's one picture of it all ordered by height) and how its kinds look (plugin.Installer.Looks, declared once Init returns, before the scenes are made). A plugin needing another takes it as a constructor argument: there is no registry and no lookup by name.
What a game does about what a plugin finds is a rule of the library ceremony (github.com/kjkrol/ceremony), which gram builds on with goke as the store: act.Branch[P]{Name, When, Then}, run inside the pass of the plugin that catches its moment P — a collision.Meeting for a pair of entities, a unit.Standing for an entity on the board — when its When holds, clauses of ceremony/cond each saying whom they are about (cond.Self.If, cond.Other.If, cond.At(board.Around(n)).If, cond.On(plugin).If), its Then doing steps said of somebody the same way (act.Self.Do, act.Other.Put, act.At(board.Around(n)).Put): putting on and taking off effects, giving commands. A rule is a role's (world.Roles), a role is played by a kind, a cell or a plugin, and once Init returns the engine hands the rules of every role played to the plugin that catches their moment (ceremony.Deliver, to the hosts of plugin.Installer.Hosts); one none catches is an error. What an entity does over time is a plan, plan.New, of loops of the same words, plan.Loop[P]{Name, When, Then, Until, Timeout, Cooldown}, carried by its kind. What somebody asks for is a command (ceremony/command): a player's key, a rule's act.Self.Do, and about an effect a sentence — ceremony.Put(open).On(ceremony.Group("trapdoors")).By(ceremony.Named("lever")). The language is ceremony's own documentation; gram's plugins give the moments, facts, words and knobs it is written over, each marked beside its type, and the world keeps a Stage's registers of effects, roles and commands by name (doc/behaviour.md).
Kinds and spawning ¶
What an entity is comes from a kind (package entity/kind): a Spec of the components every entity of the kind carries, the same for all (Const) or read from that entity's own row (Load). A kind's Entry puts one entity on the world's roster, spawned for a Stage entered afresh; a map file (board.Plugin.Lay) does the same for a board. Kinds also tell the saves which component types to expect.
Tick ¶
Props.TargetTPS is the engine's one fixed step. The window's loop runs one Update per frame, stepping as many times as the time gone says, at most five, so a slow frame slows the game instead of spiralling. Each step calls the active Scene's HandleEvents, then Stage.Update, where the game runs its plugins' RunPlan in the order it needs: the world, then motion, before whatever reads its space. What is drawn goes by the clock's Shown time, which runs on between the steps.
Persistence ¶
game.Persistence saves and loads the active Stage's ECS with every tracked value's state: a plugin's Serializable, or anything a Stage handed to ctx.Track. Resources are matched by name, never by position, so a save survives plugins being added, removed or reordered.
Numbers ¶
Every number of the world's geometry and of the screen is a float32, as aabbworld's boxes and the GPU have them: positions, sizes, speeds, heights, angles, pixels. Whole units are exact up to 2^24, and at 16,384 units off the origin a coordinate steps about a thousandth of a unit.
Package dependencies ¶
The packages form a strict acyclic graph; each imports only layers below it:
0 camera a camera over a world: conversion, culling, move, zoom
ceremony how entities behave (github.com/kjkrol/ceremony): tag, comp,
effect, fact, cond, act, plan, host, command, store, its root
and goke, its binding over the ECS
1 render drawing: Composer, Frame, Atlas, Feed → camera, ceremony/effect
control input events and bindings → camera, ceremony/command
2 entity/kind what an entity is: Spec, Define, Of → render, ceremony/comp
clock the tactical clock: time, pause, tempo → control, render, ceremony
3 entity what every entity carries: Base, Z → kind
plugin the extension contract → control, render, ceremony
plugins/players/owner whose a unit is; a leaf → ceremony/command, tag
4 plugins/world the foundation: space, entities, kinds → plugin, clock, ceremony
5 game Game, Stage, Scene, Composition, Runtime → plugin, world, ceremony
ui a scene's screen of elements → game, render, control
plugins/motion entities steered and moved, the leavers → world
plugins/vision what the units see → world, …
6 plugins/cameras, collision → world, motion, …
7 plugins/selection the units a player picks → cameras, motion, …
plugins/board a grid with terrain over the world → motion, collision, …
plugins/dialog conversations as data → world, ui, …
8 plugins/driving units driven by hand → motion, selection, board
9 plugins/navigation MoveOrder paths across a board → board, selection, driving
plugins/bullet shots fired, flown, landing and bursting → motion, collision, board
plugins/gravity bodies falling, standing and leaping → motion, board, collision
plugins/bridges bridges built by one set of rules → world, board, …
plugins/topography a map in relief drawn on the GPU → motion, board, atmosphere
plugins/atmosphere calendar, climate, weather, sky → world, board, …
plugins/players players over the command handlers → motion, cameras, ui, …
10 internal/engine the Engine: the loop, one Stage, saves → game, world, ceremony
11 gram Run; the package you import → game, internal/engine
Outside the module: ceremony is the behaviour — rules, plans, effects, roles, commands, facts — the layer under plugin and control, its store goke/v3 through its binding ceremony/goke (the only package of it importing goke, imported in gram as cgoke); goke/v3 is the ECS every Stage runs on, aabbworld the space, collisions and line of sight under the world, gogpu the window, the loop and the GPU, hpastar the pathfinding, and uid the entity identifiers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package camera is the view onto a world: screen conversion, culling, the visible window and its control.
|
Package camera is the view onto a world: screen conversion, culling, the visible window and its control. |
|
Package clock is the tactical clock of a world: the one game time everything that simulates goes by, kept by the world and saved with the game.
|
Package clock is the tactical clock of a world: the one game time everything that simulates goes by, kept by the world and saved with the game. |
|
cmd
|
|
|
gramap
command
Command gramap makes a gram map, a level file a board lays, of any stretch of the Earth at any scale, from a recipe:
|
Command gramap makes a gram map, a level file a board lays, of any stretch of the Earth at any scale, from a recipe: |
|
Package control is the input vocabulary: what the engine captures each frame, and the commands and bindings a game is driven by.
|
Package control is the input vocabulary: what the engine captures each frame, and the commands and bindings a game is driven by. |
|
Package entity is what every entity of a world carries: its Base (where it is, Position; how it moves, Velocity; its kind and what the space may do with it), its planes (Layers), in a world with heights its place in height (Z), where it looks from (Eye), the Drift it is carried at under gravity, how it lies flat (Lie) and how it casts its shadow ([Shadow]).
|
Package entity is what every entity of a world carries: its Base (where it is, Position; how it moves, Velocity; its kind and what the space may do with it), its planes (Layers), in a world with heights its place in height (Z), where it looks from (Eye), the Drift it is carried at under gravity, how it lies flat (Lie) and how it casts its shadow ([Shadow]). |
|
kind
Package kind is how a game says what its entities are.
|
Package kind is how a game says what its entities are. |
|
examples
|
|
|
board/atlas
command
|
|
|
board/custom-map
command
|
|
|
board/flat
command
|
|
|
board/topography
command
|
|
|
board/topography/hud
Package hud lays out the demo's screen.
|
Package hud lays out the demo's screen. |
|
look/animation
command
|
|
|
look/light
command
|
|
|
look/material
command
|
|
|
look/sky
command
|
|
|
motion/bullet
command
|
|
|
motion/collision
command
|
|
|
motion/expanse
command
|
|
|
motion/platformer
command
|
|
|
navigation/hex
command
|
|
|
navigation/spawn
command
|
|
|
navigation/square
command
|
|
|
rules/dialog
command
|
|
|
rules/effect
command
|
|
|
rules/guard
command
|
|
|
rules/mechanisms
command
|
|
|
rules/vision
command
|
|
|
start/minimal
command
|
|
|
start/scenes
command
|
|
|
start/split-screen
command
|
|
|
Package game is what a game implements and what it is handed back: the Game the engine drives, its [Stage]s and their [Scene]s, and the Initializer, Runtime and Persistence a Stage or Scene works through.
|
Package game is what a game implements and what it is handed back: the Game the engine drives, its [Stage]s and their [Scene]s, and the Initializer, Runtime and Persistence a Stage or Scene works through. |
|
stage
Package stage defines a game.Stage a section at a time, always in the same order: a chain begun with New and ended with Update, each link one part of the game and nothing else.
|
Package stage defines a game.Stage a section at a time, always in the same order: a chain begun with New and ended with Update, each link one part of the game and nothing else. |
|
internal
|
|
|
engine
Package engine is the driver behind gram.Run: the window's loop (gogpu), one active Stage and its ECS at a time, and the unexported implementations of the contracts package game declares.
|
Package engine is the driver behind gram.Run: the window's loop (gogpu), one active Stage and its ECS at a time, and the unexported implementations of the contracts package game declares. |
|
f32
Package f32 is package math for the float32 geometry gram keeps: each function is math's of the same name, worked out in float64 and rounded once.
|
Package f32 is package math for the float32 geometry gram keeps: each function is math's of the same name, worked out in float64 and rounded once. |
|
parallel
Package parallel shares a job of many tasks among the goroutines of a pool kept for the whole game: the caller's own and the pool's, each known by its number.
|
Package parallel shares a job of many tasks among the goroutines of a pool kept for the whole game: the caller's own and the pool's, each known by its number. |
|
vec
Package vec is the three-float vectors the cameras and the billboards work with.
|
Package vec is the three-float vectors the cameras and the billboards work with. |
|
Package plugin is the extension contract: what a Plugin is, what it is handed at install time, and how a game's rules are hosted inside a plugin's own pass.
|
Package plugin is the extension contract: what a Plugin is, what it is handed at install time, and how a game's rules are hosted inside a plugin's own pass. |
|
section
Package section names the parts a Stage is defined in, in their order, and lets a plugin refuse what is defined in the wrong one.
|
Package section names the parts a Stage is defined in, in their order, and lets a plugin refuse what is defined in the wrong one. |
|
plugins
|
|
|
atmosphere
Package atmosphere is the sky over a world on the world's clock: the calendar, the light of the day, the climate and its weather, what falls, and what the weather does to the ground.
|
Package atmosphere is the sky over a world on the world's clock: the calendar, the light of the day, the climate and its weather, what falls, and what the weather does to the ground. |
|
atmosphere/air
Package air is the weather over a world as it is felt and drawn: the Weather the climate makes, and what it does to what is drawn.
|
Package air is the weather over a world as it is felt and drawn: the Weather the climate makes, and what it does to what is drawn. |
|
atmosphere/aloft
Package aloft draws the clouds seen from above: a layer the sky shows from below, the heaps as bodies the line of sight passes through, lit from above, the shreds as thin sheets at their heights, half see-through over their shadows, thinning away into the ground; and the heaps seen from under their top before the slopes that stand up into them.
|
Package aloft draws the clouds seen from above: a layer the sky shows from below, the heaps as bodies the line of sight passes through, lit from above, the shreds as thin sheets at their heights, half see-through over their shadows, thinning away into the ground; and the heaps seen from under their top before the slopes that stand up into them. |
|
atmosphere/backdrop
Package backdrop is the sky behind the world, drawn on the GPU before anything else: through a perspective the sky of the day with the sun, the moon, the stars and the clouds on it; through any other camera the viewport filled in the sky's colour wherever the ground does not cover it.
|
Package backdrop is the sky behind the world, drawn on the GPU before anything else: through a perspective the sky of the day with the sun, the moon, the stars and the clouds on it; through any other camera the viewport filled in the sky's colour wherever the ground does not cover it. |
|
atmosphere/calendar
Package calendar turns the tactical clock's game time into days, seasons and the moon.
|
Package calendar turns the tactical clock's game time into days, seasons and the moon. |
|
atmosphere/celestial
Package celestial is the celestial sphere over a world: where the sun, the moon and the stars stand as the world turns, and the real stars and the moon's face to draw them with.
|
Package celestial is the celestial sphere over a world: where the sun, the moon and the stars stand as the world turns, and the real stars and the moon's face to draw them with. |
|
atmosphere/climate
Package climate is the climate of a world: where in the world it lies, and the weather that goes by there.
|
Package climate is the climate of a world: where in the world it lies, and the weather that goes by there. |
|
atmosphere/climate/weather
Package weather is the kinds of weather a climate goes through, each a State.
|
Package weather is the kinds of weather a climate goes through, each a State. |
|
atmosphere/precipitation
Package precipitation draws what falls from the world's weather: rain and snow, drop by drop between the low clouds and the ground, only under the clouds it falls from and as thick as they let fall (air.Weather.FallsAt), in the light of the sun.
|
Package precipitation draws what falls from the world's weather: rain and snow, drop by drop between the low clouds and the ground, only under the clouds it falls from and as thick as they let fall (air.Weather.FallsAt), in the light of the sun. |
|
atmosphere/sky
Package sky is the light of the day over a world: the sun (a light.Distant; DefaultSun without a sky) and the moon of the calendar's hour.
|
Package sky is the light of the day over a world: the sun (a light.Distant; DefaultSun without a sky) and the moon of the calendar's hour. |
|
atmosphere/weathering
Package weathering is the weather on the board: snow lying, ice on the water, what sways swaying, as effects on the board's cells cast as the world's weather says and taken off again.
|
Package weathering is the weather on the board: snow lying, ice on the water, what sways swaying, as effects on the board's cells cast as the world's weather says and taken off again. |
|
board
Package board lays a square or hex grid over the game world, with per-cell terrain (who may pass, how fast one goes) and occupancy.
|
Package board lays a square or hex grid over the game world, with per-cell terrain (who may pass, how fast one goes) and occupancy. |
|
board/cell
Package cell is a board's cell as a place: what it is, who may stand on it, what runs across it and the moment of it rules are written for.
|
Package cell is a board's cell as a place: what it is, who may stand on it, what runs across it and the moment of it rules are written for. |
|
board/grid
Package grid is a board's topology: a Grid answers which cells neighbour which and in which direction, where a cell lies, how far apart two are, which cells a box covers and every cell in turn; DefaultGrids makes a square or a hex one.
|
Package grid is a board's topology: a Grid answers which cells neighbour which and in which direction, where a cell lies, how far apart two are, which cells a box covers and every cell in turn; DefaultGrids makes a square or a hex one. |
|
board/ground
Package ground is what a board's ground is to the other plugins: the height of it at a point (Heights; a Profile knows it along a ray exactly), what stands on it and holds sight back (Cover, walked along a ray) and where whoever moves over it stands (Surfaces: the ground or a deck, and the deck over it).
|
Package ground is what a board's ground is to the other plugins: the height of it at a point (Heights; a Profile knows it along a ray exactly), what stands on it and holds sight back (Cover, walked along a ray) and where whoever moves over it stands (Surfaces: the ground or a deck, and the deck over it). |
|
board/internal/boardtest
Package boardtest is what the board's tests share: an installer without an engine, a world of world, collision, board and vision ticked as a demo ticks them, the rows of its units, a game of one stage.
|
Package boardtest is what the board's tests share: an installer without an engine, a world of world, collision, board and vision ticked as a demo ticks them, the rows of its units, a game of one stage. |
|
board/internal/draw
Package draw is what the board draws by itself: the simple map's Bands, the ways and the covers the tile map lays over the tiles, and the Clouds' shadows on a flat board's ground under an atmosphere.
|
Package draw is what the board draws by itself: the simple map's Bands, the ways and the covers the tile map lays over the tiles, and the Clouds' shadows on a flat board's ground under an atmosphere. |
|
board/internal/field
Package field is a board's ground as the other plugins meet it: the cover that holds sight back along a ray (ground.Cover), kept as the cells change, and the solid ground collision pushes colliders out of and never over (collision.Field), read from the cells' terrain.
|
Package field is a board's ground as the other plugins meet it: the cover that holds sight back along a ray (ground.Cover), kept as the cells change, and the solid ground collision pushes colliders out of and never over (collision.Field), read from the cells' terrain. |
|
board/internal/grids
Package grids is the board's default grids, square and hex, with what the board's own parts read of them: the fields, Fold, SetWrap.
|
Package grids is the board's default grids, square and hex, with what the board's own parts read of them: the fields, Fold, SetWrap. |
|
board/internal/moments
Package moments runs the board's passes over its units and cells: Rules hosts the rules of a unit.Standing and of a cell.Now and runs them every step, telling each which cells lie round it (AroundPlaces) and, a unit, in front of it (AheadPlaces).
|
Package moments runs the board's passes over its units and cells: Rules hosts the rules of a unit.Standing and of a cell.Now and runs them every step, telling each which cells lie round it (AroundPlaces) and, a unit, in front of it (AheadPlaces). |
|
board/internal/occupancy
Package occupancy keeps a board's cell.Occupancy true to the world: KeepSystem has every unit hold the cell it stands on, following it wherever it goes, and lets go of the holds of whoever left the world; View draws the cells held.
|
Package occupancy keeps a board's cell.Occupancy true to the world: KeepSystem has every unit hold the cell it stands on, following it wherever it goes, and lets go of the holds of whoever left the world; View draws the cells held. |
|
board/internal/terrain
Package terrain is the state of a board's cells every part of the board reads: a seed until the ECS is set up, then the cells' entities, with the counts of changes to them and the dictionary of the kinds a game defined (Kinds).
|
Package terrain is the state of a board's cells every part of the board reads: a seed until the ECS is set up, then the cells' entities, with the counts of changes to them and the dictionary of the kinds a game defined (Kinds). |
|
board/look
Package look is how a board is drawn.
|
Package look is how a board is drawn. |
|
board/network
Package network is what runs from cell to cell across a board, rivers and roads, as a graph over its grid: the cells it runs through (Network.Set, a Node of a board kind, a width and a fade) and which neighbours each runs on to; a road [Network.Link]s its cells both ways, water [Network.Flow]s down to where it leaves the network.
|
Package network is what runs from cell to cell across a board, rivers and roads, as a graph over its grid: the cells it runs through (Network.Set, a Node of a board kind, a width and a fade) and which neighbours each runs on to; a road [Network.Link]s its cells both ways, water [Network.Flow]s down to where it leaves the network. |
|
board/unit
Package unit is an entity on a board: the cell it is At, how it moves over the cells and what it weighs (a Mover) and where it stands at a step as a rule gets it (Standing, with its Heading, so a rule's board.Ahead(n) turns to the cells in front of it; its words Fallen where its domain may not be, StandingOn a cell under an effect, OnKind a cell of a kind).
|
Package unit is an entity on a board: the cell it is At, how it moves over the cells and what it weighs (a Mover) and where it stands at a step as a rule gets it (Standing, with its Heading, so a rule's board.Ahead(n) turns to the cells in front of it; its words Fallen where its domain may not be, StandingOn a cell under an effect, OnKind a cell of a kind). |
|
board/water
Package water works out the running water of a relief: where the rain on it gathers and runs to the sea, the brooks, streams and rivers it makes, the channels they cut and the fords across them.
|
Package water works out the running water of a relief: where the rain on it gathers and runs to the sea, the brooks, streams and rivers it makes, the channels they cut and the fords across them. |
|
bridges
Package bridges builds bridges by one set of rules, package site's, whoever builds them: a level's file, a player with a bridge in hand, a map maker.
|
Package bridges builds bridges by one set of rules, package site's, whoever builds them: a level's file, a player with a bridge in hand, a map maker. |
|
bridges/site
Package site is where a bridge may stand: Plan a bridge from one head to another over a Ground under the Rules, or say why not (Refusal).
|
Package site is where a bridge may stand: Plan a bridge from one head to another over a Ground under the Rules, or say why not (Refusal). |
|
bullet
Package bullet fires shots and flies them: entities of the world a Shoot spawns at a unit's muzzle, flown every step past the world's step cap and swept by collision, so what lies on the path is struck.
|
Package bullet fires shots and flies them: entities of the world a Shoot spawns at a unit's muzzle, flown every step past the world's step cap and swept by collision, so what lies on the path is struck. |
|
cameras
Package cameras makes the cameras a game looks at its world through and moves them: from above over any world, and over a world in relief on a stick, turned and leaned, orthographically or in perspective, riding with an entity.
|
Package cameras makes the cameras a game looks at its world through and moves them: from above over any world, and over a world in relief on a stick, turned and leaned, orthographically or in perspective, riding with an entity. |
|
cameras/cameratest
Package cameratest is the cameras plugin's cameras for tests: one from above to draw or cull through when the camera itself is not under test, and a relief camera's keys.
|
Package cameratest is the cameras plugin's cameras for tests: one from above to draw or cull through when the camera itself is not under test, and a relief camera's keys. |
|
cameras/internal/stick
Package stick is the cameras plugin's views of a world in relief: a camera on a stick, seen through orthographically or in perspective, an eye riding in a unit, and their control.
|
Package stick is the cameras plugin's views of a world in relief: a camera on a stick, seen through orthographically or in perspective, an eye riding in a unit, and their control. |
|
cameras/internal/topdown
Package topdown holds the cameras plugin's camera from above behind the camera.Camera contract, with its window arithmetic and wrapping.
|
Package topdown holds the cameras plugin's camera from above behind the camera.Camera contract, with its window arithmetic and wrapping. |
|
collision
Package collision detects overlaps between world entities each tick and records what each struck on its Collider.
|
Package collision detects overlaps between world entities each tick and records what each struck on its Collider. |
|
collision/internal/collisiontest
Package collisiontest is what the collision's tests share: an installer and a world with motion and collision, stepped as a game steps it.
|
Package collisiontest is what the collision's tests share: an installer and a world with motion and collision, stepped as a game steps it. |
|
collision/internal/response
Package response is how the collision answers a contact, on numbers alone: the impulse two sides trade along the contact's normal (Exchange) and the footing that keeps a side pushed apart off ground that does not take it (Footing, Worse).
|
Package response is how the collision answers a contact, on numbers alone: the impulse two sides trade along the contact's normal (Exchange) and the footing that keeps a side pushed apart off ground that does not take it (Footing, Worse). |
|
dialog
Package dialog is conversations written as data: nodes of lines and answers a Stage loads from YAML files, held by its entities and answered by a player through a window pinned to the speaker.
|
Package dialog is conversations written as data: nodes of lines and answers a Stage loads from YAML files, held by its entities and answered by a player through a window pinned to the speaker. |
|
driving
Package driving drives units by hand: a player's keys, or an entity's own commands, walk, turn, strafe, brake and back a unit away, leap, and fly one that flies.
|
Package driving drives units by hand: a player's keys, or an entity's own commands, walk, turn, strafe, brake and back a unit away, leap, and fly one that flies. |
|
gravity
Package gravity has bodies fall, stand on what bears them and leap: a character's controller, never rigid bodies.
|
Package gravity has bodies fall, stand on what bears them and leap: a character's controller, never rigid bodies. |
|
gravity/internal/planar
Package planar is a body's fall across the plane, a platformer's: the pull any way across it, the body borne by whatever collision found it touching against the pull.
|
Package planar is a body's fall across the plane, a platformer's: the pull any way across it, the body borne by whatever collision found it touching against the pull. |
|
gravity/internal/vertical
Package vertical is a body's fall along Z: a step of the pull along the vertical between the surface under its feet and the slab over its head.
|
Package vertical is a body's fall along Z: a step of the pull along the vertical between the surface under its feet and the slab over its head. |
|
light
Package light declares the light over a world: a distant light (the sun) and the lamps, how each thing casts its shadow and what shade it takes.
|
Package light declares the light over a world: a distant light (the sun) and the lamps, how each thing casts its shadow and what shade it takes. |
|
minimap
Package minimap brings minimaps: small pictures of the world round a player's camera, of the ground in miniature and the marks of the kinds that have one, the camera's view outlined on it; a click on one takes the camera there.
|
Package minimap brings minimaps: small pictures of the world round a player's camera, of the ground in miniature and the marks of the kinds that have one, the camera's view outlined on it; a click on one takes the camera there. |
|
motion
Package motion moves the world's entities: every step it steers them, runs the rules of a Moving over them, moves each by its velocity, never further than Position.MaxStep, and deals with those gone past an open edge.
|
Package motion moves the world's entities: every step it steers them, runs the rules of a Moving over them, moves each by its velocity, never further than Position.MaxStep, and deals with those gone past an open edge. |
|
motion/internal/motiontest
Package motiontest is what motion's tests share: an installer and a world with motion, stepped as a game steps it.
|
Package motiontest is what motion's tests share: an installer and a world with motion, stepped as a game steps it. |
|
motion/steering
Package steering turns what an entity wants into motion, gradually.
|
Package steering turns what an entity wants into motion, gradually. |
|
navigation
Package navigation moves entities along a MoveOrder's path across a board, re-pathing when the ground along the route changes, and carries out MoveTo commands for Selected entities.
|
Package navigation moves entities along a MoveOrder's path across a board, re-pathing when the ground along the route changes, and carries out MoveTo commands for Selected entities. |
|
navigation/internal/bodies
Package bodies is the units of a tick of navigation: each as a Member of the tick and as a Body the others meet, and an Index of the bodies by the cells their boxes touch.
|
Package bodies is the units of a tick of navigation: each as a Member of the tick and as a Body the others meet, and an Index of the bodies by the cells their boxes touch. |
|
navigation/internal/order
Package order is the order a navigated unit carries — its MoveOrder, Goals, Path and Leg — the commands that give and change it, and the facts and moments told about it; the order's working functions are the systems' alone.
|
Package order is the order a navigated unit carries — its MoveOrder, Goals, Path and Leg — the commands that give and change it, and the facts and moments told about it; the order's working functions are the systems' alone. |
|
navigation/internal/pathfind
Package pathfind finds routes over a board's grid for the navigation: the cheapest way from cell to cell for an entity moving in a domain, round what may not be entered, what is held and what the caller says is blocked, and the nearest free cell to a taken one.
|
Package pathfind finds routes over a board's grid for the navigation: the cheapest way from cell to cell for an entity moving in a domain, round what may not be entered, what is held and what the caller says is blocked, and the nearest free cell to a taken one. |
|
navigation/internal/routes
Package routes draws the navigation's routes and goals (Renderer), on the GPU in a world with heights: stretches laid over the ground the frame drew (Lines), lying at the ground's depth, under what stands on it.
|
Package routes draws the navigation's routes and goals (Renderer), on the GPU in a world with heights: stretches laid over the ground the frame drew (Lines), lying at the ground's depth, under what stands on it. |
|
navigation/internal/routing
Package routing plans where the units go: the System carrying out the commands that send them, each an order with its route.
|
Package routing plans where the units go: the System carrying out the commands that send them, each an order with its route. |
|
navigation/internal/spacing
Package spacing is how units keep out of each other's way: a Keeping for each Spacing, a cell to a unit (CellKeeping) or boxes kept apart (BodyKeeping), the spots a group stands on, and the board's Finder of routes they plan with.
|
Package spacing is how units keep out of each other's way: a Keeping for each Spacing, a cell to a unit (CellKeeping) or boxes kept apart (BodyKeeping), the spots a group stands on, and the board's Finder of routes they plan with. |
|
navigation/internal/traffic
Package traffic moves the units along their routes: the System stepping each from cell to cell, holding its steps, turning it and handing the crowd's rules the touches among them.
|
Package traffic moves the units along their routes: the System stepping each from cell to cell, holding its steps, turning it and handing the crowd's rules the touches among them. |
|
players
Package players is whoever acts in the game: a Player acting through a picture of the world a scene wires it to and, at this keyboard, the bindings that turn its input into commands, carried to the plugin that defined each one.
|
Package players is whoever acts in the game: a Player acting through a picture of the world a scene wires it to and, at this keyboard, the bindings that turn its input into commands, carried to the plugin that defined each one. |
|
players/owner
Package owner is whose an entity is: a tag of the Family a player (Of), saved by its Name, carried by every entity the player owns.
|
Package owner is whose an entity is: a tag of the Family a player (Of), saved by its Name, carried by every entity the player owns. |
|
selection
Package selection turns Select commands into a Selected tag on Selectable world entities.
|
Package selection turns Select commands into a Selected tag on Selectable world entities. |
|
telemetry
Package telemetry is the panel in the top-left corner saying how the game runs: the frame rate, the ticks a second, where a frame's time goes, the entities, the game time, and whatever the plugins and the game add.
|
Package telemetry is the panel in the top-left corner saying how the game runs: the frame rate, the ticks a second, where a frame's time goes, the entities, the game time, and whatever the plugins and the game add. |
|
topography
Package topography is a map in relief over a board: the ground's heights, the light and the water on them, drawn on the GPU.
|
Package topography is a map in relief over a board: the ground's heights, the light and the water on them, drawn on the GPU. |
|
topography/internal/billboards
Package billboards is how the world's entities look on a map in relief, drawn on the GPU: in the views in relief they stand as billboards upright in the world on their centres at their altitudes, as tall on the screen as their Height stands there, hidden by the ground where it stands before them; from above they lie over their boxes as the world's own flat look draws them.
|
Package billboards is how the world's entities look on a map in relief, drawn on the GPU: in the views in relief they stand as billboards upright in the world on their centres at their altitudes, as tall on the screen as their Height stands there, hidden by the ground where it stands before them; from above they lie over their boxes as the world's own flat look draws them. |
|
topography/internal/hexes
Package hexes is the ground of a hex board in relief drawn on the GPU: every cell a prism standing to its top, coloured from the board's tiles and ways drawn from above, lit by the sun and hazed as the terrain is.
|
Package hexes is the ground of a hex board in relief drawn on the GPU: every cell a prism standing to its top, coloured from the board's tiles and ways drawn from above, lit by the sun and hazed as the terrain is. |
|
topography/internal/painter
Package painter is the topography's painter: the board's Dressing in relief and the board painted flat for the ground drawn on the GPU.
|
Package painter is the topography's painter: the board's Dressing in relief and the board painted flat for the ground drawn on the GPU. |
|
topography/internal/relief
Package relief is the ground's heights under a board: how high every corner stands, the ground between them, how steep a step is, how it is shaped, and the heights saved with the game.
|
Package relief is the ground's heights under a board: how high every corner stands, the ground between them, how steep a step is, how it is shaped, and the heights saved with the game. |
|
topography/internal/terrain
Package terrain draws a relief on the GPU as a mesh, every lattice corner a vertex at its height, in place of the board's tiles: a Renderer (New) is a render.Direct source in the opaque pass over a Ground (the relief), looking as its Surface says (Painted: the board painted flat, its water, the shores, the grid) under a Sky, lit by the sun and the lamps the frame holds and shaded as the light baked it (render.GroundShade).
|
Package terrain draws a relief on the GPU as a mesh, every lattice corner a vertex at its height, in place of the board's tiles: a Renderer (New) is a render.Direct source in the opaque pass over a Ground (the relief), looking as its Surface says (Painted: the board painted flat, its water, the shores, the grid) under a Sky, lit by the sun and the lamps the frame holds and shaded as the light baked it (render.GroundShade). |
|
topography/internal/topotest
Package topotest is what the topography's tests share: an installer without an engine, a world with heights over a board in relief, a level island seen isometrically.
|
Package topotest is what the topography's tests share: an installer without an engine, a world with heights over a board in relief, a level island seen isometrically. |
|
topography/internal/water
Package water is the topography's water as its shaders draw it: the materials of the sea (Glint) and of running water (Stream), registered with the composer's library; the way to the shore from a point of water (Shore, Shores); how fast water runs (Flow); and the layers the water is painted in for the ground drawn on the GPU (Layers, FlowSpan).
|
Package water is the topography's water as its shaders draw it: the materials of the sea (Glint) and of running water (Stream), registered with the composer's library; the way to the shore from a point of water (Shore, Shores); how fast water runs (Flow); and the layers the water is painted in for the ground drawn on the GPU (Layers, FlowSpan). |
|
topography/painter
Package painter is what a game says of how its kinds look in relief beyond their sprites: a Style for each kind's name, with its Detail, the texture over its cells, and a Shading of the light over them all, given to the topography.
|
Package painter is what a game says of how its kinds look in relief beyond their sprites: a Style for each kind's name, with its Detail, the texture over its cells, and a Shading of the light over them all, given to the topography. |
|
vision
Package vision gives entities a narrowed view of the world: a Sight cone sees what falls inside it, within range and not hidden behind something nearer.
|
Package vision gives entities a narrowed view of the world: a Sight cone sees what falls inside it, within range and not hidden behind something nearer. |
|
world
Package world is the foundation for a Stage with drawable entities: a Position and Velocity each and a shared spatial index other plugins query; the motion plugin moves them.
|
Package world is the foundation for a Stage with drawable entities: a Position and Velocity each and a shared spatial index other plugins query; the motion plugin moves them. |
|
world/internal/kinds
Package kinds is the world's register of kinds and tags, the names a save keeps and the remapping of a load to this build's order.
|
Package kinds is the world's register of kinds and tags, the names a save keeps and the remapping of a load to this build's order. |
|
world/internal/look
Package look is the world's own look: seen from above, each entity's sprite over its box.
|
Package look is the world's own look: seen from above, each entity's sprite over its box. |
|
world/internal/sectorview
Package sectorview lays the world's sectors over the ground a frame drew, on the GPU, each in its colour (Ground), lying at the ground's depth, under what stands on it.
|
Package sectorview lays the world's sectors over the ground a frame drew, on the GPU, each in its colour (Ground), lying at the ground's depth, under what stands on it. |
|
world/sector
Package sector is the world cut into sectors and the bands of pace they lie in round the anchors, the points the players observe.
|
Package sector is the world cut into sectors and the bands of pace they lie in round the anchors, the points the players observe. |
|
world/view
Package view is what one pair of eyes sees of a world.
|
Package view is what one pair of eyes sees of a world. |
|
Package render is the drawing side of gram, knowing nothing of Stages, Scenes or plugins: what a Scene and a plugin draw with.
|
Package render is the drawing side of gram, knowing nothing of Stages, Scenes or plugins: what a Scene and a plugin draw with. |
|
gputest
Package gputest readies the GPU for a test that draws.
|
Package gputest readies the GPU for a test that draws. |
|
internal/atlas
Package atlas is sprites painted on the CPU, each on a Canvas, laid out on one sheet and baked to the GPU.
|
Package atlas is sprites painted on the CPU, each on a Canvas, laid out on one sheet and baked to the GPU. |
|
internal/compose
Package compose is the world's picture: Sources hand their pieces to a Frame where they lie (At); the Composer draws the opaque ground, then the rest back to front against the depth, the Direct sources in the passes they ask for, then the marks.
|
Package compose is the world's picture: Sources hand their pieces to a Frame where they lie (At); the Composer draws the opaque ground, then the rest back to front against the depth, the Direct sources in the passes they ask for, then the marks. |
|
internal/feed
Package feed is the world seen through a camera at a size: a Picture drawn whole, in layers from one composition (Laid) or with its figures sharp over its ground.
|
Package feed is the world seen through a camera at a size: a Picture drawn whole, in layers from one composition (Laid) or with its figures sharp over its ground. |
|
internal/gfx
Package gfx is what draws straight into an image on the GPU: images and their depths, meshes and shaders built on the materials, the 2D fills and the soft blit, and the sprite sheet a frame draws from.
|
Package gfx is what draws straight into an image on the GPU: images and their depths, meshes and shaders built on the materials, the 2D fills and the soft blit, and the sprite sheet a frame draws from. |
|
internal/gpu
Package gpu draws for render on WebGPU (gogpu/wgpu): textures images live in, programs drawing triangles into them with a fragment written in WGSL, and the frame's commands, gathered and submitted at once.
|
Package gpu draws for render on WebGPU (gogpu/wgpu): textures images live in, programs drawing triangles into them with a fragment written in WGSL, and the frame's commands, gathered and submitted at once. |
|
internal/instanced
Package instanced is the sprites a Direct source draws on the GPU as instances, by layer or in the order they came.
|
Package instanced is the sprites a Direct source draws on the GPU as instances, by layer or in the order they came. |
|
internal/light
Package light is how render lights a scene: the distant light and the lamps, the light on what is drawn, and the shadows cast.
|
Package light is how render lights a scene: the distant light and the lamps, the light on what is drawn, and the shadows cast. |
|
internal/text
Package text is fonts, their glyphs drawn on demand into a sheet of their own, and the fixed debug text.
|
Package text is fonts, their glyphs drawn on demand into a sheet of their own, and the fixed debug text. |
|
internal/wgsl
Package wgsl is what every shader built on the materials shares: the library's WGSL and uniforms, the materials registered and the frame's images, sealed once a shader is built on them.
|
Package wgsl is what every shader built on the materials shares: the library's WGSL and uniforms, the materials registered and the frame's images, sealed once a shader is built on them. |
|
Package ui composes a scene's screen out of elements: panels, labels, windows, buttons and pictures of the world, laid out in a tree.
|
Package ui composes a scene's screen out of elements: panels, labels, windows, buttons and pictures of the world, laid out in a tree. |