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

Cascade detection of completed tasks? (A,B,C,D,E)

Archive: 11 posts


I'm trying to visualize this completely in my head, away from the game, Photoshop or even pen and paper. I'm having trouble.

THE PROBLEM
I want to reward players for having completed tasks, each with unique rewards,
at the end of the level before they go to the scoreboard.

For theory, let's limit it to 5 tasks: A, B, C, D and E.
The tasks can be completed in any order, and it's not as simple as counting 1 out of 5, 2 out of 5, etc.
Each task has a unique reward which will trigger if it was completed. Incomplete tasks will be skipped over.
What's the most efficient cascade system to detect and deliver these rewards without delay
between tasks, but without overlapping completed ones?

EDIT: Think of multiple unlocked achievements/trophies at the end of a game. They all
display, one at a time, without cutting each other off, and without delays between them.

EDIT: Thanks and best to all! I appreciate all replies and am exploring this aloud and updating as I go, to help my thought process.
2012-09-03 08:50:00

Author:
Unknown User


I'm trying to visualize this completely in my head, away from the game, Photoshop or even pen and paper. I'm having trouble.

THE PROBLEM
I want to reward players for having completed tasks in any order, in a special room
at the end of the level before they go to the scoreboard.

For theory, let's limit it to 5 tasks: A, B, C, D and E.
The tasks can be completed in any order, so it's not as simple as counting 1 out of 5, 2 out of 5, etc.
What's the most efficient cascade system to detect and deliver a reward for each completed task,
in order, and skipping over the incomplete tasks without mention?

i can see a few ways to do this but you need to be more specific about said tasks,
there are many ways to do many things
2012-09-03 10:24:00

Author:
JKY
Posts: 119


Thanks for your reply.

The tasks are ambient challenges, etc. When completed they will turn on a tag and award points with specific messages at the end. They shouldn't have any impact on the cascade logic other than that the cascade logic detects they are completed (I'm thinking tags). However, if knowing about the rewards helps things, they're in the form of messages that will display on the wall similar to unlocked trophies, with points that pop up. I've seen this sort of thing and understand the logic for it when it's a simple counting system ("congratulations, you've found... 7 out of 10 panda bears!" etc.), but I already have that. I want each unique message to display for completed tasks, and to skip over incomplete tasks. I'm trying to create the cascade detection logic independent of the actual tasks, simple and modular, on a single microchip so it can be dropped at the end of other levels, even ones I've already created, and just pepper the level with tags that turn on. So again, there shouldn't need to be any thought about what the tasks are, just that they activate tags. Then again, I'm thinking in terms of tags when that might not be the simplest solution. Hmm.

I've got Photoshop now. Here's what I was thinking, to start:

MY SOLUTION?

http://i.imgur.com/jWZXJ.jpg

Above: the basic idea of tracking and giving rewards. Tags activate in the level. At the end, the cascade logic detects the player is in the room AND whether each task is completed via tag.

However, as you see, all the rewards are activated at once. That's bad. They will register, but overlap all at once and only the last one will display properly. I need a system that gives each finished task time to breathe.

Do I just bite the bullet and use a ton of AND / NOT / OR gates between each of these to set conditions? It seems like a lot of extra work. How about a selector that moves from one to the next? Is there some super-clean minimal system I'm not thinking of?

EDIT: NEW POSSIBLE SOLUTION: I kind of like the idea where it all plays on a sequencer. The logic on the sequencer detects if the first tag is active. A simple yes/no system with the tags. If yes, it gives the reward. If no, it skips to the next tag. If that's active, it gives the reward. If no, it skips to the next tag. And so on. If no tags are active the thing is over very quickly, but I haven't begun to test this. For each active tag it plays the reward and I have all the time I want to craft a special message and so forth.

Thoughts?
2012-09-03 13:04:00

Author:
Unknown User


What about a reward for number of tasks completed? Say, if you have one task, any task, you will get a reward. If you have two task, any tasks, you will get a reward for two tasks and so on.2012-09-03 15:44:00

Author:
Silvantor
Posts: 141


That's relatively simple, and actually I already use a counting system for that! It's used in the level and progressively unlocks and rewards the player. Thanks!

The end, however, is a cascade effect similar to how achievements/trophies unlock on consoles. When you beat a game on the hardest setting + collected every whatever + finish the game in less than 3 hours + whatever else, you're getting all those trophies unlocked at the same time, but they display one at a time without overlapping or cutting each other off, and usually without any significant delay between them. And, of course, the things you didn't achieve don't get mentioned. Detecting that 3 out of 5 things have been completed and providing a scaled reward is no problem, but detecting which 3 out of 5 (A,B,C? or A,D,E? or some other combination?) and giving the appropriate unique reward for each is harder.

More and more I'm leaning toward the sequencer idea. I can just keep adding sensor tags as I add new rewards in the level and hop around the timeline with battery signals and things without much fuss... plus it keeps everything in order so I can literally label my tasks A,B,C, etc. At least, in my head, it makes sense. But is it the most efficient system? My gut still says no.

