+186 lines, -451 lines
Harvey Actions API refactor netted ~300 fewer lines
captured: 2023-04-06 11:09
Pretty stoked about that one!
/compare/commit..main
urlsfor example: https://github.com/russmatney/dino/compare/4fb4d0cd8521a0c18780bac5b98f544ac55aa199...main
i.e. from any commit view, change
commit
to
compare
and add
...main
to the
url. (or some other commit hash instead of
main
)
Couple things to decomplect in this refactor
'Game' global object fills several rows (across all my games)
we want a Player focused autoload/namespace. or something like 'Game' filling the same purpose
breaking down mvaniaArea, mvaniaRoom, mvaniaGame
feels like they could serve dungeon crawlers and beat em ups. maybe runners? Likely platformers.
this abstraction supports maps as well - room has funcs for calcing rectangles
from tilemaps and what not
assigning all powers if not managed game
respawning player after death
kind of a register and ensure-current-area feel
minimap uses this for current area highlight
duck typing on room children:
rooms:
use whatever scene_file_paths were already in there
might need some other hack for it to discover more scenes
'unmanaged' games