I'm trying to recreate a kind of shooting game to practice programming for playdate and finally I'm going to ask in the forum because there is still little documentation and tutorials to consult. So, first of all, I would like to ask if you know of any youtube channel/tutorial/book or anything that is useful for you to ask questions in addition to Inside Playdate with Lua Docs and the SquidGodDev channel, wich are pretty good.
Imagine a character who has to aim 360 degrees around him. To aim it uses a crosshair that rotates around it, again, 360 degrees. My goal is to be able to rotate that crosshair around the character with the crank. I've seen things like this in various games, so it shouldn't be too complicated, but as a beginner I'm having a hard time understanding it.
For this, I am considering two approaches, but I am failing on both.
The first would be to use the sprite of a crosshair as it is and somehow make it rotate around the character, here I still don't even know where to start.
The second would be to draw a kind of line from the center of the character and use the "setRotation" method to simulate the pointing. That for now I see it easier. However I'm having trouble drawing that line, as the gfx.sprite.update() of the update method in main.lua seems to run later than the update() method of the class representing the player. Which is making it impossible for me to draw the line.