Will continue to update the thread as I explore this.
2012-09-03 15:55:00

Author:
Unknown User


OK - So here's how I would solve this (and I've tested this and it works nicely)...

http://i8.lbp.me/img/ft/4f84a0a0d877265936bc0b0dc4ac92ca7801e3cc.jpg

I used a 6 position selector (the first position is on by default and is the NULL starter - it does nothing).
Then I have 5 "reward" chips.
The reward chips are inactive until their corresponding selector node is lit up.
Each reward chip has a very simple logic:

http://ib.lbp.me/img/ft/fcb178ac2b668b2d1e7e180c760d2bca61b9510a.jpg

If the corresponding tag is on, emit the reward (I'm using an emitter - you can fill in whatever logic you have in mind for the actual reward).
If the tag (the output of the tag detector, obviously) is off, then route the signal out and around to the next node on the big selector.
The bottom portion is a timer (for your fixed gap between rewards).
Each time the timer completes, it increments the selector.
If that next node is not on and is therefor re-routed, the re-route will only take but a few frames (1/30-second, as I understand it) to complete... almost imperceptible to the player.
The last node has no re-route. You either reward or you don't. Either way, it also shuts off the timer cycles.


I hope this made sense and that it is helpful to you!


EDIT: Ooops! I just realized that I took these screen shots after a test run that I didn't fully reset. So even though it shows the selector active in node 6, you'd actually want to set it to start at node 1.
(sorry 'bout that)
2012-09-03 23:33:00

Author:
v0rtex
Posts: 1878


http://ie.lbp.me/img/ft/73e18b423228e74602f344f0aedb9077fc77ca2d.jpg

I doubt this is the most efficient method but it is a start.

Sensors activate one shot counters. The player sensor, too. The green audio objects represent actions take as each task is cycled through. The sound at the bottom is heard after all available actions have been run through.

You see the chaining of a particular chip, which I have separated and opened on the side. They are all the same, so you can easily copy a row in case you need a new task. The top input of the chip is the event that start the evaluation of that task; in case of the first chip, it is the player sensor. You'll notice that each chip's bottom right output goes to the top input of the next chip, chaining them together.

The completion of the task itself goes into the bottom input of each chip.

What happens inside is as follows: when triggered and completed, the green AND gate activates, sends a signal via the top output to the audio. It also starts a timer (set to Start Counting Up) that - when full - activates an OR gate. In case when triggered and the task was NOT completed, the red AND gate is activated, streaming immediately to the OR gate. So, essentially, when the task is completed, a sound is heard and a few seconds later the next task chip is triggered. When a task is not completed, the next chip is triggered immediately.
2012-09-03 23:56:00

Author:
Antikris
Posts: 1340


Identical tags in sets of two. First set of tags activated as you complete each task. Second set of tags on a sequencer that only plays at the end of the level. Use one tag sensor for each set of 2 identical tags, so the tag sensor will only activate the reward message if the completed task tag is active at the same time that the sequencer activates it's twin tag.

Does that make sense? Seems like a thermo efficient solution in theory.
2012-09-04 00:00:00

Author:
Ungreth
Posts: 2130


Wow! <3

Brilliant! These are all very elegant solutions. @Antikris, holy wow, you took what I thought would be an impossible-to-segment mess of gates and conditions and turned it into possibly the best solution. Great management system, easy to copy-paste and reshuffle everything without having to think it out. It may take up more thermo and be more complex, but it's a gorgeous Lego kit of functionality. Thank you very much.

@v0rtex and @Ungreth, also thank you! More brilliant solutions! I'm building these as instructed and trying them both out for comfort as well.

Choices, choices. You guys just cut my workload by 90%. Credit all around.

http://i.imgur.com/DgH6q.jpg
2012-09-04 02:09:00

Author:
Unknown User


i think this is the solution, Arbiekko. this is the ONE2012-09-04 05:30:00

Author:
HellYeah1982
Posts: 192


just to add my 2 cents
i put together a speed scale sequencer solution that you can add to by simply extending the sequencer, copy-pasting one of the chips and changing the tag sensor colour/label (plus changing emitter/scoregiver etc).

when the player triggers it at the end of the level it starts the sequencer going at 0.3 seconds per stripe (any faster and the logic doesnt have long enough to slow it), when it reaches a chip the sensor within checks for a matching tag. if a matching tag is present it activates the green tag which subtracts the battery strength from the sequencer speed (had it at 97% during testing)
this causes the sequencer to slow down as it passes over chips that correspond to tasks the player has completed while going full speed over chips they havn't.
the sequencer needs to b outside the chip with the speed logic as sensors wont detect tags within the same chip (you could just have the sensor outside the chip instead)
also all sensors are set to "signal strength" to avoid distance affecting the analog signals
http://i6.lbp.me/img/ft/1f63b80fc35176d9473427c192efe50f39c65d55.jpg
2012-09-04 10:37:00

Author:
evret
Posts: 612


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.