Skip to content

Search

Indietro
· 1 min di lettura

A pack in pieces

A web export can start its game before every asset has arrived: the scenes `[export] later` names come in a second file the page fetches while the game runs.

A web export can start its game before every asset has arrived. The scenes [export] later names have their assets in a second file, which the page fetches while the game runs.

A scene from the second file: the Balaur logo, drawn once the page had fetched it

[export]
later = ["scenes/level*.toml"]
  • The assets only those scenes name go to game.bpak.tail, beside game.bpak. An asset any other scene or a script names stays in game.bpak.
  • game.bpak lists the tail and those scenes in .balaur/tail.toml. The page boots on it and fetches the tail behind the first frame.
  • A switch to one of those scenes waits until the tail has arrived, then goes ahead at the end of that tick.
  • A test game whose second scene draws one picture exported to a 59 KB game.bpak and a 17 KB tail, and drew the picture once the tail had come.
  • balaur play game.bpak reads a tail beside it before the first frame.
  • A desktop or a phone export stays one file.

Davvero?