doodle/pkg
Noah Petherbridge b17ca34de2 Bindata: Embedding Doodads and Levels (for WASM)
* Use `go-bindata` to embed built-in doodads and levels directly into
  the Doodle binary. `make bindata` produces the bindata source file.
* Add `FromJSON()` method to Levels and Doodads to load objects from
  JSON strings in memory (for bindata built-ins or WASM ajax requests)
* Update file loading functions to check the embedded bindata files.
  * pkg/config.go#EditFile:
    * Supports editing a level from bindata (TODO: remove this support)
    * If the "assets/levels/%(simple-name.level)" exists in bindata,
      edits that drawing.
    * No such support for editing built-in doodads.
    * WASM has no filesystem access to edit files except built-in
      levels (yet)
  * pkg/doodads#ListDoodads:
    * Prepends built-in doodads from bindata to the returned list.
    * WASM: no filesystem access so gets only the built-ins.
  * pkg/doodads#LoadFile:
    * Checks built-in bindata store first for doodad files.
    * WASM: tries an HTTP request if not found in bindata but can go no
      further if not found (no filesystem access)
  * pkg/filesystem#FindFile:
    * This function finds a level/doodad by checking all the places.
    * If the level or doodad exists in bindata built-in, always returns
      its system path like "assets/doodads/test.doodad"
    * WASM: always returns the built-in candidate path even if not found
      in bindata so that ajax GET can be attempted.
  * pkg/level#ListSystemLevels:
    * New function that lists the system level files, similar to the
      equivalent doodads function.
    * Prepends the bindata built-in level files.
    * WASM: only returns the built-ins (no filesystem support)
    * Desktop: also lists and returns the assets/levels/ directory.
  * pkg/level#LoadFile:
    * Like the doodads.LoadFile, tries from built-in bindata first, then
      ajax request (WASM) before accessing the filesystem (desktop)
* Menu Scene: TODO, list the built-in levels in the Load Level menu.
  This feature will soon go away when WASM gets its own storage for user
  levels (localStorage instead of filesystem)
2019-06-27 15:07:34 -07:00
..
balance WASM Event Queue 2019-06-26 20:33:24 -07:00
branding Add Branding Module for Centralized Game Info 2019-06-23 17:52:48 -07:00
collision Return False: Solid Collision Between Actors 2019-05-28 21:43:30 -07:00
doodads Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
enum Code Layout Refactor 2019-04-09 17:35:44 -07:00
filesystem Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
level Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
log Initial Doodad JavaScript System 2019-04-15 23:07:40 -07:00
scripting WASM Texture Caching 2019-06-27 12:03:52 -07:00
shmem Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
uix Texture Caching for WASM Canvas Engine 2019-06-26 22:44:08 -07:00
userdir Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
wallpaper Refactor Render Texture-Cache Interface 2019-06-27 13:01:01 -07:00
wasm Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
commands.go Add MenuScene with New Level UI 2019-06-25 15:01:37 -07:00
config.go Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
doodle.go WASM Texture Caching 2019-06-27 12:03:52 -07:00
editor_scene_debug.go Code Layout Refactor 2019-04-09 17:35:44 -07:00
editor_scene.go Add Play/Edit Buttons to Toggle Between Modes 2019-06-25 18:36:53 -07:00
editor_ui_doodad.go Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
editor_ui_palette.go Blueprint Theme Palette 2019-06-25 17:43:23 -07:00
editor_ui.go Add Play/Edit Buttons to Toggle Between Modes 2019-06-25 18:36:53 -07:00
fps.go Add MenuScene with New Level UI 2019-06-25 15:01:37 -07:00
guitest_scene.go Add Branding Module for Centralized Game Info 2019-06-23 17:52:48 -07:00
main_scene.go Initial WebAssembly Build Target 2019-06-26 18:40:40 -07:00
menu_scene.go Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
play_scene.go Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
scene.go Port over code from old collision dev PR 2019-04-09 19:17:56 -07:00
shell.go Code Layout Refactor 2019-04-09 17:35:44 -07:00