doodle/pkg
Noah Petherbridge 93623e4e8a Zipfiles as File Format for Levels and Doodads
Especially to further optimize memory for large levels, Levels and
Doodads can now read and write to a ZIP file format on disk with
chunks in external files within the zip.

Existing doodads and levels can still load as normal, and will be
converted into ZIP files on the next save:

* The Chunker.ChunkMap which used to hold ALL chunks in the main json/gz
  file, now becomes the cache of "hot chunks" loaded from ZIP. If there is
  a ZIP file, chunks not accessed recently are flushed from the ChunkMap
  to save on memory.
* During save, the ChunkMap is flushed to ZIP along with any non-loaded
  chunks from a previous zipfile. So legacy levels "just work" when
  saving, and levels loaded FROM Zip will manage their ChunkMap hot
  memory more carefully.

Memory savings observed on "Azulian Tag - Forest.level":

* Before: 1716 MB was loaded from the old level format into RAM along
  with a slow load screen.
* After: only 243 MB memory was used by the game and it loaded with
  a VERY FAST load screen.

Updates to the F3 Debug Overlay:

* "Chunks: 20 in 45 out 20 cached" shows the count of chunks inside the
  viewport (having bitmaps and textures loaded) vs. chunks outside which
  have their textures freed (but data kept), and the number of chunks
  currently hot cached in the ChunkMap.

The `doodad` tool has new commands to "touch" your existing levels
and doodads, to upgrade them to the new format (or you can simply
open and re-save them in-game):

    doodad edit-level --touch ./example.level
    doodad edit-doodad --touch ./example.doodad

The output from that and `doodad show` should say "File format: zipfile"
in the headers section.

To do:

* File attachments should also go in as ZIP files, e.g. wallpapers
2022-04-29 20:34:59 -07:00
..
balance Zipfiles as File Format for Levels and Doodads 2022-04-29 20:34:59 -07:00
branding Update Go dependencies 2022-04-09 16:01:56 -07:00
campaign Go 1.16 embed instead of go-bindata 2021-07-13 18:04:25 -07:00
chatbot Easter Egg: RiveScript Chatbot 2022-01-08 19:21:08 -08:00
collision Fix climbing on the right bug + eager-render boolprop 2022-04-09 18:21:26 -07:00
doodads Zipfiles as File Format for Levels and Doodads 2022-04-29 20:34:59 -07:00
drawtool Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
enum Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
filesystem Finalize basic functionality for Level Packs 2021-12-26 20:48:29 -08:00
gamepad Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
keybind Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
level Zipfiles as File Format for Levels and Doodads 2022-04-29 20:34:59 -07:00
levelpack Savegame and High Scores 2022-01-02 16:28:43 -08:00
license Diverge Free vs. Paid Features 2021-06-16 22:35:01 -07:00
log Switch github.com/kirsle/golog to git.kirsle.net/go/log 2019-12-22 18:34:31 -08:00
modal Prepare v0.12.1 for release 2022-04-16 17:50:40 -07:00
native Level Difficulty + UI Polish 2022-03-06 22:20:53 -08:00
pattern Loading Screen 2021-07-18 21:19:52 -07:00
physics Overhaul the Platformer Physics System 2020-04-04 21:00:32 -07:00
savegame Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
scripting LoadUnloadChunk for Memory Optimization 2022-04-10 12:40:25 -07:00
shmem Level Difficulty + UI Polish 2022-03-06 22:20:53 -08:00
sound WIP Game Settings Window, WASM Fixes, Sound FX 2020-09-01 20:54:58 -07:00
sprites Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -07:00
uix Zipfiles as File Format for Levels and Doodads 2022-04-29 20:34:59 -07:00
updater Send User-Agent of version/os/arch on update check 2022-01-16 18:33:27 -08:00
usercfg Game Controller Support 2022-02-19 18:31:22 -08:00
userdir Savegame and High Scores 2022-01-02 16:28:43 -08:00
wallpaper Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -07:00
wasm WASM: Store User Files in localStorage 2019-06-27 15:59:18 -07:00
windows Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -07:00
cheats.go Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -07:00
commands.go Reset Timer Doodad + Various Fixes 2022-03-27 11:51:14 -07:00
common_menubar.go Spit and polish 2022-01-02 22:36:32 -08:00
config.go Go 1.16 embed instead of go-bindata 2021-07-13 18:04:25 -07:00
doodle.go Level Difficulty + UI Polish 2022-03-06 22:20:53 -08:00
editor_scene_debug.go Code Layout Refactor 2019-04-09 17:35:44 -07:00
editor_scene.go Zipfiles as File Format for Levels and Doodads 2022-04-29 20:34:59 -07:00
editor_ui_doodad.go Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -07:00
editor_ui_menubar.go Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
editor_ui_palette.go Condensed Palette, Bird AI Update 2021-10-12 20:49:48 -07:00
editor_ui_popups.go Zipfiles as File Format for Levels and Doodads 2022-04-29 20:34:59 -07:00
editor_ui_toolbar.go Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
editor_ui.go Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -07:00
fps.go Prepare v0.12.1 for release 2022-04-16 17:50:40 -07:00
guitest_scene.go The Window Manager Update 2020-04-06 23:21:17 -07:00
main_scene.go Prepare v0.12.1 for release 2022-04-16 17:50:40 -07:00
menu_scene.go Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -07:00
play_inventory.go Async Giant Screenshot, Player Physics and UI Polish 2021-10-07 18:27:38 -07:00
play_scene_menubar.go v0.11.0 last minute tweaks 2022-02-21 13:09:51 -08:00
play_scene_touch.go Spit and polish 2022-01-02 22:36:32 -08:00
play_scene.go Zipfiles as File Format for Levels and Doodads 2022-04-29 20:34:59 -07:00
scene.go Game Controller Support 2022-02-19 18:31:22 -08:00
shell.go Level Difficulty + UI Polish 2022-03-06 22:20:53 -08:00