flutter3d_game_platformer library
A platformer: the second genre, and the instrument that tests the first.
SPEC stage 5 asks for "a game that is not a shooter, without a single edit
in lib/src/", and the value of it is not the game — it is what the attempt
finds. Three hardcoded object types had already been dug out of the engine
by imagining this one; sketching it for real found five more, all in input,
and they are fixed rather than worked around.
What this package needed from the engine and got unchanged: the fixed step, the character controller, the level format and its validator, the entity registry, mechanisms, movers, riders, exits, health, the ECS and the snapshot. What it had to bring itself: its own jump policy, its own purse, its own collectible, and its own step order.
Nothing here imports the renderer or names Flutter, so all of it runs in a
test with no device. The readouts are widgets and live in bridge.dart.
Classes
- BlockBroke
- A block was broken.
- BlockCrumbled
- A platform gave way under the weight on it.
- Bounced
- Was thrown upwards by something it landed on.
- Breakable
- A block that a ground pound breaks and nothing else does.
- BreakableKind
- A block a ground pound breaks. See Breakable.
- ChainEnded
- A run of scoring ended, and here is what it was worth.
- Checkpoint
- A place the level puts you back at.
- CheckpointKind
- CheckpointReached
- A checkpoint was reached for the first time.
- Climbable
- A ladder, or a rope — the same thing at two speeds of swinging.
- ClimbableKind
- A ladder, or a rope. See Climbable.
- Collectible
- Something the runner walks into and keeps.
- CollectibleKind
- CollectibleTaken
- The runner picked something up.
- ConveyorKind
- A floor that drags whatever stands on it.
- Crate
- A box the runner can shove about.
- CrateKind
- A crate in a level document.
- Crumbling
- A platform that gives way under whoever stands on it.
- CrumblingKind
- A platform that gives way. See Crumbling.
- Dashed
- Committed to a dash.
- EnemyKind
- Something that walks a route. See Patrol and Leaper.
- EnemyStomped
- The runner landed on something and killed it.
- FollowCamera
- A third-person camera: behind the runner, above it, out of the walls.
- FollowTuning
- How the camera trails the runner.
- FurnitureEvent
- A piece of the level's own furniture did something.
- Gatherer
- Someone a collectible can be given to.
- Grabbed
- Caught a rope or a ladder, and stopped falling.
- Hazard
- Spikes, lava, a saw blade: a volume that hurts whatever is standing in it.
- HazardKind
- Hunter
- Something that comes after the player, across the gaps.
- Jumped
- Left the ground under its own power.
- KeyKind
- A key on the floor.
- KeyTaker
- Someone a key can be given to.
- Landed
- Touched the ground.
- Launchable
- Something a spring can throw.
- Leaper
- A patrol that jumps the gaps in its route instead of turning at them.
- LevelSaid
- The level said something to the player.
- LongJumped
- Came out of a slide, low and far, with no steering.
- Mantled
- Pulled itself over a ledge.
- OneWayKind
- A platform that is a floor from above and nothing from below.
- Patrol
- Something that walks a route and will not walk off the end of the world.
- PlatformerActions
- What a player asks for that only a platformer has.
- PlatformerEntities
- The words a platformer's levels use beyond the format's own.
- PlatformerLayers
- The collision bits this genre gives its own geometry.
- PlatformerSimulation
- A platformer's step, in the order it has to happen in.
- PowerEnded
- A power-up ran out.
- Purse
- What somebody has picked up, counted by name.
- Runner
- The player: a body that runs, jumps twice, dashes, and carries a purse.
- RunnerDied
- The runner died on this step.
- RunnerEvent
- Something the runner's own body did.
- RunnerTuning
- How this game's jump feels, which is most of how the game feels.
- Slid
- Went into a slide.
- Spring
- A pad that throws whatever stands on it.
- SpringFired
- A pad threw something.
- SpringKind
- Surfaces
- What the floor does to whoever is standing on it.
- SwimTuning
- How a body behaves in water.
- WallJumped
- Pushed off a wall it was against.
- Water
- A body of water, as a trigger a runner can be inside.
Enums
- RunState
- Where the run is.
Functions
-
platformerRegistry(
{Dynamics? dynamics}) → EntityRegistry - Everything a platformer's level may contain, format and genre together.
-
platformerRules(
) → List< LevelRule> - What is true of a platformer's level whatever it contains.