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

Random Level Sequence Generator Help

Archive: 7 posts


I've run across a real doozy here, so I thought I'd register and ask around for some advice on where to go from here.

First though, a little backstory: My brother and I share this PSN account, and he's a pretty decent creator. He's got us a ton of hearts, but I never made squat in LBP. So, when LBP2 came about, I wanted to put something together that I could look at and go "yeah, I made that!".

So, I started out with something simple, but somewhat ambitious - it's a sunset themed, parkour influence rooftop running survival challenge...

...with randomly generated rooftop sequences. Well, somewhat random - I've made 8 or so rooftops, and layed them in 8 pattern sequences of 4 different rooftops each. Each rooftop sequence can link up to the next one, so you won't be left with an impossible jump or anything. I also changed the gravity a bit to give it a cannabalt-like jump feel, and so far I'm pretty proud of it.

But, when the time came to get all the logic working, I hit a major wall. Right now, I've got a timer hooked up to a randomizer, which I want to randomly choose 1 of the 8 emitters I've set. Whichever emitter is chosen at the time the timer triggers the randomizer should emit the next sequence of rooftops, and then the timer/emitter/randomizer should turn off / reset until the timer starts it again.

The problem I'm running into is, I can't seem to get the randomizer to truly choose randomly, the emitter to drop one set of buildings and then stop, and for the next set of buildings to drop with the proper timing, even though I tested the times before rigging it all up, and I have them defined.

I guess my questions are :

How do I make the randomizer choose only one choice, then stop and wait for the next timer signal?
How do I make the emitters drop the building only once, then stop and wait for the next random choice?
How do I make it so the randomizer and emitter only trigger exactly when I need them to? (Say, like a 10 second interval between random choice & building drop?)

I'll be putting in a long night with this one, but if I don't figure it out I'd be much obliged to anyone who can help with any ideas or tips. I just want to publish something half decent and well thought out, without letting the obstacles keep pushing me away from finishing this thing.

Thanks!
2011-02-05 04:36:00

Author:
LucidMomentum
Posts: 8


I've been working on a similar emitting concept while working on my level, so here is what I've found; though I've yet to rework on the random generator bit of my level, just testing with selectors:

Emitters will only drop the object when there is space available to do so, so if all emitters are set to emit into the same space, then you'll only get one at a time.
I've been using tags on the emitted objects (which move) with a sensor further down to detect when it is suitable to emit the next object - i will couple this to the randomizer with an AND gate so that both have to be active before an object emits - this could solve your problems - the other thing to consider is the timing settings for your randomizer which I shall look at myself later tonight.
2011-02-05 05:08:00

Author:
Unknown User


I guess my questions are :

How do I make the randomizer choose only one choice, then stop and wait for the next timer signal?

Set the input action to "Override Pattern"

How do I make the emitters drop the building only once, then stop and wait for the next random choice?

Set the input action to : "One Shot"

How do I make it so the randomizer and emitter only trigger exactly when I need them to? (Say, like a 10 second interval between random choice & building drop?)

Use a timer with the output going into both the randomizer and the Reset of itself (the timer). Tweak the timer as needed.



You may additionally need to set your emitters with some initial velocity so they push the individually emitted sections closer together. I'm assuming you're using movers on the emitted set pieces?

I hope this helps. Sounds like a fun project.

EDIT: Also, see this (https://lbpcentral.lbp-hub.com/index.php?t=47197-Randomizers-not-actually-random). Apparently randomsizers are not actually random. Which really sucks.
2011-02-05 05:16:00

Author:
v0rtex
Posts: 1878


You may additionally need to set your emitters with some initial velocity so they push the individually emitted sections closer together. I'm assuming you're using movers on the emitted set pieces?

I hope this helps. Sounds like a fun project.

EDIT: Also, see this (https://lbpcentral.lbp-hub.com/index.php?t=47197-Randomizers-not-actually-random). Apparently randomsizers are not actually random. Which really sucks.

Yeah, I found out that the problem isn't the timing or anything per se - they were spot on. What was killing me was the thermometer - I guess I was overdrafting it by having it emit something at the same time something was disappearing, so the emitter wouldn't drop it.

I think I've found the culprit though - I had a few sequences of buildings that were very tall, with a lot of detail - you'd actually run through them, etc. But they were so large that if by any chance two sequences of rooftops that had those two buildings were on screen at once, the second one wouldn't emit. So, I guess I was a bit too ambitious :/

From what I got though, the randomizor actually worked pretty well - withing it's rigid constraints I'm going to try re-making my sequences without the large buildings, and to go from there and see if that solves it.

Also: dumb question, but does the size of the crater you place your level on in your moon influence how much thermometer you have? Maybe I'll just remake it on a bigger plot...

And no, I didn't use movers - I rigged up a ghetto conveyor belt with wheels and platforms - it works great though, but maybe if I remake the sequence platforms I'll try movers instead.
2011-02-05 06:46:00

Author:
LucidMomentum
Posts: 8


Update - I think the problem goes deeper than I originally though.

After looking at the setup, I noticed that it's not exactly the thermometer stopping the next sequence from emitting - it's the emitter/randomizer. When the randomizer chooses an emitter it just used before, the emitter won't emit the sequence again - even though I have the randomizer set to override, and the emitter set to one shot. Is there anyway to have the emitter go inactive right after the sequence is dropped, but before the next timer interval sets off the randomizer? I can't seem to find any reset options for the emitters...
2011-02-05 14:31:00

Author:
LucidMomentum
Posts: 8


Yeah the problem is that the emitter is set to One-Shot, so the same signal coming from the Randomizer doesn't register as another "shot". So here's what you can do:

Insert a set/reset switch (a counter set to one, with the output also going to it's reset input) between the randomizer and each emitter. That should cause it to receive a new signal (or "shot") each time, regardless if it's the same signal as the prior.

Hope this helps.
2011-02-05 19:23:00

Author:
v0rtex
Posts: 1878


Yeah the problem is that the emitter is set to One-Shot, so the same signal coming from the Randomizer doesn't register as another "shot". So here's what you can do:

Insert a set/reset switch (a counter set to one, with the output also going to it's reset input) between the randomizer and each emitter. That should cause it to receive a new signal (or "shot") each time, regardless if it's the same signal as the prior.

Hope this helps.

Yeah it did - but there were a few more problems to tackle.

Anyways, the fruits of my labor: (https://lbpcentral.lbp-hub.com/index.php?t=47918-Random-Sequence-Object-Emitter-Generator&p=763342)
2011-02-05 22:14:00

Author:
LucidMomentum
Posts: 8


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.