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] Zooming Circle Transition / Death Circle

Author
Message
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 25th Feb 2008 15:53
I believe this is DBC-compatable but with my limited knowledge of DBC I'm not sure.

These functions will create and animate a circle that zooms in on one point on the screen, like the "The End" sequence in many old Warner Bros. Cartoons. It's pretty hard to explain, so just download the attached image and try it out.

Special thanks to Tiresius who came up with this method here.

Notes:
Make sure to download the attached media before running the program.
InitiateDCircle() must be called before ShrinkDCircle(Rate,X,Y) because it creates all the sprites that are needed.
InitiateDCircle() can also be used to reset the circle.
ShrinkDCircle(Rate,X,Y) must be called each loop or the circle will not continue to shrink.
- Rate is how fast the circle closes. I find 10 or 15 is a good value.
- X and Y are the X and Y positions the circle closes on.
- The command will return a 1 when the circle is as small as it will go, otherwise 0 is returned.



Questions, comments, concerns?


Powered by Box2D Physics. Thanks Diggsey!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-22 12:57:41
Your offset time is: 2024-11-22 12:57:41