doodle/pkg
Noah Petherbridge 4851730ccf Fix RLE Encoding Off-by-One Errors [PTO]
Levels can now be converted to RLE encoded chunk accessors and be re-saved
continuously without any loss of information.

Off-by-one errors resolved:

* The rle.NewGrid() was adding a +1 everywhere making the 2D grids have 129
  elements to a side for a 128 chunk size.
* In rle.Decompress() the cursor value and translation to X,Y coordinates is
  fixed to avoid a pixel going missing at the end of the first row (128,0)
* The abs.X-- hack in UnmarshalBinary is no longer needed to prevent the
  chunks from scooting a pixel to the right on every save.

Doodad tool updates:

* Remove unused CLI flags in `doodad resave` (actors, chunks, script,
  attachment, verbose) and add a `--output` flag to save to a different file
  name to the original.
* Update `doodad show` to allow debugging of RLE compressed chunks:
    * CLI flag `--chunk=1,2` to specify a single chunk coordinate to debug
    * CLI flag `--visualize-rle` will Visualize() RLE compressed chunks in
      their 2D grid form in your terminal window (VERY noisy for large
      levels! Use the --chunk option to narrow to one chunk).

Bug fixes and misc changes:

* Chunk.Usage() to return a better percentage of chunk utilization.
* Chunker.ChunkFromZipfile() was split out into two functions:
    * RawChunkFromZipfile retrieves the raw bytes of the chunk as well as the
      file extension discovered (.bin or .json) so the caller can interpret
      the bytes correctly.
    * ChunkFromZipfile calls the former function and then depending on file
      extension, unmarshals from binary or json.
    * The Raw function enables the `doodad show` command to debug and visualize
      the raw contents of the RLE compressed chunks.
* Updated the Visualize() function for the RLE encoder: instead of converting
  palette indexes to hex (0-F) which would begin causing problems for palette
  indexes above 16 (as they would use two+ characters), indexes are mapped to
  a wider range of symbols (0-9A-Z) and roll over if you have more than 36
  colors on your level. This at least keeps the Visualize() grid an easy to
  read 128x128 characters in your terminal.
2024-05-24 13:54:41 -07:00
..
balance (Experimental) Run Length Encoding for Levels 2024-05-23 23:02:01 -07:00
branding Doodle++ Code Cleanup 2024-04-18 22:49:12 -07:00
campaign Rename Go module 2022-09-24 15:17:25 -07:00
chatbot Rename Go module 2022-09-24 15:17:25 -07:00
collision Walk up slopes smoothly, texture freeing improvement 2024-02-07 22:14:48 -08:00
cursor TouchScreenMode Fix 2024-04-19 22:42:47 -07:00
doodads Deterministic JavaScript intervals + Code Cleanup 2024-04-27 00:10:28 -07:00
drawtool Level Thumbnails on Story Mode Select 2023-12-09 14:59:31 -08:00
enum Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
filesystem Rename Go module 2022-09-24 15:17:25 -07:00
gamepad Unit test fixes and code cleanup 2023-12-02 12:33:14 -08:00
keybind Flood Tool, Survival Mode for Azulian Tag 2022-03-26 13:55:06 -07:00
level Fix RLE Encoding Off-by-One Errors [PTO] 2024-05-24 13:54:41 -07:00
levelpack Update savegame format, Allow out-of-bounds camera 2023-03-07 21:55:10 -08:00
log Switch github.com/kirsle/golog to git.kirsle.net/go/log 2019-12-22 18:34:31 -08:00
modal Wait Modal 2022-09-24 18:39:02 -07:00
native Code cleanup for TouchScreenMode 2024-04-19 23:13:32 -07:00
pattern SemiSolid Pixels + Icons 2022-10-09 21:39:43 -07:00
physics Rename Go module 2022-09-24 15:17:25 -07:00
plus Doodle++ Code Cleanup 2024-04-18 22:49:12 -07:00
savegame Update savegame format, Allow out-of-bounds camera 2023-03-07 21:55:10 -08:00
scripting Deterministic JavaScript intervals + Code Cleanup 2024-04-27 00:10:28 -07:00
shmem Level Difficulty + UI Polish 2022-03-06 22:20:53 -08:00
sound Level Thumbnails on Story Mode Select 2023-12-09 14:59:31 -08:00
sprites Rename Go module 2022-09-24 15:17:25 -07:00
uix (Experimental) Run Length Encoding for Levels 2024-05-23 23:02:01 -07:00
updater Rename Go module 2022-09-24 15:17:25 -07:00
usercfg Fix blockers for v0.14.0 release 2024-05-05 15:59:56 -07:00
userdir Log game output to disk, update deps for 1.14.0 2024-05-04 19:32:40 -07:00
wallpaper Level Thumbnails on Story Mode Select 2023-12-09 14:59:31 -08:00
wasm Level Thumbnails on Story Mode Select 2023-12-09 14:59:31 -08:00
windows Resolve circular import errors for Doodle++ plugin 2024-04-18 22:12:56 -07:00
cheats.go Add cheat code to send power to all actors 2023-02-18 14:21:07 -08:00
commands.go Walk up slopes smoothly, texture freeing improvement 2024-02-07 22:14:48 -08:00
common_menubar.go Rename Go module 2022-09-24 15:17:25 -07:00
config.go Level Thumbnails on Story Mode Select 2023-12-09 14:59:31 -08:00
doodle.go Deterministic JavaScript intervals + Code Cleanup 2024-04-27 00:10:28 -07:00
editor_scene_debug.go Rename Go module 2022-09-24 15:17:25 -07:00
editor_scene.go D++ Default Author and Embedded Doodads Error 2024-04-18 22:31:11 -07:00
editor_ui_doodad.go Resolve circular import errors for Doodle++ plugin 2024-04-18 22:12:56 -07:00
editor_ui_menubar.go Doodle++ Code Cleanup 2024-04-18 22:49:12 -07:00
editor_ui_palette.go WIP: Chunker size to uint8 and Rectangular Doodads 2023-02-16 21:47:18 -08:00
editor_ui_popups.go Resolve circular import errors for Doodle++ plugin 2024-04-18 22:12:56 -07:00
editor_ui_toolbar.go Rename Go module 2022-09-24 15:17:25 -07:00
editor_ui.go WIP Doodle++ 2024-04-18 20:23:07 -07:00
fps.go Dust off WASM build support 2023-12-08 21:52:34 -08:00
guitest_scene.go Rename Go module 2022-09-24 15:17:25 -07:00
main_scene.go Prepare v1.14.0 for release 2024-05-04 18:26:32 -07:00
menu_scene.go Resolve circular import errors for Doodle++ plugin 2024-04-18 22:12:56 -07:00
play_inventory.go WIP: Chunker size to uint8 and Rectangular Doodads 2023-02-16 21:47:18 -08:00
play_scene_menubar.go Resolve circular import errors for Doodle++ plugin 2024-04-18 22:12:56 -07:00
play_scene_touch.go TouchScreenMode Fix 2024-04-19 22:42:47 -07:00
play_scene.go Resolve circular import errors for Doodle++ plugin 2024-04-18 22:12:56 -07:00
player_physics.go Coyote time 2024-02-06 20:56:07 -08:00
scene.go Walk up slopes smoothly, texture freeing improvement 2024-02-07 22:14:48 -08:00
shell.go Cheats Menu UI 2023-01-02 12:36:12 -08:00