Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
randomizing objects emitted
Archive: 13 posts
Ok, I have a square where i want to emit marbles. I want these marbles to be randomly selected from one of four emitters that I have. That part is easy enough. Where I am running into trouble is I also want them to be randomly placed. The issue is that on the final level I will need around 100 of them. This means that it just doesn't make sense to lay out groups of four emitters on a grid and randomly select the ones I want. Emitting them one at a time would take too long even with the randomizer set to 0 on and 0 off. I would like a way to randomize this that is quick, and as easy as possible on the thermo. All ideas are welcome. thanks. | 2011-08-14 01:31:00 Author: tdarb Posts: 689 |
Do the emitters only emit one kind of marble? Because I have a setup that I could show you in a tutorial if you wanted :blush: I used it in my level called "Bouncepad roullette" to select a random port Just say and I can do you a tutorial for my YouTube ^- ^ | 2011-08-14 03:26:00 Author: AssassinatorRFC Posts: 715 |
Now that you mention it, I think I can get by with just one type of marble. I had four different colors, but I could probably just use neon and have the color randomly set between four options. The colors are really just for display variety anyway. I'll have to check out your level. It sounds like you are doing side scrolling where I am doing top down. I need all 100 emitted and on screen at the same time. | 2011-08-14 04:11:00 Author: tdarb Posts: 689 |
One thing that comes to mind... Use rotator wheels spread throughout the level. This will reduce the number of required emitters, which in turn will make the emitting smoother and less thermo-intensive... but it may not be 100 instantaneously... perhaps delayed up to 2.5 seconds or so to get the last of them out... Here's the breakdown as I imagine it... 1) Create a fairly large holo circle (0% brightness). 2) Add x Emitters onto it on "rings" going outward on the radius. 3) Add a rapid-spinning Rotator to the holo circle. http://i.imgur.com/I9gIM.jpg (example - unknown background image) You know your logic, as seen in other advice posts, so I know you get where I'm going! Maybe this is already an option you've explored, in which case I'm sorry to retread old territory. On the emitted marble (assuming you use only one), place a Tag. On each circle, have the Randomizer and Emitters turn OFF when a massive Tag Sensor covering the entire level reaches its overall count of 100 Tags (marbles). How I imagine it, all Emitters emit an Infinite number with Infinite duration at 0.0 seconds each, wired to Randomizers on each circle that lasts a minimum and maximum of 0.0 seconds. The circles spin, the marbles pop out... and when it all reaches 100 Tags the Tag Sensor turns off the Randomizers and Emitters and it all stops! Should work! It's not instant, but it's darn close. | 2011-08-14 13:51:00 Author: Unknown User |
That is one I was looking at. Still am. Using 10 emitters I think it can go down to .6 seconds which is acceptable. It seems the issue then becomes that, even though it is more random, everything will always be in a circular pattern. Even though the emitters would be randomized, they would still fire at regular intervals with the circle moving at a regular speed, and the emitters would still be at static positions along the radius of the circle. Any thoughts? I can deal with all that, but if I have somewhat of a pattern anyway, I may just use a system where I have all the emitters on a piece of holo. I then emit that piece of holo with a .1 second lifespan so it can populate the board with marbles. It's pretty instant, but completely static. Everything seems to have tradeoffs. There's got to be a way to do this. | 2011-08-14 18:00:00 Author: tdarb Posts: 689 |
A further solution, using Randomizers for Movers and Rotators on the holo, is to set the whole level in a holo bounding box (use collision tags; various tutorials on this, see Antikris for example) so the holo circles with the Emitters are constantly bouncing around within the boundaries. This gets rid of the circle effect but increases the chances of clumps of marbles in places and completely empty in other areas. | 2011-08-15 01:44:00 Author: Unknown User |
you just need to get out of my head lol. This is the other option i was looking at since I am using a bounding box already for controlling cursor movement. I think this may be the best of the current solutions since all of the marbles will be in motion once they are placed, and their movement will be random. I don't think clumping would be an issue. The only issue would be one of delay. I already have the chip made for randomizing direction of travel, It currently works so the speed stays relatively constant, but that can be removed. I'll need to test to see if the bounding works reliably at higher speeds, but I think this may be the best solution. 10 rapidly moving emitters that have random direction and speed, could work very well provided that they do not break through the bounding holo or make the level try to do too many things at once. | 2011-08-15 05:51:00 Author: tdarb Posts: 689 |
So I got an idea from another thread just now, someone posted about the electricity in Currant Affairs. How about you have the same setup within the area you want to emit the marbles - fill the entire area with a hologram track and have your emitters on their own pieces of holo moving around the track. Use a randomizer to select which ones you'd like to emit, this would solve the problem with the radial design above where it looked too circular. This is the video from the other thread: http://www.youtube.com/watch?v=ao0QoiXuW-k | 2011-08-15 12:24:00 Author: Xaif Posts: 365 |
This is pretty simple. Set up a chip. On it is a tag named "marbleSpot". Hook a small radius tag sensor that looks for tag "marbleCursor" to the reset of a 1-shot counter (which is set to 1/1, thus on). The counter keeps the tag marbleSpot active. Add another tag sensor - large radius - looking for tag "marbleReset" and connect that to the input of the counter. Now, duplicate this chip and stick it everywhere where you want a marble dropped. Now you make a cursor object, a piece of holo with a chip on it. Put a large radius tag sensor on it looking for tag "marbleSeed". It activates a 1-shot counter which in turn activates another microchip (which I name "go"). Add another large-radius tag sensor looking for tag "marbleSpot" and invert it. Hook that one to the reset input of the counter. On the cursor chip "go" you stick a fast follower that goes after tag "marbleSpot". Stick a tag "marbleCursor" next to it. Then add a very small radius (1) tag sensor looking for "marbleSpot" and connect that to your logic for emitting a random marble in the spot of the cursor. What will happen now, is when you activate a tag "marbleSeed", the cursor logic becomes active and starts hunting for tag "marbleSpot". When it arrives at such a tag, it will drop a random marble in that place. The chip beneath the cursor, on the grid, detects the cursor's tag "marbleCursor" and will deactivate its own tag "marbleSpot". The cursor in turn will go look for a new tag "marbleSpot" nearby, repeating the process until no more tags "marbleSpots" are found and it will disable the cursor logic. Then, if you activate a tag "marbleReset", all grid chips will reset and reactivate their "marbleSpot" tags. You can then fire off "marbleSeed" again and the whole process restarts. Good luck. EDIT: if you want to randomly create spots that are left open, you could drop a dedicated blank marble during the seeding phase that has logic on it to detect the end of the process (inverted large radius tag sensor looking for marbleSpot) and eliminates itself, creating a gap. If you would like to continuously emit random marbles in every spot when it becomes available, then skip the inverted marbleSpot sensor on the cursor, so it is active all the time (rather use a different tag sensor on it then to remotely disable the seeding during intermissions or at the end of a phase). You should then have the grid chips detect a marble, rather than a cursor, and deactivate their marbleSpot tag; then when the marble disappears, they reactivate marbleSpot (and the cursor will swiftly refill the spot). | 2011-08-15 15:35:00 Author: Antikris Posts: 1340 |
Mind blown! This is what you get when you have someone who knows principles of logic outside of LBP. Love it! | 2011-08-15 16:27:00 Author: Unknown User |
This is pretty simple. Set up a chip. On it is a tag named "marbleSpot". Hook a small radius tag sensor that looks for tag "marbleCursor" to the reset of a 1-shot counter (which is set to 1/1, thus on). The counter keeps the tag marbleSpot active. Add another tag sensor - large radius - looking for tag "marbleReset" and connect that to the input of the counter. Now, duplicate this chip and stick it everywhere where you want a marble dropped. . That's just it. I want the marbles to be dropped at random locations each time a level is started. This is a very efficient and interesting system for having constantly emitted objects randomly appear from the same spawn points during game play. It's really quite good. I'm already full of ideas for uses for it, but I need to populate a game board using randomly located spawn points before a level begins. For populating a board this is a much more complicated method of achieving I am doing currently where I emit the pattern of "MarbleSpots" on holo with a .1 second lifespan, and each spot immediately emits a marble. The entire board is populated in .13 seconds, but it is not random since, like your system above, all of the spots are statically placed. Your system would take over 6 seconds to populate the board assuming there is only one cursor, it takes only 1 frame for the cursor to move to each marblespot tag, and one frame for that to emit a marble. So that would be a minimum of two frames for each marble. If memory serves, that would be .066 seconds 100 times. Actual times could easily vary by a second or more. | 2011-08-16 03:18:00 Author: tdarb Posts: 689 |
In theory, if each marble is moving independently in random directions, isn't it okay to use your current system that donks out all 100 marbles at fixed spots in .13 seconds? They'll hit the ground running, so even if the player memorizes the locations, they won't be able to follow the same path to collect/shoot them. | 2011-08-16 05:17:00 Author: Unknown User |
Tdarb, you are right; it takes a while before a centralized system like this has walked over the entire board. The downside of a faster decentralized system, though, is that it is hard to update and quite a strain on resources as well (you have roughly 100 times more logic out than the centralized system). There is a middle ground, though. You can create a cursor object that emits objects on the grid that emit marbles of their own: a centralized system that creates a decentralized system. These objects can be based on one template which is easy to update. You can either have this cursor seed the grid with objects before play mode/publishing, or have that done right when the level starts (and you have a 7 second introduction or title screen of some kind as the grid fills). If you go that route however, and you are updating the marble templates, you will have to recapture these on the object template; this is a setup in which an emitted object emits other objects. When you change anything in the second tier, it will not automatically be updated in the emitter on the first tier. Recap it on that emitter and it will be okay again. | 2011-08-16 10:44:00 Author: Antikris Posts: 1340 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.