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

Timers/counters Logic question

Archive: 8 posts


Hey guys,

I have a problem that I've run into. It seems that sometimes if a signal is sent very quickly to a circuit it doesn't seem to fire the circuit, like say to a toggle.

So if I wire a button on the controllinator to a counter, so that it counts to 1 (max 1) and sends a signal to a toggle and resets the counter to 0, it seems like it doesn't toggle at all, it just resets the counter to 0...unless I trigger a reversed timer to keep the signal going. Then it works but it's just a lot of extra logic, when I see the signal flicker quickly, so I think it should trigger the toggle.

Is there some reason for this I am not understanding or is it just the way LBP2 is?
2011-03-25 14:03:00

Author:
Unknown User


I've noticed this as well. I've triggered some incredibly rapid pulses, which seem to annihilate themselves before actually sending the signal to anything in the circuit.2011-03-25 14:12:00

Author:
SSTAGG1
Posts: 1136


Logic is supposed to be instantaneous in LBP2, but this is not always the case. Destructors seem to be a particular case in point:

Lets say you have two objects set to self-destruct on collision with one another, half the time one object will destroy itself before triggering the impact sensor on the other object, because the destroyer fires before the impact sensor.

I guess it's "just the way LBP2 is". As far as a computer works, nothing is instantaneous. Generally speaking, commands are executed sequentially by the CPU. In the case of your self-resetting counter, for whatever reason the reset command is being processed before the toggle is activated, and once it's reset there's no signal left for the toggle to see. My guess would be that the "instantaneous" circuit is limited by a set number of things firing within the same frame, but I'm not really sure.

The easiest way to robustly design around this is to put small delays on your resets/destroyers. I always pad mine with 0.1s timers before firing them to allow any pre-destruct logic to activate.

Hope this helps.
2011-03-25 15:05:00

Author:
Thegide
Posts: 1465


Lets say you have two objects set to self-destruct on collision with one another, half the time one object will destroy itself before triggering the impact sensor on the other object, because the destroyer fires before the impact sensor.

You talking like things in LBP2 happens for no reason I never heard and never seen logic being "fire" before... actually being trigger, possibly your impact sensor got triggered by something, it's very sensitive thing thta even single small touch can trigger it


My guess would be that the "instantaneous" circuit is limited by a set number of things firing within the same frame, but I'm not really sure.

No it would brake lot of logic if it was like that, reason why he have a problem is lentency of the components, some components need more then 1 frame of signal in order to be processed. Most visible example is microchip, when you activate for 1 frame it won't allow to brake thru the signal, because it needs extra frame to output the signal.

So lantency is a issue here, but your solution is good for that too ;] 0.1s timer should solve this
2011-03-25 15:49:00

Author:
Shadowriver
Posts: 3991


So lantency is a issue here, but your solution is good for that too ;] 0.1s timer should solve this

Which is why you should also have a two frame pulser in your tool bag.
2011-03-25 16:03:00

Author:
Shanghaidilly
Posts: 153


So if I wire a button on the controllinator to a counter, so that it counts to 1 (max 1) and sends a signal to a toggle and resets the counter to 0, it seems like it doesn't toggle at all, it just resets the counter to 0...

That example works fine for me.

For more complex examples, you may be experiencing race conditions due to latency. If you have a specific example which doesn't work, then publish it in a copyable level, and I'll have a look.
2011-03-25 19:16:00

Author:
Aya042
Posts: 2870


I deleted my particular example because it was a way that I was trying to fix a problem, that I realized later was caused by something completely different (i had a tape recorder up my nose). After that I redesigned the entire vehicle in question so I just deleted that Logic.

I am sure I will need to do it again though at some point, and if I have the same problem I'll definitely publish so you can take a look.

In one of comphermc's tutorials he has a pulse generator which is a counter counting to one resetting itsefl. He said that runs once every frame. is it safe to say that if you set the max count to 2 it runs every 2 frames, 3 every 3 frames, etc.?
2011-03-29 16:12:00

Author:
Unknown User


each time a counter receives an input it moves by one place, so to get a counter set to 2 to the point of sending a signal out, you would have to hit your button twice. hitting and holding it won't do the trick.

I've never had any troubles with counters like that, but anything is possible. I've seen it happen when making a pulse using a selector. I have also seen cases where simply inserting a not gate into one side of a circuit will throw off the timing, and i have even had cases where simply running an element through a test gate through off the timing. Stuff like that happens.
2011-03-29 16:25:00

Author:
tdarb
Posts: 689


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.