Tutorial 1.2 - Coordinating a Landslide
For this tutorial, we are going to be exploring some basic networking using Permanent Switches and a Timer. This is a very simple concept, but it's a step in the right direction to understanding how logic networks can be used in your future LittleBigPlanet creations. Also, we will working a bit with the corner editor tool. While this is not specifically related to the purposes of this Logic Series, it's a great tool to have at your disposal. Let's get started...
Our aim is to simulate a simple rockslide, which will be triggered by the player. We will be building with the physics paused, unless otherwise stated.
First, we are going to map out the area for the mini-puzzle. For this part, we can turn the small grid on. Get out a material (we chose cardboard for simplicity - this can always be changed at a later time), and make a single-layer-thick background to the whole area. Bigger is better, as it's easier to cut down excess material than it is too add more material. Then create a double-layer-thick "play area" as shown above. You can add the start gate now or later. Specifics are not terribly important.
We don't want our level moving around on us, so we can either glue it to the floor or attach a little piece of Dark Matter out of view somewhere. We choose dark matter because it allows us to move the whole section if desired, without having to detach if from the floor. Also, we could suspend the whole area above the floor and attach Dark Matter in this way. Just place a little piece and glue it to the level. You have two independent areas, so be sure they are both glued down.
Here, we have added a little obstacle for the player, namely a gap that is too far to jump across. If you are unsure about the size, drop into the level and test it out.
Here, we have added the upper portion of the play area. This will eventually be the hill/mountain that the rockslide will originate from. To give you an idea of the direction we are heading, the rockslide will fill the gap, allowing the player to cross.
Now, we get to experiment with using the corner editor tool! First, turn OFF grid mode, and then navigate to your corner editor tool, found in the tools section of your popit. Play around with making your edges a bit jagged, trying to simulate the look of a mountain-type atmosphere. Remember that we can make vertices (points) by clicking on the edge of the shape where there is not already a vertex (point). Deleting vertices is as simple as selecting a vertex and pressing triangle.
Avoid the temptation to carve out the shapes using other materials - using the corner editor is good habit to get into. Eventually, you will become more efficient, both in terms of time and in terms of visuals.
Repeat this for the hill/mountain that we created earlier, to give it the desired look. We can begin to visualize some rocks rolling down this cliff to clog the hole. If you don't see it yet, you will...
Again, we will use our corner editor tool; this time to create some rocks/boulders. Place down some simple squares of rock material and start to shape them into boulders. Here we can see how adding some random edges really adds to the believability of the boulders.
Repeat this to make as many blocks as you desire. We made 3, but you would do fine with only 2 or with more than 3.
Now, we will start placing the newly created boulders on our mountain. Copying, flipping, and rotating them is nice way to create some randomization, so it doesn't look little the same few boulders.
Here comes the first little tricky part of the tutorial. We must create a little strip of dissolve, attached to a strip of Dark Matter above.
We will then attach some rods to the boulders on one end, and to the dissolve on the other end.
The rockslide will happen in two stages, so we make a few little smaller rocks and attach them to their own dissolve/Dark Matter strips (see below). Be sure to make the rods stiff once you place them. If the rods are not stiffened, the boulders will flop down and lose all the nice alignment of your boulders.
Here we can see the separate dissolve and Dark Matter strips. Again, ensure your rods are stiffened. Once this is done, move your little boulders to rest right in front of the Big boulders [not pictured]. To move the Dissolve, Dark Matter, and boulders as one object, you can box-select them by "clicking and dragging" with your selection tool.
Before we go any further, we need to make sure that our boulders will fall into the hole as they are supposed to. To test this, we will drop a button at the start of the level. Connect this button to the dissolve of each boulder set above...
Unpause. You should observe that your boulders do move about, which is good. If they do move, ensure that all your rods are stiffened. Have a step on the button and observe what happens. If they all fall correctly into the hole, Nice Job! Our design, unfortunately didn't pan out perfectly. This is fine! We just need to do a few tweaks. Rewind.
Now, we can box select all our boulders, resize, and tweak them. Additionally, we can reshape the mountain and terrain to try to achieve optimal results.
Once we feel like it might work better, we can place the rocks back against the side of the mountain. Here, we have also added a fire hazard to the bottom of the pit.
Test it by stepping on the button again. If everything fell all nice like in the picture, then we can move on. If not, go back up a few steps and continue tweaking until you get something working nicely. Rewind.
At this point, we can delete our button - we have no more use for it. We took this opportunity to add in a little camera to get an idea of the what you want the player to see when they approach the gap/cliff.
We don't want the player to trigger the landslide with some lame button, so we are going to make a plunger. Not that type of plunger! The kind used in old-school detonations. Click the spoiler below if you have no idea what we are talking about. Anyways, we can begin to construct a plunger by cutting out a few shapes shown here. The small grid is helpful for this type of thing.
Spoiler - What's a plunger?
Select the I-shaped piece and shrink it down slightly (by turning off the grid mode). Move it forward one layer, move it down, and drop it back one layer so that it fits nicely into the box-shaped piece. Turn the small grid back on and attach a spring between the two pieces as shown. Make sure you set the spring to stiff. Also, tweak its length to be much longer than necessary and turn the strength down a bit. We want it to be all the way up by default, but want it easy for the Sackperson to push down on it.
On the plunger that we just made, we want to add a set of matching magnetic key and magnetic key switch. Tweak the radius of the magnetic key switch so the key is just out of range. Leave the switch at the default setting of On/Off.
Unpause and hop onto your plunger. You should be able to easily push the magnetic key down to the magnetic key switch. Return to pause mode when you are satisfied with your plunger.
Now, we get to start adding in some logic. For this tutorial, we will need a few Permanent Switches and a Timer (Delay Switch). Each of these can be found in the Beginner Logic Vault under the PSN LogicPack. Go copy the level and capture them if you haven't already.
We first want to change the left Permanent (PERM) Switch to directional. Then, we will wire this PERM switch to the piston on the Timer. If we unpause temporarily, we should observe that nothing happens. This is good. Pause.
We want to set up the logic network so that the plunger we just made triggers the PERM switches. To do this, we will wire the magnetic key switch on the plunger to the dissolve component of each of the PERM switches. What would happen now if we were to step on the plunger is each of the PERM switches would have the key on their dissolve disappear, thereby triggering each PERM switch. We will hold off on testing until later.
Now we will place down a little speaker for the 'explosion' sound. We want pushing down on the plunger to simulate an explosion, so this makes sense. Make sure the right PERM switch is set to On/Off. Wire this PERM switch to the speaker and to the dissolve chunk holding up your smaller rocks above [not pictured].
Finally, make sure the magnetic key switch in your Timer is set to On/Off and wire it to the dissolve chunk holding up your big boulders above. Set the timing of the piston in the Timer to about 2 seconds. Play around with this timing once we are finished until it is tweaked to your liking.
Here, we should see that each of our dissolve chunks holding up the rocks/boulders has a wire to it. Again, the right PERM switch should be wired to the smaller chunk, and the Timer should be wired to the larger chunk.
We are technically finished with this simple logic network. The goal here is to set up a little scene after stepping on the plunger. Initially, the small rocks will fall, and then a few second later, the big rocks will fall. Everything is now in place for this to happen. Save and play you level to test it out.
Feel free to go in and add some details and a scoreboard. We added a little sign and a cover for our plunger. Most people will move their logic off-screen somewhere so the player can't see it. This is entirely up to you.
We explore other variations of landslides (in lesser detail of course) later in tutorial [3.2] Creating a Chase Scene. It's much more advanced, but if you feel comfortable, check it out! As always, if you have any questions, feel free to ask.
Results 1 to 1 of 1
- Join Date
- Nov 2009
Tutorial 1.2 - Coordinating a Landslide
Last edited by Logic Pack; 11-05-2009 at 01:53 AM.
AresSmith, Binarynova, Chaos Industries, CheesyMcFly,
coyote_blue•, Dexist, dragonember, Emogotsaone, Hirnpilot, huntedstorm, iGotFancyPants, moonwire•, NinjaLukeI, Ragfell, RangerZero, Rapidkirby3k, Schwem00, Struanmcd, Theap Pleman, The_king_waffle, tomodon246, v0rtex•, VelcroJonze, VeRsioNs_Z, Vilael, W0Wbaggr, yeldar2097