Glossary¶
The terms the tutorial and reference introduce, in alphabetical order. In the tutorial, the first use of most of them links back here.
- API revision¶
The
"api_revision": 2line inmeta.json. It must accompany"api": "vs2". See Your first game.- Asset pack¶
The images a game loads, compiled into a ROM. It defaults to your own game’s folder, so you rarely name it. Each pack has its own budget of image strips. Sounds are not part of it: they stay as MP3s that the base station plays.
The
YorBACKbutton. By default it pops the current scene; setback_buttontoFalseto use those buttons in play.- Budget¶
A fixed limit on how many layers, sprites, tilemaps and image strips a game may use. Exceeding one raises an error the first time the scene is entered. See Budgets and real hardware.
- Build¶
Scene.build(). It runs once each time a scene is entered and creates everything the scene will draw. When it returns, the scene is sealed.- Cell¶
One byte in a tilemap’s grid. It holds a tile index, or
vs2.EMPTY_TILEfor “draw nothing”.- Census¶
The per-layer breakdown in a
ResourceLimitErrormessage, such as(world: 62, hud: 39). It shows which layer is over budget.- Column¶
One slice of the display: the colour of all 54 LEDs at a single angle. The renderer is asked for 256 of them per rotation.
- Console¶
The real Ventilastation machine, as opposed to the emulator.
- CP437¶
The default glyph mapping, where a character’s frame is
ord(ch). Full font strips such assteel8x8.pnguse it.- Depth¶
What Y means on a
vs2.TUNNELlayer:0at the rim,255at the centre. Objects shrink as depth grows.- Despawn¶
Hide a sprite and return it to its pool:
SpritePool.despawn(). Despawning a sprite twice raisesValueError.- Display¶
The disc the rotor sweeps out. X is an angle that wraps around it; Y is a distance inward from the rim. See The circular display.
- Drawable¶
Anything a layer draws: a sprite, a sprite pool, a tilemap or a label. A layer creates its own drawables; there is no free-standing
Sprite(...).- Edge¶
An input test that is true for exactly one tick:
just_pressed()andjust_released(). Compare level.- Emulator¶
Runs your game on a computer with the same renderer semantics as the console. It does not enforce the per-column deadline.
- Flip¶
flip_x=Truemirrors a sprite, tilemap or label left to right andflip_y=Truemirrors it top to bottom. Both together turn it through 180 degrees, which is how a label reads upright at the top of the display. See Tilemaps and text.- Frame¶
One image inside a strip, counted from 0. Setting a sprite’s frame never changes whether it is visible.
- Garbage collection¶
How MicroPython frees memory that nothing refers to any more. On the console it runs only when a scene starts or ends, so garbage made every tick piles up until then and a long game can run out of memory; the desktop emulator collects automatically and pauses instead. VS2 avoids both by creating everything in build and reusing it with pools. See Why VS2 works this way.
- Glyph¶
The image frame that stands for one character. A glyph table maps characters to frames. See Tilemaps and text.
- Idle timeout¶
Seconds without input from either controller before
on_idle()fires. The default pops the scene.- Image¶
A strip as loaded from the ROM. Its id defaults to its filename, and
framessays how many frames it has.- Label¶
A tilemap you write strings into, with
text,write()andset_number(). It counts against the tilemap budget.- Launcher¶
The console’s menu. It finds your game by its folder, so there is nothing to register.
- Layer¶
An ordered container of drawables with a projection and a
visibleflag. Layers paint bottom to top in creation order.- LED¶
One of the 54 lights on the spinning bar. On a
vs2.HUDlayer, Y is an LED index.- Level¶
An input test that is true while a button is down:
held(). Compare edge.- MicroPython¶
A compact implementation of Python 3 for microcontrollers. Games are written in it and run on the console’s ESP32-S3, with limited memory and CPU.
- Palette group¶
A set of images in
__images__.yamlthat share one 256-colour palette. Put images that look alike in the same group.- Pool¶
A fixed group of sprites reserved in
build()withsprite_pool(). You spawn and despawn from it instead of creating sprites while the game runs.- Projection¶
How a layer turns Y into LEDs:
vs2.TUNNEL,vs2.HUDorvs2.FULLSCREEN. It belongs to the layer, not to its drawables.- Recycle¶
on_empty=vs2.RECYCLEon a pool. An exhausted pool then reuses its oldest live sprite instead of returningNone.- Rim¶
The outer edge of the display, at
y = 0.- ROM¶
The compiled form of a game’s images: strips, palettes and glyph tables. Frame counts and image sizes are read from it.
- Rotation¶
One full sweep of the bar around the disc, a few times per second. It is not tied to
update(): at the fan’s usual 400 to 700 RPM there are three to five ticks per rotation.- Rotor¶
The spinning arm that carries the LED bar.
- Scene¶
One screen of a game: a subclass of
vs2.Scenewith abuild()and anupdate(). A game is usually several scenes.- Sealed¶
The state of a scene after
build()returns. Existing drawables can be moved, re-framed, shown and hidden, but creating new ones raisesvs2.SceneSealedError.- Spawn¶
Take a free sprite from a pool, position it and show it:
SpritePool.spawn(). It returnsNonewhen the pool is empty. Opposite of despawn.- Sprite¶
One image on a layer, with
x,y,frameandvisible.- Strip¶
A horizontal filmstrip of equally sized frames in one PNG. A four-frame animation is a PNG four times as wide as one frame.
- Tick¶
One call to
update(). Ticks come every 30 ms, about 33 a second, whatever the fan speed.- Tile¶
One picture in a tilemap’s tileset, referred to by its frame number. Tile size comes from the image.
- Tilemap¶
A grid of cells drawn from a tileset strip, costing one renderer record however many cells it has. Good for terrain and backdrops.
- Timer¶
A callback queued with
call_later(). Pending timers are discarded when the scene is popped or suspended.- Transition¶
push(),pop()orswitch(). It is queued and committed at the end of the tick.- View¶
The fixed window a tilemap shows onto its grid. Scrolling moves the view (
view_x,view_y), not the data.- Visible¶
Whether a drawable or layer is drawn. It is independent of a sprite’s frame.