Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Tutorials
#1

How to make a Sonic the Hedgehog looping

Archive: 32 posts


O hai there! SonicKris here.

http://if.lbp.me/img/ft/5bf4c0768c51639257c5c53f674f56fc43cbaf6e.jpg

If you have been around in Little Big Planet for a while you can no longer deny that Sonic the Hedgehog seems to be a very popular theme in community levels. Whether you love it yourself or not, let's agree that the one thing worse than a Sonic level is a badly made Sonic level. So here is my contribution to a better Little Big Sonic community!


The hero

Let's start out with Sonic himself, a sackbot that I dressed up in the Sonic outfit DLC.

http://i3.lbp.me/img/ft/fa3696e86366ecc311fb3153959d2507378dff31.jpg

The basics are a block of 0% brightness holo with an invisible controlinator on it, set to transmit; then a sackbot that is not afraid to jump, skip layers and can make quite a speed for himself (150%). Plug the first chip on his board and stick two controlinators (DCS) on it. Here we will decide what default sackbot functionality we want to keep and which to discard; the left controlinator is set to receive the signal from the seat on the holo block and needs to not override sackbot behavior. The controlinator on the right is a plain one. All the behavior we wish to keep, we hook the output from the controls on the left DCS to the input of the controls on the right DCS. In the screenshot our Sonic will be able to move with the left stick and to jump with the X button.

There is also a blue tag 'sonic' on the left DCS that gets activated by the Active output on the DCS. The DCS on the holo block follows this tag with a follower (activated by its own Active output).

http://ib.lbp.me/img/ft/d4b64f873647be0b62a322be9994ee445e5df4b3.jpg

Now we add a chip. With this, Sonic will be able to sprint when the player keeps the R1 button pressed. However, since none of this is default sackbot behavior, it needs to determine which direction it needs to sprint in. We do that by adding another receiving DCS of which we wire the left stick's horizontal output to a directional splitter. Wire the outputs of this splitter to the inputs of a 2-gate selector. This selector will remember the last horizontal direction of the player.

Next we create two basic movers, one set to a positive value on the horizontal axis for moving to the right and one with a negative value for moving to the left. Set both movers to local space so the direction is determined by the orientation of the sackbot instead of the global horizontal plain. I have set the movers to 75% acceleration and deceleration so Sonic won't instantly get up to speed. Before we activate any of these movers, though, there are a few conditions that need to be met, so we set up an AND gate in front of each mover:

The R1 button needs to be pressed; for this, wire the R1 output of that DCS to the inputs of both AND gates.
The player needs to be on the ground before this ability can be used; wire an impact sensor (tagged 'ground&apos to the AND gates.
Which mover gets activated should depend on the last direction of the player, so wire the outputs of the selector to each AND gate.

Don't set the speed of the movers too high, else the bot can splat itself against walls or run past crucial bits without triggering them (which we get to in a moment). The movers here were set to 18 and -18 speed.


The looping

http://i0.lbp.me/img/ft/dc0c8ffdb127e897dd85524716d67605c50bcb11.jpg

Create a shape as in the picture: a road leading up to the looping followed by half a loop. Tag this with 'ground', then duplicate it to the layer directly behind it and mirror it so both shapes line up and make a perfect looping. If you can, use the corner editing tool to make the half-circles as smooth as possible so Sonic will have less trouble crossing the ramps.

http://if.lbp.me/img/ft/b2f5a221c00a82f59adab4177f266f9fe7faecc5.jpg

We'll want several things happening here, so create a square of thin 0% brightness holo and place it in between the two looping parts. Place a chip on it in the exact center of the loop.

Place a game camera on this chip with a large sensitivity area and a zoomed out angle, so the player can see the entire loop when he enters it with his Sonic bot.
Place a tag sensor for 'sonic' on the chip that has a sensitivity radius the size of the looping, plus a fair bit (5-10) extra. Tag sensors are not ultra precise, you see.
The tag sensor activates a tag 'inLoop'. SonicBot will detect that tag so he can do some nice logic tricks while inside the loop.
The tag sensor also activates a danger tweaker set to plasma (no sound). This will turn the thin holo into dangerous material, but the sackbot will never be able to touch it; instead, this will prevent the bot from jumping between the two thick layers that make up the looping.

This last bullet point brings us to the next important bit: cut a hole in the thin holo piece at the top of the looping; this is where Sonic will be changing layers back and forth when taking on this looping.

http://i6.lbp.me/img/ft/0560634e54b1635afe011b077bce65928024bc6a.jpg

Now, create another block of 0% bright holo, this time two layers thick, and place it through the hole in the thin holo shape. Stick a chip on it and place an impact sensor for tag 'sonic' on each of the looping pieces.

We want Sonic to be able to run in both directions of the looping, so this requires our logic to determine on which of the two looping pieces Sonic currently is and when entering the 'gateway' holo block he needs to be pushed from one layer to the other, either forward or backward. Create two 3-port AND gates, stick an impact sensor for tag 'sonic' on the chip and wire that to both AND gates. Remember to set 'include touching' on this sensor to ON, because that is required on holo material. Then wire each of the impact sensors from the looping pieces to its respective AND gate.

With what we have now, the following would happen: Sonic runs into the 'gateway' block and gets transferred from one layer to the other, only to be launched back and then forth again in an endless loop. What we need to do is to make sure Sonic has left the gateway block before he can access it again. So create a 1-shot counter with a NOT gate in front of it and wire the impact sensor to that gate. Wire this counter to both AND gates. Now, each AND gate will only be active if Sonic has first not been inside the gateway block; however, once he is in it, it needs to be used once and then disabled. So wire the output of both AND gates to an OR gate and wire that to the reset input of the counter.

Wire each AND gate to its own tag. I named them 'pushBack' (top) and 'pushForward' (bottom). SonicBot will pick these up and move his prickly bum accordingly.

http://i2.lbp.me/img/ft/722d476795b7597560731b84ad6a59f0b433ef2d.jpg

Here we added another chip on SonicBot with two long range tag sensors, each wired to a layer mover. Sensor 'pushBack' activates the mover that send the bot back one layer, sensor 'pushForward' send Sonic forward one layer.


Complications

Everything works now. Or does it? We have a slight complication: when Sonic speeds up to take on the looping he slams into the curving floor and stops dead in his tracks. He might even kill himself from the impact. So, how do we make this a smooth ride?

http://i1.lbp.me/img/ft/261a05da802c4538b6d79feca072c699393968d2.jpg

Remember the tag 'inLoop' in the center of the looping? We'll be using look-at rotators now in order to make the bot stay on the circular path we have created and not dive mouth first into the dirt. Though a single rotator improves Sonic's behavior a lot, what is even better is that we use two rotators; one for each direction Sonic is following, slightly angled so the bot anticipates the curving floor surface and not slam into it.

We use the same setup as with the the Sprint chip: a receiving DCS wired to a directional splitter wired to a 2-gate selector. We'll be having two AND gates in front of two look-at rotators; I turned the top rotator 10 degrees to the right and the bottom one 10 degrees to the left. An impact sensor for tag 'ground' makes sure this behavior only occurs when the bot touches the ground. A tag sensor for tag 'inloop' (large radius) makes sure that the bot only tries to turn to this tag when it is actually active (else the look-at rotators will not find a target and lock the bot's angle).

http://ic.lbp.me/img/ft/34cfc087304beffa68b594a42a650c8f84de0b15.jpg

As Sonic runs into the looping and back out, for a short moment he will still turn his body towards the center of the loop. We can avoid this by adding an inverted tag sensor for tag 'loopBase' wired to each AND gate.

http://i9.lbp.me/img/ft/379cb32c349852252443da94cd6ee3afb5207e21.jpg

Stick this tag 'loopBase' roughly at both entrances/exits of the looping. When Sonic runs through here, the look-at rotators will get disabled.

http://id.lbp.me/img/ft/cbd0802fabae1b26c85dffc7fe4d132c64c5c467.jpg

Lastly, we wire the 'ground' impact sensor to a NOT gate and wire this gate to a gyroscope; this gyroscope will turn Sonic straight up again when he jumps or falls down. I set the gyro to 180 speed and 50% acceleration so the effect is not instant.

http://ic.lbp.me/img/ft/8bc6cf0f4d2a6ef57d6ff404115c54fc0926e1c7.jpg

