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

Simple Makeshift Randomizer

Archive: 6 posts


So I'm sure you're aware that the randomizer isn't actually all that random. This got really annoying for me when in a race level I wanted to randomize the tracks you played but instead kept ending up with the same sequences. I put together this very simple solution for achieving the effect I wanted and while it doesn't have all the functions an actual randomizer has, it does simulate a random event pretty well as long as you don't have too many variables.

The setup:

http://img685.imageshack.us/img685/7162/img0268bl.jpg

It's pretty self explanatory, the item on the left is a timer set to 0.1 seconds with the output feeding into the reset as well as the first selector's cycle input. As the timer runs it cycles through each of the four selector outputs which in turn trigger the same outputs on the second selector. When you want to activate a random event simply flip the two toggles like so:

http://img850.imageshack.us/img850/4508/img0269u.jpg

The red circuit board turns off and so the second selector is stuck on one output, while the blue circuit board is turned on thus allowing this output's signal to be transmitted. Flipping the toggles back turns off the selection and allows another 'random' choice to be made.

I'm aware this is incredibly simple but I couldn't find anything related to a homemade randomizer in here so I thought I'd post and maybe help some people with an alternate solution to using an actual randomizer as there have been a fair few topics about them in the Help forum.

As an example, I had this setup running as soon as the players spawned. The players then choose the amount of points they want to play up 'til and that is when I triggered this randomizer. It will seem random because the cycle time is so short (0.4 seconds in this example) and that in conjunction with the fact time elapsed from the level starting to when a player selects the points total will differ tremendously among people. And this is why a larger number of events will cause the system to look less random because the cycle time is increased.

You could expand on this very easily to try and replicate other features the real randomizer has in its tweak menu too. Hope this is useful to at least someone.
2011-11-07 19:17:00

Author:
Xaif
Posts: 365


i've heard that emitting randomizers is the answer, but it's only hearsay2011-11-07 22:53:00

Author:
GribbleGrunger
Posts: 3910


A lower thermo (and lower latency) solution from another post (https://lbpcentral.lbp-hub.com/index.php?t=62722-repetitive-randomizers-ruining-randomness&p=944257&viewfull=1#post944257)...


Looks as if the seed is set to the internal level clock value when the level starts. In both "On/Off" or "Override Pattern" mode, you always get the same pattern regardless of when the Randomizer is triggered.

[...]

...something like this would work...

http://i9.lbp.me/img/ft/d998389e1e6c4a2f659d6042cbb1cb66673b950b.png

...that is you get the randomizer (in "Override Pattern" mode) to continually generate its pseudorandom pattern, and only sample the value when you need it. As long as there's some entropy in the sampling time, you'll get a different pattern every time.

...which uses n+4 components, rather than your 2n+7, such that 'n' is the desired number of possible outputs.
2011-11-09 17:39:00

Author:
Aya042
Posts: 2870


Aya: in order to make it even more thermo-efficient, I think it would be better to place nodes from the randomizer into a second micro chip and then toggle that on and off when you need it. You know, the simple chip-and switch, rather than using 4 and switches. I just feel like this would use less thermo.2011-11-12 18:05:00

Author:
dr_murk
Posts: 239


where is the second condition to the AND gate coming from?2011-11-13 05:20:00

Author:
GribbleGrunger
Posts: 3910


Aya: in order to make it even more thermo-efficient, I think it would be better to place nodes from the randomizer into a second micro chip and then toggle that on and off when you need it. You know, the simple chip-and switch, rather than using 4 and switches. I just feel like this would use less thermo.

Not tested, but I figured 4 nodes and one microchip would use more than 4 AND gates. You probably also incur a frame of latency if you use a microchip enable.



where is the second condition to the AND gate coming from?

Well, from whatever you want to trigger it to select a new random output.
2011-11-13 21:01:00

Author:
Aya042
Posts: 2870


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.