Can't show lines and sprite together?

This also got me when I was starting out.

What you have to do is draw to the sprite background, which is taken into consideration during sprite updates.

playdate.graphics.sprite.setBackgroundDrawingCallback(drawCallback)
https://sdk.play.date/1.9.0/Inside%20Playdate.html#f-graphics.sprite.setBackgroundDrawingCallback

Also see the example game at: https://sdk.play.date/1.9.0/Inside%20Playdate.html#_a_basic_playdate_game_in_lua

ps: I do exactly this with the tyre skid marks in my game Daily Driver

1 Like