Treas

09-28-2009, 12:15 PM

Here's quite an in-depth tutorial on how to create randomzers I wrote a while ago. I thought some of you might find it useful, as quite a few people asked me how I randomized my survival challenges. So, here's the guide:

Most randomizers out there aren't really random, in fact! I call them "pickers" - they pick one of a set of possibilities at any given time. When you let them pick magnetic keys at a set pattern, however (and every pattern is set, even if you add 4 pistons with different speeds or the like), the sequence of magnetic keys may be a random one, but it will be THE SAME whenever you replay your level (and start the pickers at the same moment as before).

Therefore, one must conclude that pickers create one random switch activation pattern, which will then be fix, thus not being random in a sense of being different each time you start it up.

Note: The physics engine of LBP doesn't work 100% accurate. This means that even the not-really-random randomizers might in fact deliver different results from time to time. But, for the sake of doing it right (and saving thermo space, as my method is quite thermo-friendly), let's explain how to create a real randomizer:

I ended up contrifing one saying: "The most random element of each level is the player". Therefore, randomness must, directly or indirectly, be achieved through tracking a player's movement. Now my main method, which comes to use in most of my survival challenges (H 4 Heartbreak, S 4 Stylebreak, SackCrush 3000, Sacksquash, Jungle Drums, Bubble Caves (http://www.lbpcentral.com/forums/showthread.php?t=17010)) is what I call the "Random Heart".

This little machine consists of a thin square of dark matter, 3 circles of cardboard, a magnetic key and any amount of magnetic switches.

Here's how to build it (to simplify things, I added fix sizes. Of course, you can always change the size if you want or need to. The unit used in the description is "MGS", which does not mean metal gear solid, mut "medium grid squares".)

First, place a square of Dark matter (backmost thin layer) with a size of 14x14 MGS.

Next, place a circle of cardboard (backmost thick layer) of 12x12 MGS, centered on the dark matter square. Connect the two using a motorbolt.Let it turn clockwise at a speed of 10.

Next step, place another circle of cardboard (thin layer on top of the first cardboard circle) of 6x6 MGS. The top point of it has to overlap the top point of the greater circle, the lowest point of it must touch the motor bolt of it. In other words: Center it on the top half of the first cardboard circle. Then, connect the two circles using a motor bolt centered on the new circle. Set the speed to 8 and let it turn counter-clockwise.

Next, place another cardboard circle (middle thick layer) of 3x3 MGS centered in the top half of the last circle. Add another motorbolt, speed 6, clockwise.

You should now have a piece of dark matter and 3 circles on top of it, one attached to each other, spinning 'round like crazy.

Ok, so what we gonna do now? Add a magnetic key to the top point of the smallest circle. Depending on how fast each motorbolt turns, this key can now move freely around the whole dark matter area (or at least within the 12x12 MGS of the first circle)

Next step: Attach magnetic switches to the dark matter, wherever you want. I prefer placing them in the corners, without any particular reason. Set the radius so that they cover the whole area where the magnetic key can move. Set them to speed. I recommend adding one magnetic switch for each differend "picker" you've got for your level.

Here comes the magic: Place 3 proximity sensors at random places in your level. Set the radius of each sensor so that all cover the whole playing area of your challenge. Set them to speed and connect each to one of the 3 motor bolts of your "Random Heart". Now, depending on where the player(s) stand at any given moment in the challenge, the speed of the motorbolts will change, the magnetic key will follow another path, and the speed of all pickers will be changed every single second, granting total randomness.

Well, if you could get a player to move EXACTLY, and i really mean exactly, like he did in the last round, then it would'nt be random anymore. But I guess there's noone out there who could achieve such precise movement.

Well, here it is. My great secret to total randomness, now enjoyable by every interested user. I hope though, that this little tutorial might bring you guys away from "BOMB SURVIVAL #39048 OMFG!!!", and deliver us some delicious and original survival challenges!

- Treas.

Most randomizers out there aren't really random, in fact! I call them "pickers" - they pick one of a set of possibilities at any given time. When you let them pick magnetic keys at a set pattern, however (and every pattern is set, even if you add 4 pistons with different speeds or the like), the sequence of magnetic keys may be a random one, but it will be THE SAME whenever you replay your level (and start the pickers at the same moment as before).

Therefore, one must conclude that pickers create one random switch activation pattern, which will then be fix, thus not being random in a sense of being different each time you start it up.

Note: The physics engine of LBP doesn't work 100% accurate. This means that even the not-really-random randomizers might in fact deliver different results from time to time. But, for the sake of doing it right (and saving thermo space, as my method is quite thermo-friendly), let's explain how to create a real randomizer:

I ended up contrifing one saying: "The most random element of each level is the player". Therefore, randomness must, directly or indirectly, be achieved through tracking a player's movement. Now my main method, which comes to use in most of my survival challenges (H 4 Heartbreak, S 4 Stylebreak, SackCrush 3000, Sacksquash, Jungle Drums, Bubble Caves (http://www.lbpcentral.com/forums/showthread.php?t=17010)) is what I call the "Random Heart".

This little machine consists of a thin square of dark matter, 3 circles of cardboard, a magnetic key and any amount of magnetic switches.

Here's how to build it (to simplify things, I added fix sizes. Of course, you can always change the size if you want or need to. The unit used in the description is "MGS", which does not mean metal gear solid, mut "medium grid squares".)

First, place a square of Dark matter (backmost thin layer) with a size of 14x14 MGS.

Next, place a circle of cardboard (backmost thick layer) of 12x12 MGS, centered on the dark matter square. Connect the two using a motorbolt.Let it turn clockwise at a speed of 10.

Next step, place another circle of cardboard (thin layer on top of the first cardboard circle) of 6x6 MGS. The top point of it has to overlap the top point of the greater circle, the lowest point of it must touch the motor bolt of it. In other words: Center it on the top half of the first cardboard circle. Then, connect the two circles using a motor bolt centered on the new circle. Set the speed to 8 and let it turn counter-clockwise.

Next, place another cardboard circle (middle thick layer) of 3x3 MGS centered in the top half of the last circle. Add another motorbolt, speed 6, clockwise.

You should now have a piece of dark matter and 3 circles on top of it, one attached to each other, spinning 'round like crazy.

Ok, so what we gonna do now? Add a magnetic key to the top point of the smallest circle. Depending on how fast each motorbolt turns, this key can now move freely around the whole dark matter area (or at least within the 12x12 MGS of the first circle)

Next step: Attach magnetic switches to the dark matter, wherever you want. I prefer placing them in the corners, without any particular reason. Set the radius so that they cover the whole area where the magnetic key can move. Set them to speed. I recommend adding one magnetic switch for each differend "picker" you've got for your level.

Here comes the magic: Place 3 proximity sensors at random places in your level. Set the radius of each sensor so that all cover the whole playing area of your challenge. Set them to speed and connect each to one of the 3 motor bolts of your "Random Heart". Now, depending on where the player(s) stand at any given moment in the challenge, the speed of the motorbolts will change, the magnetic key will follow another path, and the speed of all pickers will be changed every single second, granting total randomness.

Well, if you could get a player to move EXACTLY, and i really mean exactly, like he did in the last round, then it would'nt be random anymore. But I guess there's noone out there who could achieve such precise movement.

Well, here it is. My great secret to total randomness, now enjoyable by every interested user. I hope though, that this little tutorial might bring you guys away from "BOMB SURVIVAL #39048 OMFG!!!", and deliver us some delicious and original survival challenges!

- Treas.