Jump to content
  • Advertisement
Sign in to follow this  
xhh

Pygame - 2D world rotation?

This topic is 2095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!