Implementing the sonic loop concept

Started by
4 comments, last by GPX 17 years, 7 months ago
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.
Yoni Levy.
Advertisement
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.
---New infokeeps brain running;must gas up!
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...
Yoni Levy.
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. :)
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)?
---New infokeeps brain running;must gas up!
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 :\
Yoni Levy.

This topic is closed to new replies.

Advertisement