Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Rotate Sprite

Author
Message
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 15th May 2007 01:44


This slowly rotates sprites so they can be used in pixelperfect collision. I posted this in the 2d forum when I remembered nobody EVER looks there.

Your signature has been deleted by a moderator because this joke is getting old.
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 15th May 2007 02:53
Found BUg
If you use a non square sprite it messes up.

Your signature has been deleted by a moderator because this joke is getting old.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th May 2007 21:47
So what difference is there from just using "rotate sprite"?
And why did you make 2 separate threads? (2D chat)


aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 15th May 2007 23:58
the difference is that it'll work for pixel perfect collision.

Your signature has been deleted by a moderator because this joke is getting old.
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 16th May 2007 02:00


It works near perfect now, but it doesn't quite center.
New media too!

Your signature has been deleted by a moderator because this joke is getting old.

Attachments

Login to view attachments
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 16th May 2007 10:35 Edited at: 16th May 2007 10:36
I don't understand your claim of pixel perfect collision. This example does nothing of the sort.

I certainly appreciate your effort here. But you have to understand what is going on with this. It runs at 6 fps for me and I have a 3.2 ghz system with 1gb of ram and an ATI Radeon 9600 pro card. You're doing a load of pointless 2D operations every single loop. All that happens is the huge PNG image slowly rotates, and it is set to Sync Rate 0.

The Rotate Sprite command will do what you want without all of that. Plus, DBP sprites are extremely fast. If you want pixel perfect sprite collisions, there are examples on the forum that show you how.


Come see the WIP!

Login to post a reply

Server time is: 2024-11-22 18:49:17
Your offset time is: 2024-11-22 18:49:17