wasm4 icon indicating copy to clipboard operation
wasm4 copied to clipboard

Add get/set pixel routines

Open MaxGraey opened this issue 1 year ago • 3 comments

Currently, only for AssemblyScript. But I can also add for everyone else. @aduros wdyt?

MaxGraey avatar Jul 22 '22 05:07 MaxGraey

I'm feeling like we should keep default API stubs very minimal. Things like pixel drawing, polygon drawing, etc. would be better to go in 3rd party libraries that can be maintained by other users as they see fit.

aduros avatar Jul 23 '22 01:07 aduros

set / get pixel is quite basic and useful operation which is pretty tricky in wasm4 due to packing. And users may easily do it in suboptimal way. See example: https://github.com/aduros/wasm4/pull/474/commits/f128495f4e41ddcf8b44fbedba9863d164ce6fe4#diff-222620e907510b8af2a9e5b17a92c840a445fefa24f760b26babd640fa7eb6f8R745

MaxGraey avatar Jul 23 '22 04:07 MaxGraey

I'm feeling like we should keep default API stubs very minimal. Things like pixel drawing, polygon drawing, etc. would be better to go in 3rd party libraries that can be maintained by other users as they see fit.

Would that 3rd party library eat the fixed 64 kb memory area reserved for the game etc.?

haviital avatar Feb 21 '23 11:02 haviital