Archived

This topic is now archived and is closed to further replies.

Bitmap Rotation or Seperate Bitmaps

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

I have been making progress and have my tiles down and showing properly. What I would like to do now is have a turret like object that will follow the player. Is there a way to take a bitmap and rotate it to the proper angle to "point" to the player or should I use seperate pre-rendered bitmaps showing the turret at different angles? This is all 2D directX stuff. If rotating is do-able, what is the function? If individual bitmaps are the way to go, how many pre-rendered angles should I have to make the movement smooth and accurate?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
In all honesty seperate bitmaps produces a much nicer rotation than any of the implementations of true rotation that I''ve seen.

As for "what is the function" there is none. You have to write your own function which takes an image and rotates it then blits the rotated pixels at the correct location. IE alot of work for something that often doesn''t look too good.

Share this post


Link to post
Share on other sites
If you are using DirectX 8 or above, there is an interface called ID3DXSprite that functions for 2D graphics. It also supports rotation and scaling.


- master_ball

----------------------------
We R 138

Share this post


Link to post
Share on other sites