Noah Petherbridge
d4e6d9babb
* 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. |
||
---|---|---|
.. | ||
balance | ||
branding | ||
campaign | ||
collision | ||
doodads | ||
drawtool | ||
enum | ||
filesystem | ||
keybind | ||
level | ||
license | ||
log | ||
modal | ||
native | ||
pattern | ||
physics | ||
scripting | ||
shmem | ||
sound | ||
sprites | ||
uix | ||
updater | ||
usercfg | ||
userdir | ||
wallpaper | ||
wasm | ||
windows | ||
cheats.go | ||
commands.go | ||
config.go | ||
doodle.go | ||
editor_scene_debug.go | ||
editor_scene.go | ||
editor_ui_doodad.go | ||
editor_ui_menubar.go | ||
editor_ui_palette.go | ||
editor_ui_popups.go | ||
editor_ui_toolbar.go | ||
editor_ui.go | ||
fps.go | ||
guitest_scene.go | ||
main_scene.go | ||
menu_scene.go | ||
play_inventory.go | ||
play_scene.go | ||
scene.go | ||
shell.go | ||
story_scene.go |