How to make loops

How do I make loops and how do I make my player use it

1 Like

Use a timer and make it repeat forever. Of course you can always stop it with the reset input.

For animations you can enable “loop animation” in the animation behavior’s properties.

So you couldn’t figure this out yourself? :tongue:

I want to say they are referring to Sonic the Hedgehog loops, since they posted about Sonic games in several topics. We do not even have hills or diagonal blocks. Flowlab is a very Mario style game builder. To make a Sonic engine in a Mario game, would require weeks of hard effort and bug testing, as well as an extensive amount of knowledge on code logic, because you’re going to be basically creating gravity from scratch, in flowlab.

I do however have a few slippery slope hill examples, because making hills is more or less as simple as having a ton of tiny blocks, and Lego putting them together to make pixel stairs, instead of using 32x32 pixel blocks. The size of your character will slide right over the tiny blocks, if you’re a circle or capsule shape.

In this example, all of the hills are made of blue pixels and green blocks, with non-solid diagonal blocks placed on top of them, on layer 2. This hides the skeleton of the level on layer 1. Using a level skeleton will allow you to use blocks as textures, instead of as physical hard blocks, so you can have mini hills, like a Yoshi’s Island game.
http://www.flowlab.io/game/play/290014

wait what, that wasn’t clear :angry:

Listen I think I know what he is talking about

But is it possible to make loops?

[spoiler] It’s possible… but it really isn’t easy. I haven’t even attempted it myself, so I can’t make a tutorial for it. I just know it is possible. Flowlab is basically the same as coding, so if someone has done it in a 2D game before, I could probably recreate it. It would take me hours to figure out, though, and it wouldn’t be easy to explain, but basically a loop consists of 7 blocks, this will look bad, but imagine this is the loop

/--------\
l . . . … l
\_____/

If all the blocks are solid, you can’t go inside the loop, so bottom left \ would have to disable when player proximity is to the left, so you can walk through it, and bottom right / would have to enable when player is left, so you can step on it. The opposite is true if you’re coming from the right side.

To go up the loop, touching bottom right / would velocity up right and rotate 45, wall right l would rotate another 45 and velocity up even more, top right \ velocity up left 45, top does only up and 45 rotation, top left / 45 velocity hard left but no up velocity, left wall l does 45 and is only left velocity so you can fall, then bottom left \ is another 45 and no velocity, the floor _ is rotation 0 or something like that.

It’s easier to explain saying rotate 45, but in reality, a circle has 360, so do the math for each 45 and have each wall set the right number, don’t just add 45 or you’ll spin around.

Having a spinball animation or spindash animation while going around the loop means you won’t have to worry about doing any rotations, because nobody can tell from the spinning.

Touching bottom left or bottom right when they are enabled sets a timer to disable them, or whatever you want to trigger them, so you can get out of the circle. By the time you complete the loop, the bottom \ or / will be disabled so you can go on through. You could work some math magic with proximity to trigger it, but I don’t expect you to. As for all the velocity that goes in the walls and corners of the loop, they have to be opposite, if you come the opposite direction.

I’m sure some of the veteran flowlab users would get the gist of what I’m saying ,but basically, you’re going to be fighting gravity for each angle as you go upsidedown. I’d personally create a skeleton map with angles and walls, so my entire map can have movements like a loop, based on my speed. I don’t expect you to understand my explanation, but like I said, it is possible, it’s just extremely complicated to build an antigravity hills simulator in a Mario engine. [/spoiler]

Don’t worry I think I will be able to get it to work if I read it while I make it thx

well I can’t do it I need a picture tutorial sorry

@“Mhx Ar” come on bro please help me

@nkbulider Mhx has a life of his own outside of flowlab. Please be very patient. If he can, he might help you, but not if you try to force/rush him.

I can’t help because
A.) I don’t own a windows computer anymore, since it crashed, I use them at a friend’s or family member’s house until I buy a new one. I am building a Linux though.

B.) I’ve never done it, so idk how. I just suggested a theoretical concept idea.

C.) I’d need to spend days testing it, and I don’t have days of free time. I barely have any free time.

sorry I was in a bad mood my dad got sent to the docter