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

Randomizer that gradually speeds up

Archive: 8 posts


Hey guys,

So, say I have 3 light bulbs. Yellow, red and blue. I want the following to happen:


A randomly picked bulb lights up
It turns off


I would like the process to repeat itself, but I want to make it so the cycle speeds up as time passes, at least the "light up" step of the cycle. Did that make sense? I hope it did. So, how does I randomizer? Thanks!
2010-11-29 21:07:00

Author:
aer0blue
Posts: 1603


Do you need for the timings to be randomised at all, or just to be at predetermined intervals that get gradually smaller?2010-11-29 21:10:00

Author:
rtm223
Posts: 6497


The latter. 2010-11-29 21:14:00

Author:
aer0blue
Posts: 1603


I think all that you's have to do is hook up multiple randomizers at progressively smaller intervals along a sequencer. This is just judging from what I read about the sequencer.2010-11-29 21:16:00

Author:
Scifiguy
Posts: 95


Do you want the light bulb to stay on until the next one is turned on or do you want it to turn on and off after a small delay?

Assuming you want this gradual getting faster to be within a fixed timeframe, to trigger your randomizer you could have a timer to represent your time inbetween randomizer ticks at max speed, and have it reset itself on output as well as override the randomizer.

Set the input type of the timer to speed scale and use another timer to output to this, this'll be your "Get fast over T time" timer, where T will be the time value of this timer. I think as this timer gets bigger the other timer will become faster and faster.
2010-11-29 21:17:00

Author:
Foofles
Posts: 2278


I think all that you's have to do is hook up multiple randomizers at progressively smaller intervals along a sequencer. This is just judging from what I read about the sequencer.

I thought about that, but I need the process to happen a few dozen times. If I do this, it means I'll need a -lot- of randomizers...lol. I should have mentioned this on the original post. Sorry.
2010-11-29 21:18:00

Author:
aer0blue
Posts: 1603


I'd adjust the timing using either a counter, or a timer, to give a reference value that you will time up to. In either case it should start at 100% and count / time downwards

Then have a timer that is used to time the actual intervals. It should be left to time upwards until it reaches the same value as in the reference device. Detect this using a comparator (see section 3.2) (http://www.lbpcentral.com/forums/entry.php?2130-Analogue-Logic-3-DAC-amp-ADC), that will trigger the randomiser using a 1-shot and then reset the main timer.

The reference device can be controlled in any way you want, if using a counter, you can use the comparator to decrement each time the randomiser is triggered, or you can control it from some other source.
2010-11-29 21:21:00

Author:
rtm223
Posts: 6497


Thanks for the help, everyone! I appreciate it.

Foofles' solution works great. :]
2010-11-29 21:33:00

Author:
aer0blue
Posts: 1603


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.