Jump to content

  • Log In with Google      Sign In   
  • Create Account

Pygame - 2D world rotation?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 xhh   Members   -  Reputation: 130

Like
0Likes
Like

Posted 21 September 2012 - 08:24 PM

Hi, I'm creating a 2D platformer game using Pygame. I [sort of] know how to move the world around the player as if the screen was following him. What I need to do now is rotate the entire world around him. I've done this in Game Maker using view_angle, but I'm not exactly sure how to do this using Pygame.
I have one idea for solving this: I was thinking of rotating the image of all the game objects and moving their position using circular motion where the radius of the circle is the distance from the player. If this sounds good, then how would I go about doing circular motion?

Thanks in advance for any helpful replies.

Sponsor:

#2 kd7tck   Members   -  Reputation: 719

Like
-1Likes
Like

Posted 21 September 2012 - 09:30 PM

I have never used pygame before, but in SDL I would simply rotate the world textures. I'm not certain how much SDL and pygame have in common so don't take me literally.

NOTE: Make sure to keep all textures seperate, poll all non player textures and rotate each one around a common axis.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS