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

Making difficulty gradually increase

Archive: 13 posts


I'm working on a shooter where I emit several different items to shoot. The camera stays in one place and different things come at you from all sides. I can't think of a way to start out easy and gradually increase the rate of emitting. Keep in mind that I want to keep it random, both the items being emitted and the location they are emitting from. Thanks in advance.2011-03-05 07:57:00

Author:
riverad08
Posts: 104


A quick solution would be the following:

Find a solid immovable surface (e.g. dark or light matter), create a square of any normal solid material next to it and attach the two with a piston. Set the expansion time of the piston to as high a number as you need to make it gradually increase. Lower numbers wil result in the difficulty increasing faster. Set the maximum length of the piston to whatever your heart desires, and place another block of dark or light matter at the maximum length position. Now, on block at the moving end of the piston, place a tag. On the immovable block at the maximum length position, place a tag sensor with the same colour/name as the tag you just placed. Set the sensor's output type to signal closeness and its trigger range to something that just barely reaches the tag when the piston is in its most retracted state.

Finally, hook the tag sensor up to any number of emitters you need, and set their behaviour to speed scale. This will make them emit faster the closer the tag is to the sensor. If you want randomized items, just make the emitter emit hologram blocks with a different kind of tag on them, and set the lifetime of them to 0.1 seconds. Now, attach a tag sensor with the same colour/name as these emitted tags to a randomizer set to override input.

Hope this helped.
2011-03-05 13:58:00

Author:
sny
Posts: 144


Cool, Thanks. I'll have to try that out. I'll have to mess with it to try and make it work for my level. Because this way only one item will emit at a time. If I want two at a time do I just set up two tags and sensors on the same blocks which activate two emiters which activate two randomizers?

I also want some items to be more likely to be emitted than others. How would I do this?

Is there a way to make the piston move slowly at first and then gradually move faster as time goes. So it stays easy for a longer while and as it gets harder it gets harder faster and faster. The reason I might want this is I'm trying to make the high scores more competitive, so most people who are pretty good will die at as close to the same place as possible right around the time when the difficulty gets insane. I also don't want somebody who is not very good to die right away. Keep it easy for them to have a decent length of play time.
2011-03-05 18:31:00

Author:
riverad08
Posts: 104


If I want two at a time do I just set up two tags and sensors on the same blocks which activate two emiters which activate two randomizers?

You got it.


I also want some items to be more likely to be emitted than others. How would I do this?

Put down some OR gates for the items you want to get picked by the randomizer with a better chance, and just wire up all its inputs with outputs from the randomizer. Then, just connect the output of the OR gates to the emitters. So if you want an item that gets picked with a 1/2 chance, one with 1/3 chance and one with 1/6 chance, use a 3-input OR gate for the first, a 2-input OR gate for the second and a straight wire from the randomizer for the third.


Is there a way to make the piston move slowly at first and then gradually move faster as time goes. So it stays easy for a longer while and as it gets harder it gets harder faster and faster. The reason I might want this is I'm trying to make the high scores more competitive, so most people who are pretty good will die at as close to the same place as possible right around the time when the difficulty gets insane. I also don't want somebody who is not very good to die right away. Keep it easy for them to have a decent length of play time.

You can make another piston that is the extension of the first piston, but gets activated only after the first piston has extended to a certain length. Just use another movable block and connect it with your previous one via this new piston. Have the new piston activate via a tag sensor which senses a tag along the way.
2011-03-05 20:13:00

Author:
sny
Posts: 144


Wow thanks. I'll try this out tonight.2011-03-05 20:54:00

Author:
riverad08
Posts: 104


A quick solution would be the following:

Find a solid immovable surface (e.g. dark or light matter), create a square of any normal solid material next to it and attach the two with a piston. Set the expansion time of the piston to as high a number as you need to make it gradually increase. Lower numbers wil result in the difficulty increasing faster. Set the maximum length of the piston to whatever your heart desires, and place another block of dark or light matter at the maximum length position. Now, on block at the moving end of the piston, place a tag. On the immovable block at the maximum length position, place a tag sensor with the same colour/name as the tag you just placed. Set the sensor's output type to signal closeness and its trigger range to something that just barely reaches the tag when the piston is in its most retracted state.


