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

Potential Way of Dealing with "Tag lag"

Archive: 5 posts


Hi folks.

Sorry if this has been discussed before (and sorry for the cliched way of starting a tutorial ), but I found something interesting yesterday while working on my level.

Me, I love tags. Can't get enough of them. If could marry them, I would. I tend to use quite a lot of them.

Now, if you happen to send a signal through several tags and tag sensors, it can cause a bit of a delay between the tag being activated, and a tag signal being picked up.

In my setup, I had it so that when you pressed a button, two objects would (at the same time) be set to move in the same direction, at the same speed. This happened (as you might have guessed) via tags. Because of how my logic was set up, there was an extra step involved (compared to getting the other object to move) in setting one of the objects to move (involving an AND gate and another tag).
I'll try to make that a bit clearer. Let's say there are 3 tags - A, B, C, and 2 objects - 1, 2. Object 1 is set to move when A is activated. 2 is set to move when C is active. C is only active when B (which itself is activated by an impact sensor set to detect a tag) AND A are active. So tag sensor A sets 1 to move, tag sensor C sets 2 to move. (I hope that's clearer)

In theory, this should all be instant, as there are no timers involved. Just wireless signals passing between microchips. However there was a slight delay between 1 starting to move, and 2 starting to move. Whilst this didn't cause any major problems in this case (but it has done before in another level), it looked untidy and I was unhappy with it.
So, instead of involving the extra tag C, I connected the AND gate directly to the "movement starting logic" for object 2. This worked a treat, both objects moved in tandem. But, these extra wires would cause a lot of hassle so I went back to the previous method.
THEN I had an idea, a long shot.... but I gave it a go. I connected the wires from the AND gate on microchip (lets call it X) (whilst still having the AND gate activating tag C) to the microchip (Y) on the moving object (whilst keeping tag sensor C as the input to activate movement), just to its own node. Then I deleted the node, and the input to Y, so all that was left was the wire from the AND gate connecting to a "vacant" output on X.

I tested it again, and now the objects moved in tandem, despite the fact that it still involved the extra tag and tag sensor C, but this vacant output seemed to make it work for some reason.

I'm now realising that I've waffled quite a bit, and it may be a bit unclear. If anyone has any questions let me know, and I should be able to upload pictures either today or tomorrow.
2012-10-24 11:37:00

Author:
Ali_Star
Posts: 4085


if it is caused by the sensor, simply changing it to "signal strength" instead of closeness eliminates the one frame latency you can otherwise get, however judging by your workaround it almost seems like a microchip issue, are you using the activate input of a microchip to turn anything on? when using the the "activate" input of microchips the logic inside the chip often doest become active till the next frame. though i'm not sure if thats the case for you.2012-10-24 16:37:00

Author:
evret
Posts: 612


All tags are set to "signal strength". Like I mentioned, I've seen this issue before when you're passing the signal through several tags/sensors.

Here's a pic:

http://i47.tinypic.com/xaw4o.jpg

See the timers/counters (can't remember which ) on the left? Initially they were connect directly to the yellow tags, with the yellow tag sensors picking them up on the right microchip and moving the object in time. However, I need to allow for another factor, which is why I added that green tag sensor, and then attached the green AND gates to the relevant yellow tag. This extra step is what caused the lag.

I tried directly connecting the green AND gates to the relevant counters on the right chip -> no tag lag.

You can see in the image that the green wires lead to outputs on the left chip..... but those outputs don't actually go anywhere. They initially went to the right chip, but I deleted the connections. The simple fact that those wires are there seemed to stop the tag lag. Don't ask me how, it just did.

You're a lot better at logic than me, so I'm sure you could come up with a reasonable explanation, but I've seen strange fixes like this before.

For example (not really relevant to the above), in another level, I had a tag sensor connected to an emitter. Sometimes it didn't seem to work. For some reason (this was purely by accident), I connected the tag sensor to a 1-shot resettable counter, with no output (I basically forgot to connect the output of the counter to the emitter). Guess what? Emitter started working! Very odd indeed.
2012-10-24 19:21:00

Author:
Ali_Star
Posts: 4085


try copy/pasting or capturing both chips, deleting the original, then placing down new versions. this isn't "tag lag" as you call it but a bug within one or more of the current gates that causes a delay where there shouldn't be one. placing new versions of the chip should fix it. having the wires going out the side of the chip must cause the game to correct the bug however i think refreshing the logic is a more reliable and tidier solution.2012-10-24 20:37:00

Author:
evret
Posts: 612


Hmmmm, I'll have to give it a go next time it happens.

Looks like my long post is a bit pointless now, but at least there's another potential solution there if folks ever come across it.
2012-10-24 21:03:00

Author:
Ali_Star
Posts: 4085


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.