Sign in to follow this  
GPX

Implementing the sonic loop concept

Recommended Posts

Well, I really want a sonic loop in my game :-) Just to make things clear - I'm talking about the way sonic can run through a loop after gaining enough speed, or fall off it if he isn't fast enough. I can't figure out a good way to approach this problem, and looking for a solution on the internet produced no helpful results. I couldn't find any open-source sonic ports either (funny how there are tens of super-mario ports, probably since it's much easier to create). Any ideas/links? Thanks ahead.

Share this post


Link to post
Share on other sites
I don't know if you ever noticed, but while you're in one of those loops, the game will not respond to commands (like a jump, or pressing the reverse direction). So it's probably a simple check that Sonic's speed exceeds some threshold, and not some complicated physics involving centrifugal force and gravity. Also, the loops were all the same size, which supports this hypothesis.

If you want to figure that part out, you'd stay on a loop if you could go fast enough that the centrifugal force (really, it's the normal force exerted by the loop) exceeds gravity.

Share this post


Link to post
Share on other sites
I don't know about the original sonic, but this: http://www.ebaumsworld.com/sonic.html version has it working properly...
In fact, looking at the problem again, the loop itself is just an instance of my bigger problem - interacting with inclined surfaces.
I figured one way to go about is to build the loop (or any other surface) from several straight lines, each affecting the characer with its normal force once they collide. But there's probably a "cleaner" solution to this problem, I don't like the idea of applying a collision detection test to each part of the loop...

Share this post


Link to post
Share on other sites
In the correct polar coordinates, the surface of a loop is a strait line.

Of course, gravity behaves wierdly, and speed generates force, but at least you have a strait line to run along. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by GPX
I don't know about the original sonic, but this: http://www.ebaumsworld.com/sonic.html version has it working properly...
In fact, looking at the problem again, the loop itself is just an instance of my bigger problem - interacting with inclined surfaces.
I figured one way to go about is to build the loop (or any other surface) from several straight lines, each affecting the characer with its normal force once they collide. But there's probably a "cleaner" solution to this problem, I don't like the idea of applying a collision detection test to each part of the loop...


Like the fact that the normal force always points toward the center of the loop (assuming the loop is a circle)?

Share this post


Link to post
Share on other sites
Quote:
Original post by NotAYakk
In the correct polar coordinates, the surface of a loop is a strait line.

Of course, gravity behaves wierdly, and speed generates force, but at least you have a strait line to run along. :)


That sounds like an interesting idea - playing with the coordinates.
Care to go into more detail?

BTW, sorry for the latency, I have access to my computer only during the weekends :\

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this