flutter3d_game_kit 1.0.0-rc.2
flutter3d_game_kit: ^1.0.0-rc.2 copied to clipboard
Gameplay parts for flutter3d games, one library each: reactions, a soundtrack, ghosts of past runs, seeded levels and the world past the simulated square.
1.0.0-rc.2 #
-
Breaking:
CueSheet.listeniscuesFor. It looks up what events sound like, asImpulseTable.impulsesForlooks up a shake;listensubscribes and answers aRegistrationeverywhere else.dart fixrenames the calls. -
Breaking:
Daylight.advanceisupdate. A frame's time goes toupdate, andadvanceis playback's alone.dart fixrenames the calls. -
Breaking:
BestRun.recordisrecordSeconds. A time in adoublesays seconds in its name; the same value.dart fixrenames it. -
Breaking: a ghost track is a
GhostTape.BestRun,Ghost,RunGhost,ghostOfRun,tapeFromJsonandtapeToJsonname the engine's renamed type; the values are the same. -
Breaking: the plugins are
flutter3d_game_kit.reactionsandflutter3d_game_kit.soundtrackby default, where they wereflutter3d_addon_reactionsandflutter3d_addon_soundtrack. A run recorded under the old ids reads as naming the new ones. -
GhostNote.saytakeslanguageCode:by name. -
Breaking: a cue and a reaction rule take one context. A
Cueis handed aCueContext(new) and aReactionRuleaReactionContext(new), each with theeventand theoutit writes into, so a minor can hand them more without breaking a sheet or a table written against 1.0. Each row keeps one and sets it for every event. -
ghostOfRunreturns aRunGhost(ghost,note) in place of a record, so it can say more in a minor release. -
Breaking:
Felt.shakelasts 0.35 seconds unless told otherwise. Itssecondsdefaulted to nought, and the rig scales a shake by its length, soFelt.shake(0.5)described a shake and did nothing. The default is now the oneCameraRig.shakehas. A call that passessecondsis unchanged. -
Daylight.defaultSunIntensityis written in lux: 15 000. It was 2.6 ×Photometric.legacyUnit, the same sun within half a percent, stated in the unit of the renderer before 1.0. -
Breaking:
soundtrack.dartdoes not re-export the sound types.AudioBus,Heard,SoundBankandSoundDefareflutter3d_audio_core's, andflutter3d_audionames them too. -
Daylight's sun is in lux.Daylight.defaultSunIntensityis 2.6 ×LightNode.defaultIntensity, about 15 000 lux; it was left at 2.6 when lights moved to lux, a sun two-thousandths of daylight. -
A best run is a format of its own:
f3d.ghostTape.tapeToJsonwrites the envelope (ghostTapeFormat), andtapeFromJsonreads it and the bare{"version": 1}every best run had before; another format's document or a newer one throws aDocumentFormatException. Notf3d.ghost, the racing lap's id, whose body is a different one. -
New: one package for what was five.
flutter3d_addon_reactions,flutter3d_addon_soundtrack,flutter3d_addon_ghost,flutter3d_addon_seeded_levelsandflutter3d_addon_worldare libraries of this package now:reactions.dart,soundtrack.dart,ghost.dart,seeded_levels.dartandworld.dart, each with the API its package had, andflutter3d_game_kit.dartexports them all.dart run flutter3d_build:migratemoves a project's dependencies and imports; the packages' own histories are indoc/changelogs/. -
No native code. The ragdoll, the wrecks and the party sessions, which reach the physics core in C, are
flutter3d_game_physics, and so areElementSounds,ElementCuesandDaylight.lightWater(now theDaylightOnWaterextension), which reach it throughflutter3d_effects. A game that uses only the parts here compiles no C and downloads no wgpu-native.migratemoves the dependency and the imports.
reactions.dart, from flutter3d_addon_reactions 1.0.0-rc.1 #
-
Breaking:
ReactionsPlugin.takeisdrain, the verb for a read that empties what it reads. -
A reaction a game can grow.
ReactionEffectis an open base for whatReactionhas no field for — slow motion, a rumble, a flare — added by a rule withReactionBuilder.add, read fromReaction.effectsand done byReaction.perform. A sixth kind of effect no longer needs this package. -
What an event looks and feels like, as a decision.
Reactionholds bursts, lingering plumes, camera jolts, sounds, haptic pulses and whether the screen flashes, so a test can assert what a step showed without a device.showInandfeelperform it on a particle system and a camera rig. -
Keyed by event type.
ReactionTableruns a game's rules over its events in the order they happened, andReactionsPluginhears it from the engine's bus on the frame channel, as a view plugin on plugin API 1.0. A step a rollback ran again is not shown twice. -
The camera's three verbs and the flash.
Feltdescribes a kick, a shake or a widening, applied to aCameraRig, whose motion setting still decides how much.ScreenFlashfades by the step and is fired at the player's own brightness, so a flash on every hit stays the player's choice. -
Out of three games. The dungeon, the platformer and racing each had a
Reactionof their own. They use this one now, and keep only the part that says which of their events shows what.
soundtrack.dart, from flutter3d_addon_soundtrack 1.0.0-rc.1 #
-
A cue sheet keyed by events.
CueSheetkeeps what each event sounds like and hands backHeards in the order the events happened, so a test can ask what a step sounded like with no device.SoundtrackPluginhears it from the engine's bus on the frame channel and plays it, as a view plugin on plugin API 1.0; a rollback does not play a sound twice. -
Footsteps by distance.
Footstepspays for a step in metres walked across the ground, and none in the air, so a sprint is the same walker faster rather than a different one. -
Sounds with a lifetime.
Sustainedbegins, follows and ends a voice by one key, andSustainedVoicesplays them, so a door grinds for as long as it moves and a level change stops what no end will reach.Voiceis an open value class. -
The elements heard.
ElementSoundsholds a voice to every fire and every fall of waterPhysicsHearingreports and plays each splash, fromElementCuesa game chooses;ElementCues.nearis the effects package's own recordings. -
A soundtrack plays on the bus it is given.
SoundtrackPlugin(bus: ...),ElementSounds(cues, bus)andSustainedVoices(bus: ...)play their cues on that bus. Leave it out and each sound keeps its own. The sheet is heard on the frame channel before the frame phases run, soAudioPluginmixes a cue in the frame it was heard.AudioBusis exported here, so a sheet can name a bus without also importingflutter3d_audio_core.
ghost.dart, from flutter3d_addon_ghost 1.0.0-rc.1 #
-
ghostOfRuntakes thephysicsthe ghost is replayed on. -
Breaking:
ghostOfRunanswers aGhostNote, not an English sentence. The record'ssaysisnote, an open set of ids with what each carries;GhostNote.say(languageCode)words it in English or Russian at the screen. -
Breaking:
BestRun.loadis asynchronous, becauseStorageis.BestRun.savedis the writefinishedstarted. -
One ghost for every game.
Ghostputs a node where aTapewas at a moment of it and hides it outside the track. It stands on a model's floor, turns by its facing and lifts along the track's own up, so the same class draws a runner on its feet and a car leaning into a banked corner. -
A ghost is a look, not a livery.
Ghost.lookis translucent, unlit and writes no depth;Ghost.hauntputs it on every part of a model, replacing the materials rather than editing them;Ghost.buildmakes a ghost of the game's own model, or of a fallback while that loads. -
A shared run is raced from its tape or its poses.
ghostOfRunplays the tape again through the game's own staging when the run can be replayed, and reads the body's track off the run's pose record when it cannot: other physics, another simulation version, a level edited as it went. A run in another version of the level is refused, with the reason. -
The best run, kept.
BestRunsamples every run, keeps one only when it beats the record on disk (not the session's), refuses a run with almost no samples in it, and never throws on a document that will not read. The game may name its own document format. -
Out of the demos. The platformer's runner ghost and the racing demo's ghost car and lap keeper moved here; each demo keeps its own staging, its own model and its own file.
seeded_levels.dart, from flutter3d_addon_seeded_levels 1.0.0-rc.1 #
-
Levels made from a seed when they are reached.
SeededLevelsnames a levelgenerated:<seed>where a level would name its asset, reads the seed back withseedOf, and makes the document withlevel, off the drawing thread. The same seed makes the same level, so a save opens it again and a run through them replays. -
Each level names the next. The level made from a seed carries
nextas the following seed, so a game makes only the levels a player reaches. The rules are asked for by depth from the run's first seed, which is how they get harder on the way down. -
From the dungeon demo's depths. The rules stay the game's: what a room holds is its own business, and the dungeon's
Depthsis now its rules over this.
world.dart, from flutter3d_addon_world 1.0.0-rc.1 #
-
Breaking:
Horizon.addTotakesRenderMaterials. The engine'sMaterialisRenderMaterialin 1.0, so it no longer collides with Flutter's;dart fixrenames it. -
The hour of the day, on the physical sky.
Daylightmoves the sun round one great circle a day and hands the renderer aSkySettingswith the sun where the hour puts it: the air scatters the morning pale, the evening red, and lets the stars out at night. The sun and the moon are lit by what the air leaves of them, and only the one in the sky casts the shadows. The length of an hour, the sun's strength, the moon's share and where noon stands are a game's to set. -
The world going on to the horizon.
Horizonbuilds rings round the simulated square, close at the edge and kilometres apart further out: a far floor that starts where the game's ground leaves off and sinks to a far depth with a slow swell in it, and a level surface over it carrying the depth under it, as a water look reads it. The ground function stays the game's; this asks it for heights. -
Two pieces in one package. Both dress the world around the part a game simulates, and each is a single class; two packages of one class each would cost a reader more than they save. They came from the sandbox demo's day and night and the Reef demo's open sea.