doodle/pkg
Noah c5353df211 LoadUnloadChunk for Memory Optimization
Instead of the loadscreen eager-loading ALL level chunks to Go Images, only
load the chunks within the "LoadingViewport" - which is the on-screen
Viewport plus a margin of chunks off the screen edges.

During gameplay, every few ticks, reevaluate which chunks are inside or
outside the LoadingViewport; for chunks outside, free their SDL2 textures
and free their cached bitmaps to keep overall memory usage down. The
AzulianTag-Forest level now stays under 200 Textures at any given time
and the loadscreen goes faster as it doesn't have to load every chunk's
images up front.

The LoadUnloadChunk feature can be turned on/off with feature flags. If
disabled the old behavior is restored: loadscreen loads all images and
the LoadUnloadChunks function is not run.

Other changes:

* loadscreen: do not free textures in the Hide() function as this runs on
  a different goroutine and may break. The 4 wallpaper textures are OK
  to keep in memory anyway, the loadscreen is reused often!
* Free more leaked textures: on the Inventory frame and when an actor
  calls Self.Destroy()
* Stop leaking goroutines in the PubSub feature of the doodad script
  engine; scripting.Supervisor.Teardown() sends a stop signal to all
  scripts to clean up neatly. Canvas.Destroy() tears down its scripting
  supervisor automatically.
2022-04-10 12:40:25 -07:00
..
balance LoadUnloadChunk for Memory Optimization 2022-04-10 12:40:25 -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 Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -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 LoadUnloadChunk for Memory Optimization 2022-04-10 12:40:25 -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 LoadUnloadChunk for Memory Optimization 2022-04-10 12:40:25 -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 LoadUnloadChunk for Memory Optimization 2022-04-10 12:40:25 -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.go LoadUnloadChunk for Memory Optimization 2022-04-10 12:40:25 -07:00
editor_scene_debug.go Code Layout Refactor 2019-04-09 17:35:44 -07:00
editor_ui.go Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -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 Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -07:00
editor_ui_toolbar.go Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
fps.go LoadUnloadChunk for Memory Optimization 2022-04-10 12:40:25 -07:00
guitest_scene.go The Window Manager Update 2020-04-06 23:21:17 -07:00
main_scene.go Optimize memory by freeing up SDL2 textures 2022-04-09 14:41:24 -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.go LoadUnloadChunk for Memory Optimization 2022-04-10 12:40:25 -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
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