I am sure this is a super simple thing I am missing about how the SDK works (I also have zero previous exp developing games, so might miss a known game dev thing...), but I can't seem to draw lines, while also updating a moving sprite.
I already realized that any direct drawing (
drawLine() etc.) must happen after
playdate.update(), otherwise they are not shown.
I have a list of lines, trying to draw all of them, and for some reason though, even when calling draw after
sprite.update(), they still don't show. If I remove the
sprite.update() call completely, they are drawn (see gifs, with and without the sprite).
Note that the lines suppose to track to path that the orly poly was doing - when the bug is shown, we do see the very last line (looks like a point on top of the bug...), but not any previous lines.
Code is here: https://github.com/avielg/playdate-poly/tree/main
Note sure what I'm doing wrong? Would love any advice, thank you!