doodle/pkg
Noah 1f00af5741 Collision Detection Fix + Doodad CLI Fixes
Fix collision detection when an actor's hitbox is offset from 0,0:

* Actors having a hitbox that didn't begin at X,Y 0,0 used to experience
  clipping issues with level geometry: because the game tracks their Position
  (top left corner of their graphical sprite) and their target position wasn't
  being correctly offset by their hitbox offset.
* To resolve the issue, an "ActorOffset" struct is added: you give it the
  original game's Actor (with its offset hitbox) and it will record the offset
  and give a mocked Actor for collision detection purposes: where the Position
  and Target can be offset and where its Hitbox claims to begin at 0,0 matching
  its offsetted Position.
* The translation between your original Actor and Offset Actor is handled at the
  boundary of the CollidesWithGrid function, so the main algorithm didn't need
  to be messed with and the game itself doesn't need to care about the offset.

Make some fixes to the doodad CLI tool:

* Fix palette colors being duplicated/doubled when converting from an image.
* The --palette flag in `doodad convert` now actually functions: so you can
  supply an initial palette.json with colors and attributes to e.g. mark which
  colors should be solid or fire and give them names. The palette.json doesn't
  need to be comprehensive: it will be extended with new distinct colors as
  needed during the conversion.
2024-05-27 15:14:00 -07:00
..
balance (Experimental) Run Length Encoding for Levels 2024-05-23 23:02:01 -07:00
branding RLE Encoding Code Cleanup [PTO] 2024-05-24 15:03:32 -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 Collision Detection Fix + Doodad CLI Fixes 2024-05-27 15:14:00 -07:00
cursor TouchScreenMode Fix 2024-04-19 22:42:47 -07:00
doodads RLE Encoding Code Cleanup [PTO] 2024-05-24 15:03:32 -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 Collision Detection Fix + Doodad CLI Fixes 2024-05-27 15:14:00 -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.go D++ Default Author and Embedded Doodads Error 2024-04-18 22:31:11 -07:00
editor_scene_debug.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
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
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.go Resolve circular import errors for Doodle++ plugin 2024-04-18 22:12:56 -07: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
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