Couldn't you just use a timer instead? Keeping the emitters to speed scale, a timer should have the same effect, but would fit on a chip instead of using old LBP1 physics-based logic systems.
2011-03-05 21:25:00

Author:
xero
Posts: 2419


Couldn't you just use a timer instead? Keeping the emitters to speed scale, a timer should have the same effect, but would fit on a chip instead of using old LBP1 physics-based logic systems.

This.

I was about to mention that the proposed solution is quite a round about one considering the capabilities of the new logic tools.

Its a better idea to use 1 timer set to a really long time and input that into a second timer set to speed scale with a really low time, .1 or .2 or something, wired into its own reset. Place each of your emitters in a chip each. Or groups of emitters or however you want it setup. Plug the timers output into the on/off input on all of the chips. Next wire a randomizer into all of the actual emitters inputs and set it to a pretty quick 'one at a time' setting. You could instead have the second timer also going into the randomizer so the rate of alteration of which emmiters are triggering speeds up. Make sure the emitters are set to 1 shot also.

you could of course also use a score sensor as the 'long count' timer, inputting into the resetting timer so the difficulty increases as the player's score becomes higher.

Remember you can also add large step increases in difficulty by triggering seperate 'sets' of this logic off at certain score or time thresholds so the emissions overlap e.t.c.
2011-03-06 06:04:00

Author:
Epicurean Dreamer
Posts: 224


You can also use score sensors to disable the toughest weapons until the player reaches a certain milestone.2011-03-06 07:13:00

Author:
munrock2
Posts: 96


I was about to mention that the proposed solution is quite a round about one considering the capabilities of the new logic tools.

You're right of course, I was just reluctant to suggest an alternative I have not yet tried and tested myself (and therefore can't explain with certainty).

I'm unsure of how one can make the first timer speed up after a certain amount of points or time is reached, but surely there's a way to do that as well, other than two pistons one after the other.

To the OP: In terms of reliability, you should always go with xero's or Epicurean Dreamer's version. The solution involving pistons is not completely obsolete, though, since - as opposed to timers - it doesn't actually provide a linearly increasing signal, which may or may not be preferable, depending on the level.
2011-03-06 09:08:00

Author:
sny
Posts: 144


The solution involving pistons is not completely obsolete, though, since - as opposed to timers - it doesn't actually provide a linearly increasing signal, which may or may not be preferable, depending on the level.

Well... you can put batteries with different signal strengths on a sequencer, feed them through an or gate and into the timer input. That would vary the rate of increase and can be easily modified to alter the rates at any point.

Or, if you want a smoothly exponential increase, you can just wire a timer into a timer into your emitters, and have both the second timer and emitter's input setting configured to speed scale.
2011-03-06 10:17:00

Author:
munrock2
Posts: 96


Well... you can put batteries with different signal strengths on a sequencer, feed them through an or gate and into the timer input. That would vary the rate of increase and can be easily modified to alter the rates at any point.

Or, if you want a smoothly exponential increase, you can just wire a timer into a timer into your emitters, and have both the second timer and emitter's input setting configured to speed scale.

Yes, that could work as well, but my guess is that in terms of thermo efficiency, the piston would win for its particular acceleration/deceleration pattern. Other than that, they're both good solutions.
2011-03-06 12:22:00

Author:
sny
Posts: 144


I'm unsure of how one can make the first timer speed up after a certain amount of points or time is reached, but surely there's a way to do that as well, other than two pistons one after the other.

To the OP: In terms of reliability, you should always go with xero's or Epicurean Dreamer's version. The solution involving pistons is not completely obsolete, though, since - as opposed to timers - it doesn't actually provide a linearly increasing signal, which may or may not be preferable, depending on the level.

