flutter3d_game_shooter library

The parts of a first-person shooter that are not parts of an engine.

flutter3d_game knows what a body, a brain, a mechanism and a step are. What a monster is, what a shotgun does, what a medkit gives and what order a shooter's step runs in are here — and a platformer or a racing game gets none of it, which is the whole reason the package exists.

The line between the two is the one the game layer's own README already drew: machinery stays, vocabulary moves. Mechanism, Actor, MechanismEvents.taken and the level format are machinery. Inventory, Gift, Arsenal and GameSimulation answer the machinery with content, and content belongs to a genre.

Nothing here imports the renderer or names Flutter. WeaponView reaches the renderer and the readouts are widgets, so both are in bridge.dart; tool/structure.dart holds the split.

Classes

AmmoGift
One class for all three ammunition types, because they differ only in which pouch they fill.
AmmoType
What a weapon spends when it fires.
ArmourGift
Arsenal
What the player is carrying, and whether the trigger will do anything.
Bestiary
What this game's monsters are, and how one becomes an Actor.
Blast
An explosion's shape: how far it reaches and how hard.
BlastResolver
Works out who an explosion actually hurt.
ChaseBrain
Sees the player, hesitates, comes for them, and hits them.
Collector
Detonation
Where and what an explosion was.
FiredBy
Who fired it, so the sweep can ignore the muzzle it came out of.
GameSimulation
Gift
Something a pickup gives.
GiftRegistry
The gifts a build knows about, by the name a document uses.
HealthGift
Hitscan
Fires a weapon's rays into the world and reports where they landed.
HitscanBehaviour
Rays, arriving the instant the trigger does.
HitZones
What a shot is worth depending on where it lands on a body.
InFlight
A rocket in flight: where it is, where it is going, and how long it has.
Inventory
Everything the player is carrying.
KeyGift
A key, whose colour is the pickup's own color rather than the gift's.
KeyKind
MechanismUsed
The player pressed something, and here is what came of it.
MeleeBehaviour
A swing: everything close enough and roughly in front.
MonsterDef
Everything about a kind of monster that does not change.
MonsterKind
Spawns whatever the bestiary says a monster can be.
MonsterState
What a monster is doing.
NoteKind
PatrolBrain
A ChaseBrain that walks a route while it has nothing better to do.
Pickup
Something on the floor, waiting to be walked over.
PickupKind
The kinds of entity a shooter's levels contain beyond the format's own.
Player
PlayerDied
The player's health reached zero this step.
PlayerHurt
The player took damage this step, from everything at once.
PowerUpGift
Runs out, rather than filling a pool.
ProjectileBehaviour
Something with a flight time, which the target can move out of the way of.
ProjectileSystem
Everything currently in the air.
Secret
A place the level rewards you for finding.
SecretFound
The player walked into a secret.
SecretKind
Places a Secret: a trigger volume that is counted the first time somebody walks into it.
ShooterActions
What a player asks for that only a shooter has.
ShooterEntities
What this game's monsters may be, as words in a level document.
ShooterPhases
The moments inside a shooter's step that a game can hang its own rules off.
ShotFired
The player pulled a trigger and the shot was delivered.
ShotHit
One thing a shot reached.
ShotLanded
A shot reached something.
Spawner
A place monsters arrive from, once, when something asks it to.
Wave
One wave: what arrives, and how long after the one before.
WeaponBehaviour
How a weapon delivers a shot that has already been paid for.
WeaponDef
Everything about a weapon that does not change while it is being fired.
WeaponShot
One shot, from where it starts to what it reached.

Enums

GameState
Whether the game is being played, lost, or finished.

Constants

patrolling → const MonsterState
The state a patrolling monster rests in.