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

Need help understanding logic

Archive: 17 posts


I have done all the tutorials and seen some online but I struggle a little in the logic which makes me stuck for ideas when I try to build something, I really want to build something that functions well but I just can't get my head around it, any suggestions? 2011-04-26 16:08:00

Author:
Darksonic
Posts: 19


If you just can't wrap your head around the idea, I'm sure lots of people on here would be willing to help you out.

If you want, add me as a friend when the servers come back up and I'll help you out

Once you understand logic, there's no limit (besides the thermo) to what you can create
2011-04-26 19:17:00

Author:
UberOrbPS
Posts: 290


ill do the same...in the meantime start messing with different logic components...talk about it w yourself....i.e. i want x event to happen if and only if a, b, and c happen first...well, if you dont know. that'll be an AND gate because it requires all inputs to be true (ACTIVE) in order for it to send a signal2011-04-26 20:15:00

Author:
Unknown User


Building effective circuits requires you to break apart your problem into an algorithm, or rather a sequential series of small, basic steps. These smaller steps, in turn, are often very simple to understand and program with the logic tools.

For example, I recently built an underwater vehicle that moves by using several extendable arms to grab onto the walls of its environment. The overall process is quite complex, but when you break it down into its step-by-step operation, it becomes a much simpler problem to manage and design:

For each cycle (or iteration) of movement:
Step 1 - decide which nodes (grabbable spots on the wall) are suitable for grabbing
Step 2 - decide which clasps are to be activated next
Step 3 - move the appropriate clasps towards the wall nodes by their followers
Step 4 - when a wall node is found, lock the clasp onto the wall
Step 5 - retract the winch, which pulls the vehicle towards the clasp
Step 6 - release the clasp and return it to it's resting position
Step 7 - initiate next cycle

In turn, each of these steps could be broken down into their own simpler algorithms, until you're dealing with very simple logic handling - such as testing the state (on/off) of two signals using an AND gate and deciding which action to take depending on the AND gate's output.

For example, Step 2 could be expanded as follows:

Step 2.1 - Test to see if a node is nearby the clasp AND the clasp is in resting position (using tag sensors for each condition)
Step 2.2 - If the AND gate outputs TRUE ("on") then input to a selector which activates the "node seeking" microchip (a simple follower & look at rotator)

Hopefully, this gives you some ideas on how to break down functionality into smaller, more manageable, components.
2011-04-26 20:34:00

Author:
Thegide
Posts: 1465


I have to completely agree with Thegide. The firt ever piece of logic that I made was a sackbot emotion chip. I made it extremely complicated because I did not have experience with the selector. I ended up turning it into an ultimate counter and reseter involving each combination of directional buttons that would cause it to reset the expression to neutral. Anyway I broke it down into this.

1. each directional button corrsponds to the expression to use.
2. When pressed it activates the emotion with it's 3 "levels" depending on how many time you press the button.
3. When you have pressed the button 4 times the emotion resets all counters and activates the neutral emote.
4. If any of these counters are activated while a different emotions set of counters is activated the whole thing will reset to the neutral emote.

That all lead to my ultimate resetting device which I made entirely of AND, OR and counters + the neutral sackbot behaviour. I made it so that if any of the combinations of different buttons was active the thing would reset OR if any of the reseting counters for each emotions were active it would reset. Oh and for one emotion it had 4 counters. the first was set to 1. The second set for 2. The third set for 3. And the fourth (resetting counter) set for 4. All of the counters were increased by the button corresponded with the emotion.So that they would activate in turn for every time the button was pressed. The 4th counter would be hooked up through the resetter and into the resets for the counters.
2011-04-27 04:20:00

Author:
Unknown User


I feel like just messing around with all the gates and functions can give you a better understanding of what they do. Several things do the same thing in a different way.. err there are several ways to do the same thing. But I came across a few switches and detectors that didn't behave as I thought they would and unfortunately a few things need to be a little more complicated in order to control it.. like followers.. to me at least.. I do feel that we ARE somewhat limited to quite a few things..

