forked from pyrex/chameleonic
PICO-8 game: you're a chameleon with rope physics
Kistaro Windrider
b1cc74fe3b
The tug_crate conversion is for performance. `foreach(tbl, predefined_func)` is substantially faster than a standard `for` loop using the `all` iterator. However, if the function inside the foreach is defined inline, it's much slower due to closure-construction overhead (even though nothing is being closed over). Converting `tug_crate` to take a table as an argument allows foreach to feed right into it, and it also naturally suggests a rewrite a few lines down to get rid of duplicative listing of `mx0,my0,dmx,dmy`, saving several tokens. I'm going to take a look at can_move to see if it's worth making iits mx0,my0,dmx,dmy arguments into a table as well. |
||
---|---|---|
chameleonic.p8 | ||
README.md |
EAT BUGS, SPACE SCUM