Jump to content
  • Advertisement
Sign in to follow this  
ontheheap

SDL Asteroids -- Ship Rotation?

This topic is 5408 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

What is the most common way to rotate a ship (the graphical portion, not the math =) in SDL? I don't want to use rotozoom, but besides that or using a sprite sheet I can't think of anything else. Are those my only options or is there another way?

Share this post


Link to post
Share on other sites
Advertisement
Well if you're using OGL/SDL you could rotate the quad right? So that's an option unless you don't have OGL implemented. Otherwise rotozoom and sprite sheets are the only things I can think of as well. The tradeoffs are negligble I think. Rotozoom will take up more processor power, but a sprite sheet will take up more memory. I guess the only advantage to using rotozoom is that you could modify the ship's turn rate more precisely than if you used a sprite sheet. To simulate sluggish or over-reactive movement, for example. A sprite sheet would become jerky the more you slowed down the rate of animation.

Although perhaps in the case of tweaking the rotation speed, you could combine the use of a sprite sheet and rotozoom. Hmmmm....

Share this post


Link to post
Share on other sites
Sprite sheet would have correct lighting (say, coming from the topright no matter what the ships orientation) and probably better antialias than rotozoom.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!