In regard to getting a timer to speed up after a certain amount of points has been reached, you can to a degree use the score sensor inputting into a sequencer set to possitional with batteries at specific analogue thresholds, but the speed at which the timer increases will 'hop' between the specific speeds, giving a jumpy style to the difficulty increase.

IMO a better way to do this would be to forgoe the sequencer alltogether and output the analogue signal from the score sensor straight into the 1st timer set to speed scale. That way, for example, if the score sensor was set to 500 points, when 250 points has been reached the score sensor would be outputting a 50% signal, making the timer increase at half its proposed time setting. ( 2 minutes would take 4 minutes to fill). That analogue signal could in turn be inputting into a second timer set to a much lower time, self resetting, and outputting into the actual emitters, NB: Make sure the emitters are set to 1 shot.

What this would do is make the self resetting timer at first fill up slowly due to the analogue signal coming from the longer count timer, (which had its own analogue signal output correspond to the score being collected by the players ability, better players would progress quicker) Don't think of the timers as temporal scales, think of them as dynamic analogue signal sources increasing the emission rate proportionately to the score.

You can have an arbitrary control over the overall rate of difficulty increase by how large you set the time in the initial timer, ergo how 'quickly' the repeating timer triggers emission once full analogue signal has been reached, also how long it would take for this threshold to have been reached, E.G. Setting the timer to 300 seconds will mean the maximum potential rate of difficulty increase will take 5 minutes to reach full difficulty, In turn that actual level of difficulty will be defined by how quickly you set the self resetting timer, setting this to 0.5 for example will mean once those 5 minutes have passed the emmiters will emit at 0.5 seconds, at 2.5 minutes, the emmiters will emit at 1 second, at 1.25 minutes, they will emit at 2 second intervals e.t.c. Though remember that this is within the ' maximum potential' rate increase, if the player were theoretically perfect at playing. What makes this interesting the the score sensor input into the long count timer: The 'actual' rate will be defined by how well the player is at collecting score, as the rate at which the long count timer increases will correspond to the analogue signal inputting into it from the score sensor. The quicker the player heads towards the score set on the score sensor will define how quickly the rate of difficulty increase will scale towards its maximum potential.

You're probably thinking "well i don't want all emitters to emit at each 'pulse' of the timer. I want it to be random"
With this setup this is also easy. Instead of inputting the timer into the emitters. Input them into AND gates and have a randomizer input into the other AND gate input. Plug these AND gates into the emmiters, 1 each, and plug the same long count timer we spoke of earlier into the randomizer, setting the randomizer to 'overide pattern'.

This will randomize which emmiters are triggered at each 'pulse' of the resetting timer, while increasing the rate of randomization as the difficulty increases, to a point at max difficulty the randomizer will be hopping so quickly between emitters, several of them will trigger, randomly, within each 'pulse' of the resetting timer. Where at first, the slower rate of randomization will mean less emitters will be triggered overall.

Extending this concept: taking this overall setup, you should see how it is possible to set steps of scaling difficulty when certain score thresholds (or time thresholds) have been reached, by using a selector or something similar to trigger different 'sets' of this logic network at specific thresholds. By using the digital out of the score sensor (which will trigger when the score has been reached) to start another of these sets into action, either overlapping the first 'set', or taking its place, with more difficult enemies, a larger veriety of enemies, an overall quicker rate of emission, so on and so forth. You can also use this setup to trigger 'waves', or sets of certain types of enemies e.t.c. Just be creative with it
2011-03-06 20:49:00

Author:
Epicurean Dreamer
Posts: 224


Thanks for the help. Although some of it went over my head, it really helped.

I messed around with trying to get it how I want it but it seems like I can't find a happy medium that lasts for very long. It gets to a certain point and I like the speed at which its going but not only did it take too long to get there, it also doesn't last very long. So here is my next idea. I don't know if it will work.

Instead of using a long timer outputing into a short timer. How about a counter outputing into a short timer. That would allow me to start and keep a difficulty that I like for as long as I want. Then when I want the difficulty to increase I just increase the counter. Will this work the way I think it will?
2011-03-07 06:47:00

Author:
riverad08
Posts: 104


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.