Ask someone what you want to happen in your game and I'm sure they can tell you a few ways to do it.
2011-04-27 04:39:00

Author:
Dortr
Posts: 548


I used to avoid movie cameras and sequencers because I just didn't know how to use them.. Now I use them all the time.

You'll get better at it as you do it. Almost anything is possible in this game, you just have to think about what it is you want to do. Start with something simple and try to make it. Once you get it, go back and look at it again to see how you can simplify it.

In the end, some things just can't be simplified. I just added something to my level with a selector that has 52 positions... And all it does is create a simulated typing effect. There are other ways I could have done it, but this way gets me closest to the effect that I wanted. Sometimes the simplest things seem to take the most effort - though it's not the complexity, just careful wiring and staying focused.

edit - and even now, after i am posting this, i'm thinking of a way i could change to tags and sensors with a sequencer to reduce a lot of the wiring on my typing object....
2011-04-27 04:42:00

Author:
shane_danger
Posts: 283


There are a lot of specifics to logic, and just asking "how does logic work" can conjure up entire volumes on its operation. Asking more specific questions, and breaking the big problem into lots of smaller ones is the trick, exactly as Thegide said.

Instead of, I want my sackbot to swing his sword in a circle while jumping,

Try turning it into lots of simpler processes
1: Detect if the sackbot is in fact airborne
2: make sure no other actions are interfering
3: Activate the necessary rotators and behaviors
4: Stop the spinning when you land.

These can be further disassembled.
1: Sackbot impact sensor set to inverted.
2.1: Use inverted or gate hooked to microchip that governs the spin attack.
2.2: Use batteries hooked to said or gate that are only active when the other microchip is active.
3.1: Hook the buttons up to a counter. For instance, if square performs the attack, put it to the input on a counter. The counter must be off of the microchip that will be turned on and off so it can be reset once you hit the ground.
3.2: Hook the counter to the necessary elements.
4.1: NOT gate hooked to the reset on counter.
4.2: Impact sensor hooked to NOT gate.

THe big picture isnt simple but if you turn it into smaller steps it becomes more managable.
2011-04-27 05:00:00

Author:
the Ion Pulsar
Posts: 172


Thanks everyone for help and I will definatly try adding you all once PSN is back up because I'd also love to socialise on LBP and learn by observation. Also the subject I;m aiming on is learning how to design vehcicles that I can go through a game with cos all I have down is the movement, controlinator and that's it really so thankyou everyone and I look forward to hearing back

Also I've always struggled with how to make like a working arm without looking rubbish, I just tried creating a crane but I don't even know where to start apart from the structure and I really want to build walking things n stuff
2011-05-01 00:18:00

Author:
Darksonic
Posts: 19


well 1st you need to figure out how you want it to move and wha you want it to look like while moving2011-05-01 01:13:00

Author:
Unknown User


I struggled with logic in the beginning also. I just couldn't get it. Two things I will tell you and please take this advice because I was where you are at not too long ago.

Number 1: When we get back online search the name Quietlywrong in on LBP.me or in the search option in the community. He has a tutorial level that you copy to your moon. He explains logic very very good. He goes into detail what each thing does then makes a setting using the logic he had just taught you and basically says "make it work". The best part is that the same exact scene is above you with the answer. Also he updates it from time to time with new tutorials you just have to re copy it.

Number 2: This is what helped me the most. Think of something you want to build, anything, maybe an elevator, top down car or an emotion chip mentioned above. It doesn't matter what you choose just something that requires some logic. Now take what you you've chosen and build it, don't stop until you are done. Watch every tutorial you can, take any advice you can. You can post here and ask for help if you get stuck. After you build it you will have a good understanding on how things work. For example if you chose elevator youd learn a lot about sensors, tags, and gates. You may have to build it exactly how the person in the tutorial did but you'll get an understanding of how things work just from the hands on part of it. Eventually you'll be able to make an elevator totally on your own with your own logic. If you saw ten different elevators you'd see 10 different ways to build it. Everyone has their own way of using logic. It'll take time but you will soon be creating anything you think of. It took me a month to really get it. It won't happen from one creation or one tutorial. Be patient and take breaks when you get frustrated, leave what you are doing and find something else to do for a bit.

