WARPING

10
Nov
2012

You all must have played some 2D games on your computer or on your TV where the character exits from one side of the screen (say left) and emerges from the other side of the screen (say right). This is what I've tried to accomplish in this demo. Although the structure of the code is such that it allows only one particular body to warp but you all can easily modify the code to allow all bodies or some particular bodies to warp. Just go through the code and comment or reply if you've any problem.

Here's the demo.



Throw the body using your mouse.

By administrator at 12:53:31 AM 3 Comment(s)

Comments

Lets say you have no gravity, can you warp vertically as well?
By Evertith on 14 Nov, 2012 at 07:58:42 AM
I think it is possible. Just change the 'x' coordinate with the 'y' ones. But I think there will be some problem at the corners and some code will be required to handle such cases.
By administrator on 14 Nov, 2012 at 10:44:36 PM
What I mean to say is that when there is warping simultaneously in both horizontal and vertical direction the normal code won't be able to handle the warping.
By administrator on 14 Nov, 2012 at 10:47:10 PM

Add a Comment

Please enter the email address.Invalid format. (Won't be Displayed)
Notify me of followup comments
Enter the displayed Code: captcha