Making a loop like Sonic possible?

Ok, another idea :blush: i’ve and want to know it’s possible to make a loop in gdevelop like in (old, 2d) game sonic?:thinking:
The player should follow the loop.

Also here applies: I only collect ideas!:wink:

I saw a fusion v2.5 video, with fusion it’s possible too.:roll_eyes:

Sorry, found this:

Could you please add my posting there?

1 Like

Hi! Maybe this could help if you are with the mood to apply the same principles in GDevelop:

Thanks, but I have already found this page in the past.
In what way should it help me (with gdevelop)?
I only need the “loop”-thing. Sensors are ok, see video below.

So you can get an idea:

There is a path… but that is probably not the same as pathfining in gdevelop?:thinking:

Oh come on guys.:roll_eyes:
Is it possible as in fusion 2.5 or not and if yes how?:confused:

If you are using platformer physics:
Try creating a series of slightly rotated platforms
When your player hitbox collides with those platforms rotate the player to match the platform angle - 90
Apply a force to the player hitbox at the same angle to push the player into that platform

If you are using simluation physics:

Did you see the video above?
Is there no easier way (like in the video)?

Now after i saw the car example file…
I don’t want to use tiles and rotate it (see video above!), i want to use a “perfect” loop/slope graphic and add a path for the player… if it’s psossible.

That path feature is pretty cool, I don’t know if GD has that particular feature? Just guessing here but you might be able to create a path by positioning platforms and changing the Slope Max angle

. Presumably, you’d make an hexagonal path out of the platforms in the same way to form the loop (this could be hidden and replaced with a circle picture). Probably would still need to mess with rotation of the character to get the desired effect. Now I don’t know if that will work but just a suggestion which might be worth trying (it may depend on you also suspending gravity during the loop). There are undoubtedly a number of ways you could achieve a similar effect but that path feature in the other program seems more straightforward than some of the ideas I can think of.

In this very basic example you can move an object in a circle using maths. If you can imagine the green square is Sonic, it’s moving in a circle loop. So this could be triggered in the same way as in the video, by using a trigger object, and speed of movement to trigger whether the character enters the circle loop or not. There are a number of other ways you could do the same effect but unfortunately I don’t think GD has that same Path Movement object or behavior as in Fusion so it wouldn’t be as straightforward or simple. I could be wrong though.

Thank you!

The math object does not run smoothly and has pixel errors.
Hmm, it would be nice if i can see the lopp graphics too.
So I can not quite understand the circular motion.
Looks like it is wobbling minimally.

It does not be the “same Path Movement” Tool.
But this could be a feature for a newer gdevelop version.:blush:

I have another idea for you to explore:

  1. Put a hidden sprite in the center of the loop called “looper”
  2. Determine some conditional like “Player is moving right and distance to loop is less than some amount”
  3. Use the “Put object around another object” to rotate the player object around the “looper” object
  4. Decrease the angle used above over time for count-clockwise effect
  5. Rotate the player sprite relative to the current angle

This should work pretty well (I use something close to this for my grappling hook logic)… the conditional to determine when to loop and the math to determine the initial angle is the hard part.

1 Like