One last note. Don't try to learn everything at once. It been a few months for me and right now I'm just starting to mess around with sackbots. Now that I understand logic it'll be much more easier to make a super powered sackbot. Oh yeah and you will go back to some of your first creations and say "what was I doing"'. What I mean is you will tend to do things the complicated way, that's why it's important to learn about all the tools given to you. When your in the tools bag it never hurts to press square over any tool and play the tutorial. You'd be surprised on how much more you learn from watching a tutorial again.

Happy creating and remember it's fun. If your getting annoyed take a break like I mentioned.
2011-05-01 05:07:00

Author:
METALPUNKS
Posts: 306


you create logic on the daily without even thinking about it in just using your language. when people say well your logic is faulty or that doesn't make sense or anything like that it's because they don't understand how you got to your conclusion or the end result. it's a giant word problem...you remember those in math class? train a is traveling at x mph and train b is traveling in the opposite direction at y mph. how long will it take for them to meet if they are z miles away from each other? logic is the same way. well I want this light to come on when this object is emitted and this sound is generated. or if I touch this wall and that ceiling i want the gravity to be reversed. what did I just say? well break it down, just as you would with a math problem. what comes first, what comes second, tinkering in a blank level is the most fun. especially w other peeps. cuz you pull out some logic then your friends alter it and you say, wtf did you just do? right? lol then you do something else and they ask ummm wtf did you just do that? it's way simpler like this. it's more about having fun than anything...because if you arent' having fun making levels is pointless.2011-05-01 07:32:00

Author:
Unknown User


Yeah I like to experiment and it's not annoying as such it's just I have so many ideas but I can't put em down. I've always had trouble making mechanisms like I want to make a moving arm that can pick objects up but I get confused.2011-05-01 18:34:00

Author:
Darksonic
Posts: 19


Yeah I like to experiment and it's not annoying as such it's just I have so many ideas but I can't put em down. I've always had trouble making mechanisms like I want to make a moving arm that can pick objects up but I get confused.

well, take that and break it down a little further. how do you want it to pick the items up. do you want it to clamp down around the object or magnetize it or what? how do you want it to move? do you want it stationary? ask questions to yourself about the said object and answer them with basic answers. if you can't break it down to a simple answer then ask more questions about your complex answers. and you will then come up with a design you should be satisfied with. the logic will come with the design
2011-05-01 20:47:00

Author:
Unknown User


I didn't read all this, but I like to teach stuff to people and I'm pretty good at logic (but bad at level-making).
The name's Jacque (or pivottt)
2011-05-02 02:56:00

Author:
Unknown User


Now I'm slowly trying to understand contraptions but I really hate how I can't do it that well and I have tons of ideas but again can't get them down I need good contraption tutorials please 2011-05-05 23:21:00

Author:
Darksonic
Posts: 19


In addition to the great advice of these fine people above me, I'd like to add a suggestion to help you not get confused.

So, you either break your ideas down to managable portions or you adjust your ideas to be smaller, more simple; either way, a good approach is often to develop key designs and logic separate of the rest of the level. You can do that in a remote corner of your level or in a separate crater on your moon. The point is that this makes these portions easily testable and gain you a good understanding of its up- and downsides before integrating it into the larger whole. Before you do that you may even find out that you need to adjust stuff you already built earlier because you gained new insights and suspect a better way to make it all work together.

I highly recommend this. Also for the sake of clarity in case you get tangled up in a problem and want to post on these forums about it.
2011-05-12 15:21: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.