flutter3d_sim 0.4.2
flutter3d_sim: ^0.4.2 copied to clipboard
The simulation: a fixed step, an ECS, levels, navigation, saves and replays. Plain Dart, so it runs on a server.
0.4.2 #
- A level can ask to be reflected.
EntityTypes.reflectionProbeis the format's word for a point a room is reflected from, andReflectionProbeKindis the kind that validates one:radius,intensity,faceSize,levels,nearandfarare all optional and each is refused where the renderer would otherwise assert on it at load. The two planes are resolved against the probe's own defaults before either is judged, so a document naming only a near plane past two hundred metres is refused here rather than at load: the far plane it did not name is still a far plane. Pure data to the simulation — nothing spawns and nothing is revealed — and a word a game has to put in its own vocabulary, so a game without probes reads the entity as unknown rather than growing a reflection it did not ask for.
0.4.1 #
- Lightmaps.
LightmapLayoutunwraps every visible brush face onto a planar atlas from the level alone, so the baker and the geometry agree without a table;LightmapBakerbakes the light the walls throw on each other by gathering — direct light with shadows through the level's own collision world, then bounces along cosine-weighted rays — seeded by the texel, so two bakes are the same bytes.Lightmapstores RGBM in RGBA8 with a hash of the brushes, lights and materials, anddart run flutter3d_sim:bake_lightmapwrites<level>.lightmap.bin.BrushGeometry.build(lightmap:)hands every vertex its second coordinate. - Jump links.
NavGrid.bake(jumps:)finds the gaps and ledges aJumpReachclears; aFlowFieldfilters them by its own body's reach with the body's width added, relaxes them backwards at their distance plus two cells so a walk of equal length wins, andjumpAtsays when the next step is a jump.Navigation.jumpAheadandActorSystemtake off through the controller's buffered request on the take-off cell. Mind.heading, for turning to face the way the field said.
0.4.0 #
- First release. It is
flutter3d_game's inside, moved out whole: the fixed step, the entity store, the level format and its validator, saves, demos and the rewind buffer, world logic, actors, navigation, the camera rig and the maths. Nothing changed behaviour; the imports moved and the package boundary is new. - Plain Dart, and that is the reason it exists. A server that verifies a
submitted run has to replay it through the same simulation the player ran,
and a Flutter SDK in that container is a blocker rather than an
inconvenience.
flutter3d_gamekeeps the eight files that reached Flutter — the touch and keyboard widgets, theMediaQueryread, the diagnostics sink — and re-exports this package, so no existing program changes a line. - The boundary is a check, not a comment:
the simulation names no Flutterintool/structure.dartscanslib/,test/andbin/. StateDigestandDigestTracecome with it — a 32-bit digest over the bits of a snapshot, computed the same way in a browser as in the VM, and a checkpoint trace that names the first step two runs disagree at.dart run flutter3d_sim:bake_visibilitymoves here fromflutter3d_game, where it had never needed Flutter either.