jilonor reacted to fillmoreb in sprite rotation. Get updated position?
The sprite's position never actually changes, which is why you don't get a change in the coordinates. If you want the apparent position of the planet use something like this:
apparent_x = x + Math.cos(rotation)*orbit_radius*scale;
apparent_y = y + Math.sin(rotation)*orbit_radius*scale;
EDIT: Needing to multiply by scale depends on whether you want scale to affect the orbit radius or not. That's probably obvious, I just wanted to clarify.
jilonor reacted to megmut in Question around structure to order states
My advice, would be to have a single game state, then a map class, which deals with dynamic generation which extends area classes. This way, each area can have it's own update loop and other over riding methods.
Using seperate states is possible, but using ECMA6 (ES6) you won't have to use require.js.
Hope this helps!