Sign in to follow this  
xhh

Pygame - 2D world rotation?

Recommended Posts

xhh    136
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. [b]What I need to do now is rotate the entire world around him[/b]. 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 [b]circular motion[/b]?

Thanks in advance for any helpful replies.

Share this post


Link to post
Share on other sites
kd7tck    735
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this