doodle/pkg/level
Noah d4e6d9babb Loading Screen
* pkg/loadscreen implements a global Loading Screen for loading heavy
  levels for playing or editing.
* All chunks in a level are pre-rendered to bitmap before gameplay
  begins, which reduces stutter as chunks were being lazily rendered on
  first appearance before.
* The loading screen can be played with in the developer console:
  $ loadscreen.Show()
  $ loadscreen.Hide()
  Along with ShowWithProgress(), SetProgress(float64) and IsActive()
* Chunker: separate the concerns between Bitmaps an (SDL2) Textures.
* Chunker.Prerender() converts a chunk to a bitmap (a Go image.Image)
  and caches it, only re-rendering if marked as dirty.
* Chunker.Texture() will use the pre-cached bitmap if available to
  immediately produce the SDL2 texture.

Other miscellaneous changes:

* Added to the Colored Pencil palette: Sandstone
* Added "perlin noise" brush pattern

Note: this commit introduces instability and crashes:

* New `asyncSetup()` functions run on a goroutine, but SDL2 texture
  calls must run on the main thread.
* Chunker avoids this by caching bitmaps, not textures.
* Wallpaper though is unstable, sometimes works, sometimes has graphical
  glitches, sometimes crashes the game.
* Wallpaper.Load() and the *Texture() functions are where it crashes.
2021-07-18 21:19:52 -07:00
..
publishing Embeddable Doodads In Levels 2021-06-13 14:59:03 -07:00
actors.go Cut lib/render into its own package, change all imports 2019-12-22 18:21:58 -08:00
chunk.go Loading Screen 2021-07-18 21:19:52 -07:00
chunk_map.go Cut lib/render into its own package, change all imports 2019-12-22 18:21:58 -08:00
chunk_test.go Doodads: Crumbly Floor, Start Flag & State Blocks 2019-12-30 18:13:28 -08:00
chunker.go Loading Screen 2021-07-18 21:19:52 -07:00
chunker_test.go Change types int32 -> int per upstream render and ui library 2019-12-27 19:16:34 -08:00
filesystem.go Manage Embedded Files In Levels 2021-06-13 16:03:32 -07:00
fmt_binary.go Load Doodads from System Path as well as User Path 2019-05-06 13:35:08 -07:00
fmt_json.go Gzip Compression for Levels and Doodads 2021-07-13 20:06:57 -07:00
fmt_maintenance.go Auto-prune Empty Chunks in Level Files 2019-07-16 22:10:18 -07:00
fmt_readwrite.go Go 1.16 embed instead of go-bindata 2021-07-13 18:04:25 -07:00
page_type.go Add MenuScene with New Level UI 2019-06-25 15:01:37 -07:00
palette.go Brush Pattern Textures 2021-06-09 22:36:32 -07:00
palette_defaults.go Loading Screen 2021-07-18 21:19:52 -07:00
swatch.go Brush Pattern Textures 2021-06-09 22:36:32 -07:00
types.go Change types int32 -> int per upstream render and ui library 2019-12-27 19:16:34 -08:00