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

Randomizing a 3x3 set of tiles

Archive: 5 posts


I am developing a level in which I need to emit a set of 9 unique square tiles in a 3x3 pattern upon input (switch, button, etc). I only need the set to emit only once, but I need them in a random order with no repeated tiles (i.e. 1 2 3; 4 5 6; 7 8 9 -> 3 5 9; 8 2 1; 6 7 4). I have struggled with this tyring out different options with randomizers, selectors, and xor gates, but to no avail. If anyone has an idea or has done something like this in their levels, any advice or help given would be much appreciated.2013-03-18 01:11:00

Author:
getyourwings5
Posts: 35


It's late and I'm quite tired just now. I can help, but forgive me if I make a mistake.
Randomisers generate their pattern when the level loads or when they are Emitted into existance, so I'm going to give you a setup that involves emitting your randomiser and all that jazz.

What I would do is, place a Microchip down and inside, a Tag Sensor and a Tag. Invert the Sensor.
Label the Tag Sensor 'Tile' and the Tag 'TileSlot-Empty'.
Place this Microchip in the 9 Tile locations. Use your Grid and keep the Microchip in the centre of where the Tile goes.

Next, place a square of Hologram or Sticker Panel and make it invisible.
On this, place a Microchip.
Inside, a Follower Mover, set to follow the Tag 'TileSlot-Empty'.
Next, a Tag Sensor looking for TileSlot-Empty. Wire the Tag Sensor into a Timer set to count up to 0.2 or 0.3 then reset. Wire the Timer into a Randomiser set to 'Add' or whatever the setting is called. I dunno I'm tired.
Wire the Randomiser into 9 Emitters. One for each of your Tiles. Make sure your Tiles emitt in the centre of the hologram and that the Microchip itself is in the middle.

Lastly, ensure your Tiles have the Tag 'Tile' on them.

Now, capture the Hologram and emitt that when you want your random tile pattern to spawn. Try to use some form of player-input to trigger the emitter to ensure that it emitts at different timestamps.

So, what happens is, player triggers Tile Placer to spawn. Tile Placer moves to nearest empty Tile Slot, spawns Tile. TileSlot-Empty Tag switches off as each Tile appears on top of it. Tile Placer fills in all slots then that should be the job done.

I hope this helps you. I can't be assed writing anymo
2013-03-18 01:34:00

Author:
Ostler5000
Posts: 1017


wow I really do not know how to put this in easy to read terms. I have provided a randomizing logic chip in a level I made http://lbp.me/v/g3gmwr. I think u have to score 150,000 to get it.

Also, try this. Randomizer set to 9 emitters, set the randomizer to add up. You might have troubles with timing though. In this case I would just emit. the randomizer every round or such and it destroys itself when all 9 pieces are on the board.

Now on to tile placement. This will require followers and getting familiar with logik precedence. to hide the movement of the tiles use sticker panel and keep it 100% dimmed till all 9 peices are settled in there place. (Ostlers idea of moving the emitter seems more sound since u can limit the area of effect of the follower, this will help in overlapping game pieces)

I am currently completly swamped but feel free to send me a request on psn and we can work it together. In my head it seems like I could perfrom a 3 x 3 in say 20 to 40 minutes.

Also, Ostler did a fantastic job above.
2013-03-19 02:04:00

Author:
L-I-M-I
Posts: 611


I tried the setup you suggested, Ostler, but I still can't seem to get it to work. The follower cube moves in between two of the microchips and rapidly goes between the two and nothing is emitted.

I probably should preface what I am trying to do a bit better. I am making a slider puzzle. So, I really only need 8 tiles and the blank spot will be open for the adjacent tiles to slide into. I am wanting to include a rest switch so that the 8 tiles will blow-up/disappear/whatever and be be replaced by another 8 in random order. I eventually want to increase this to a 4x4 (15 tiles) and a 5x5 (24 tiles). Since the puzzle will be timed, I need the tiles to emit rather rapidly.

I'm confused as to why the tiles don't emit from the follower block. The technique sounds like it should work, but if it doesn't emit, the follower will just get stuck. Perhaps it is moving too fast?
2013-03-24 01:17:00

Author:
getyourwings5
Posts: 35


Your Tags shouldn't be switching off when the Follower reaches them, so ensure you haven't accidentally got your slots deactiving their tag just for the Tile Placer rather than the Tiles themselves.

Failing that, it's a common issue I've found with Followers and multiple Tags. It's like the Follower gets to a Tag, then doesn't register it when it's directly on top if another Tag is too close. Weird.
A workaround is...
Create a 2-port Selector. Wire Output 2 into Input 1.
Copy paste your Mover so you have 2. Wire each Selector input into one Mover.
Keep the upper one as it is, but give the lower one a much smaller detection range. Let's say... 5.
Now, place a Tag Sensor looking for the same Tag as your Follower Movers and give it the same radius as the lower Mover - 5. Wire it into the lower Selector input.
What this does is, it gives the smaller range Mover priority when the object is close to a Tag. When no Tag is nearby, the large radius Mover is used.
2013-03-24 02:06:00

Author:
Ostler5000
Posts: 1017


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.