Official Modules

The official modules are ready-made parts for your games, such as pathfinding, inventories, quests, save games and camera rigs. They come with Blitz3D+, and each is written in Blitz3D+ itself, so you can read its code. They need Extended mode.

Using a module

Import the module at the top of your program. As gives it a short name to use in your code:

Dialect "modern"
Import blitz.tweening As T

Each module's page explains how to use it, and lists its examples: complete programs that you can open in the IDE and run straight away. The official modules are version 0.1.0 previews, so their commands may still change before version 1.0.

The modules all work in the same way. How Modules Work explains how, and the words their reference pages use.

See Modules in the Language Reference for how Import finds modules, and Organising Projects with Modules for writing modules of your own.

The modules

Movement and animation

ModuleWhat it does
Animation
blitz.animation
Picks idle, walk and run animations from a character's speed, and plays one-off actions such as attacks.
Cameras
blitz.cameras
Follow and orbit cameras for third-person games, with smoothing, shoulder views, obstacle clearance and shake.
Steering
blitz.steering
Seek, arrive, flee, pursue, wander and flocking movement for agents, as velocities your game applies.
Tweening
blitz.tweening
Animates numbers, entity positions and alpha over time, with easing curves, repeats and sequences.

Worlds and maps

ModuleWhat it does
Dungeons
blitz.dungeons
Generates connected rooms, caves and mazes from a seed, all at once or a little each frame.
Grids
blitz.grids
Square and hex grid coordinates, movement ranges, line of sight and fog of war.
Maplet
blitz.maplet
Builds interiors from carved and filled shapes, with Maplet+'s geometry: rooms, doorways, stairs and any convex shape, checked and saved as a model.
Noise
blitz.noise
Seeded Perlin, value and cellular noise in 2D and 3D, with fractal layers and domain warping.
Pathfinding
blitz.pathfinding
Finds routes across weighted square grids or your own waypoint graphs, at once or a little each frame.
Spatial
blitz.spatial
Quickly finds the game objects near a point or within a box.

Game logic

ModuleWhat it does
Decisions
blitz.decisions
Behaviour trees that decide what game characters do, with optional utility scores to pick the best choice.
Random
blitz.random
Repeatable random numbers from seeded streams, with weighted choices, shuffles and encounter bags.
States
blitz.states
State machines whose states enter, update and exit, with state changes made safely.

Game systems

ModuleWhat it does
Crafting
blitz.crafting
Recipes, instant crafting and timed crafting queues that set aside their ingredients in an inventory.
Dialogue
blitz.dialogue
Branching conversations with choices, variables and effects that your game carries out.
Inventory
blitz.inventory
Bags, item stacks and equipment slots, with safe transfers and reservations.
Quests
blitz.quests
Quests with ordered stages, objectives that run side by side, and rewards to claim.
Cloud saves
blitz.savecloud
Explicit cloud upload, import and conflict resolution for named local saves.
Saves
blitz.saves
Save games in named slots, with recovery from a damaged save and upgrades of old save formats.

Players, screen and sound

ModuleWhat it does
Audio
blitz.audio
A game audio director: sound variations, voice limits, music crossfades, intensity levels and playlists.
Game UI
blitz.gameui
Panels, labels, buttons, sliders and lists drawn inside your game's window.
Input Actions
blitz.inputactions
Named actions such as "jump", bound to keys, the mouse and gamepads, for several players, with rebinding.
Localisation
blitz.localisation
Text in several languages by message ID, with placeholders, plurals and a fallback language.