Jump to content

  • Log In with Google      Sign In   
  • Create Account

Rotating Images


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
2 replies to this topic

#1 Captacha   Members   -  Reputation: 141

Like
0Likes
Like

Posted 05 March 2012 - 02:54 PM

I'm making a physics game and I need to have rotated images for each of the objects in the game. Any way to make a script in gimp that rotates the images 1 degree and then saves them?

Sponsor:

#2 Telastyn   Crossbones+   -  Reputation: 3730

Like
0Likes
Like

Posted 05 March 2012 - 03:02 PM

That seems like an awful lot of images when the game should be able to directly render the image slightly rotated...

#3 Servant of the Lord   Crossbones+   -  Reputation: 21008

Like
0Likes
Like

Posted 05 March 2012 - 04:01 PM

As Telastyn mentioned, for every one image in your game (of which you'll probably have over a hundred), you'd have to create 360 copies of it, each slightly rotated. That's alot of wasted memory.

Pick an API that can just draw a single image rotated in whatever way it wants. Most hardware accelerated 2D or 3D APIs can do this.

If your API of choice can't do that, then for games you really only need to do one image per every 15 degrees or rotation, or perhaps even less (every 22.5 degrees or something).

Every 1 degree = 360 images for every one image you want to rotate.
15 degrees = 24 images for every one image you want to rotate.
22.5 degrees = 16 images
45 degrees = 8 images
It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]





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