Here you are! Enjoy your Sonic the Hedgehog looping!! You can find this thing in action (http://lbp.me/v/9nfy9s) on my earth.

Good luck.
2012-01-28 20:53:00

Author:
Antikris
Posts: 1340


looks cool, i'll go check out how it plays on your earth.
hm while Sonic may be my all time fave character and series... i can honestly say i've not played a even remotely good sonic level on LBP.

also i've been thinking of for a long while now of making my own super detailed Sonic tutorial... but not yet. but look forward to it later.
though i'm not sure why so many people want to do loop logic for sonic. Sonic levels/games don't have to have them. but i don't create 1.1 remakes of games. so means if i would make a sonic level i would make 100% new zones. *mew

Ok. posting again sense I just looked at it. it works ok... i can even fall if i stop running half way up it and that's nice IMO. however i noticed his feet stop working once he goes up the loop. and that would need to be fixed somehow IMO before i think someone should use it. *mew
2012-01-28 21:38:00

Author:
Lord-Dreamerz
Posts: 4261


however i noticed his feet stop working once he goes up the loop. and that would need to be fixed somehow IMO before i think someone should use it. *mew

Above a certain speed a sackbot will no longer use his legs. I could cut down on the speed but that would be un-Sonic. In the Sonic games, the character will display a whirlwind of feet peddling around when he starts to race. That is something that I think goes beyond the topic of this tutorial (it is already long enough), but if anyone feels they want to follow up with a how-to on Sonic feet, go right ahead; here in the comments or in a thread of its own.
2012-01-28 21:50:00

Author:
Antikris
Posts: 1340


Above a certain speed a sackbot will no longer use his legs.

I noticed on flat ground they work fine. i put a mover speed of 50 before on my sonic bot and his feet still worked. have you tried mixing your loop logic with a Attract-o-tweaker? i don't have a loop logic right now so i can't say or not that may fix it. *mew
2012-01-28 21:55:00

Author:
Lord-Dreamerz
Posts: 4261


I noticed on flat ground they work fine. i put a mover speed of 50 before on my sonic bot and his feet still worked. have you tried mixing your loop logic with a Attract-o-tweaker? i don't have a loop logic right now so i can't say or not that may fix it. *mew

Actually, I started out with attract-o-tweakers but removed them when (I thought) they didn't make a difference. I'll give them a try and see if that helps.
2012-01-28 22:01:00

Author:
Antikris
Posts: 1340


^ oh i forgot something since it has been awhile last i messed with my bot. when using movers their feet only keep working when at fast speeds if you also input a signal in to the left stick on the DCS inside their head that makes them try to run. so you need both movers and try to make the bot run to make it's feet keep working at high speeds~ *mew2012-01-28 22:12:00

Author:
Lord-Dreamerz
Posts: 4261


That looks amazing. The layer shift is barely noticeable

And I never imagined the logic for a loop would get this complex.
2012-01-28 22:24:00

Author:
SnipySev
Posts: 2452


Or you could just use the Attract-O-Gel tweaker, and just make it make certain loop parts attractable when moving at a certain speed...2012-01-29 19:06:00

Author:
Nitranon77
Posts: 127


Or you could just use the Attract-O-Gel tweaker, and just make it make certain loop parts attractable when moving at a certain speed...

I did that at first, but there are a few details that made it obsolete:

1. The speed of the bot is limited to 150% walking speed. Any faster and one has to use movers, which lead to complications described above and suddenly no longer require the AoT.

2. The controls of a bot are based on the global X/Y plain when in attract mode. What I want for Sonic, though, is to be able to sprint straight on without having to turn stick. Also, Sonic can only overcome these obstacles when in sprint mode.

3. If only an AoT on a looping shape, that wouldn't be worth much of a tutorial. I am surprised the community hasn't been flooded yet by Sonic levels that use AoT's everywhere...
2012-01-29 20:41:00

Author:
Antikris
Posts: 1340


I am surprised the community hasn't been flooded yet by Sonic levels that use AoT's everywhere...
Don't worry, it won't be long now.

Also, I imagine there is potential with the AoT. Like mentioned, speed sensor on the bot, certain speed requirement for the AoT. It might not be perfect, but it sure is easy to make (afaik, I don't even have the pack )

EDIT: And wow, another tutorial so soon?! Must say my favourite is still Rambo though.
2012-01-30 06:53:00

Author:
SSTAGG1
Posts: 1136


Like mentioned, speed sensor on the bot, certain speed requirement for the AoT.

It was exactly that what I did and it made no impact whatsoever due to the lateral movers for the sprinting. The AoT also didn't fix the smashing into floor trouble, so right before writing up this tutorial I removed the AoT's and sighed that it had just become a 'normal' tutorial.

2012-01-30 07:03:00

Author:
Antikris
Posts: 1340


It was exactly that what I did and it made no impact whatsoever due to the lateral movers for the sprinting. The AoT also didn't fix the smashing into floor trouble, so right before writing up this tutorial I removed the AoT's and sighed that it had just become a 'normal' tutorial.


Perhaps there's some workaround that will allow a sackbot to stick to surfaces while moving using a mover. Or perhaps there's more to the AoT.

I was thinking of make a little local gravity system that would get the bot to just follow a hologram around the map. Orient the bot by spinning the system. Potentially any speed and any direction. I wonder how that would react when it collides with a material. Would the bot appear to walk while on to the material in the gravity field or just continue floating? Or would it work at all....?

I really should get that pack...
2012-01-30 07:13:00

Author:
SSTAGG1
Posts: 1136


^hm... interesting. i'll go try to make that.2012-01-30 07:18:00

Author:
Lord-Dreamerz
Posts: 4261


I did that at first, but there are a few details that made it obsolete:

1. The speed of the bot is limited to 150% walking speed. Any faster and one has to use movers, which lead to complications described above and suddenly no longer require the AoT.

2. The controls of a bot are based on the global X/Y plain when in attract mode. What I want for Sonic, though, is to be able to sprint straight on without having to turn stick. Also, Sonic can only overcome these obstacles when in sprint mode.

3. If only an AoT on a looping shape, that wouldn't be worth much of a tutorial. I am surprised the community hasn't been flooded yet by Sonic levels that use AoT's everywhere...
Well, I don't have the material yet, but the turning the stick with the movement problem is only minor- not serious. Now, I know how to make Sonic and the loop know when to activate when Sonics going horizontal and vertical, and i'm pretty sure that it will work. But, as i said before, I don't have it- YET, but once I do, i'll show it in a level.
2012-01-30 23:35:00

Author:
Nitranon77
Posts: 127


I played this and left a comment. I love the design immensely, but it would be lovely if you could include a prize bubble. Of course my intention would be the reverse engineer your device so I can create one for myself. Sometimes I happen to learn better by playing around the the object itself. Again, I would really appreciate a prize bubble.

Thanks.
2012-01-31 00:17:00

Author:
synchronizer
Posts: 287


Or you could just use the Attract-O-Gel tweaker, and just make it make certain loop parts attractable when moving at a certain speed...

I tried this, but it doesn't really work. As kris mentioned, sonic smashes onto the loop. He just flings back with attract-o
2012-02-04 19:41:00

Author:
megaextremist
Posts: 221


I tried this, but it doesn't really work. As kris mentioned, sonic smashes onto the loop. He just flings back with attract-o

Look at my recent post. I see what you mean, but when I get the pack and the gel, we'll see...
2012-02-04 21:34:00

Author:
Nitranon77
Posts: 127


Finally bought the pack, made it the way I thought of it to be, and its working juuuust fine.2012-02-06 21:51:00

Author:
Nitranon77
Posts: 127


Finally bought the pack, made it the way I thought of it to be, and its working juuuust fine.

Yeah, at 150% walking speed.
2012-02-07 00:27:00

Author:
Antikris
Posts: 1340


Yeah, at 150% walking speed.

Tested it all speeds, I've made a chip on my bot that senses what speed the bots going, and if its at the assigned speed the atrracters will go. If you go slower, simply change the needed speed to activate the sensors to tell the loop to start attracting. I'll make the level so you can understand. Btw, I've made a way to auto-mate it.
2012-02-08 22:49:00

Author:
Nitranon77
Posts: 127


Tested it all speeds, I've made a chip on my bot that senses what speed the bots going, and if its at the assigned speed the atrracters will go. If you go slower, simply change the needed speed to activate the sensors to tell the loop to start attracting. I'll make the level so you can understand. Btw, I've made a way to auto-mate it.

I made that in the tutorial above as well, before I noticed it didn't add anything because I wanted Sonic to exceed 150% walking speed; that can only be done with movers, which will lead to Sonic slamming into the looping, stopping dead in his tracks or literally dying in his tracks.

Regardless, I had a all-directions motion sensor stuck to Sonic wired to a tag 'speed'. On each of the looping parts I had a tag sensor for it (set to signal strength) leading to a positional sequencer. At the speed - sequencer position - I wanted the looping parts to start attracting, I spanned a battery on the sequencer canvas; wired that to an attract-o-tweaker and voila.

If you decide that Sonic should walk the looping on normal run speeds, then this may still be useful. However, as soon as you decide he should be able to move quicker than 150% walking speed, you will have to start using a mover and once you are using an active mover, gravity is suspended on the object and attraction to a surface no longer applies (nor effectively curves the object's trajectory).
2012-02-09 10:36:00

Author:
Antikris
Posts: 1340


I made that in the tutorial above as well, before I noticed it didn't add anything because I wanted Sonic to exceed 150% walking speed; that can only be done with movers, which will lead to Sonic slamming into the looping, stopping dead in his tracks or literally dying in his tracks.

Regardless, I had a all-directions motion sensor stuck to Sonic wired to a tag 'speed'. On each of the looping parts I had a tag sensor for it (set to signal strength) leading to a positional sequencer. At the speed - sequencer position - I wanted the looping parts to start attracting, I spanned a battery on the sequencer canvas; wired that to an attract-o-tweaker and voila.

If you decide that Sonic should walk the looping on normal run speeds, then this may still be useful. However, as soon as you decide he should be able to move quicker than 150% walking speed, you will have to start using a mover and once you are using an active mover, gravity is suspended on the object and attraction to a surface no longer applies (nor effectively curves the object's trajectory).

Well, In my opinion, 150% walking speed is fine. I know its kinda slow but hey, Attract-o-tweakers are the easiest way without having a bunch of complex tags and logic just to run one loop. Your way is good, but I'm more of a simple kind of guy. If its possible to make something the easy way I will, but if its not, i'll do it the complex way.

I think the auto-mated way is the best way to go, without having to move the analog stick with the curves. There IS a few problems where the auto-mation with glitch if the player jumps at the triggering point where the animation occurs or when the player goes back to the beginning, but It cab be fixed various ways. You can also add a camera to add a dramatic effect to it, but its optional. Anyways, thats all I wanted to point out, no hard feelings.
2012-02-11 00:21:00

Author:
Nitranon77
Posts: 127


TThe AoT Loop requires a small amount of logic. Just a controllinator set to receive to make sure the player is holding the stick. Mange a speed sensor to get technical.2013-04-06 16:02:00

Author:
TheNeoFelicity
Posts: 2


This sounds fun. I love Sonic, so I'll check this out.2013-04-06 17:36:00

Author:
amoney1999
Posts: 1202


If this thread is at all active anymore, I beg of anyone who has managed to make this infernal loop to PLEASE make it a prize. I have wasted my ENTIRE stinking day following this tutorial by the letter and yet my sackbot continues to flail helplessly against the side of the loop rather than running smoothly around it. Much as I would love to make a level incorporating this trick, I'm completely at my wits' end. Somebody please have the kindness of heart to help me out here!2013-09-13 04:15:00

Author:
FractiousLemon
Posts: 14


So, once again, I am asking for help. Someone actually sent me the loop a year or so back and my profile got corrupted a month or so later and I completely lost it. Hooray. Again, if anybody out there actually has this stupid thing, it would be wonderful if they could send it to me because I still can't seem to manage it.2016-07-04 02:36:00

Author:
FractiousLemon
Posts: 14


Hi FractiousLemon,

I don't have the logic for this movement of Sonic, but if I find some time, I will try out this tutorial and maybe there'll be any useful result!

Many greetings, Jürgen^^
2016-07-04 08:25:00

Author:
CuriousSack
Posts: 3981


Hi FractiousLemon,

I don't have the logic for this movement of Sonic, but if I find some time, I will try out this tutorial and maybe there'll be any useful result!

Many greetings, Jürgen^^

You are the most wonderful person ever.
2016-07-04 12:53:00

Author:
FractiousLemon
Posts: 14


Hi FractiousLemon,

today I've tried to rebuild the Sonic and its logic using the tutorial of above! But I must have made a little mistake, cause the speed running didn't function. I will have to find this mistake first! I will contact you as soon as I have a functioning result!

Many greetings, Jürgen^^
2016-07-06 18:14:00

Author:
CuriousSack
Posts: 3981


Hi FractiousLemon,

today I've tried to rebuild the Sonic and its logic using the tutorial of above! But I must have made a little mistake, cause the speed running didn't function. I will have to find this mistake first! I will contact you as soon as I have a functioning result!

Many greetings, Jürgen^^
Thanks, Jürgen. You're a pal. I think it's safe to say this thing needs to be made into a free prize so nobody else has this problem afterward! Haha!
2016-07-08 02:25:00

Author:
FractiousLemon
Posts: 14


Still no luck, I take it. I fear this shall forever remain a mystery to the LittleBigPlanet community! Or at least until Sony finally shuts all the servers down.2016-07-16 04:03:00

Author:
FractiousLemon
Posts: 14


I still haven't given up, there must be a solution! 2016-07-16 07:08:00

Author:
CuriousSack
Posts: 3981


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.