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

Complex Logic causes major lag?

Archive: 16 posts


I have a problem...

I am creating a teleportation system for sackbots, but it's not so simple as 'start at point A and go to point B'. I'll explain it as simply as I can.

There are 5 portals, which begin in the 'not activated' state, and to activate them, the Sackbot needs to walk into their range (15 tag sensor units). If the Sackbot uses a portal, it will display a menu with 5 portal names displayed.

Activated portals are displayed in blue, and non-activated portals are displayed in red.

I have one microchip to control all of the logic of this teleportation system. Here's what that single microchip does:

receives a signal when a portal is activated, receives a signal when a portal is used, determines which portal was activated or used, displays a menu when a portal is activated, determines if a menu item is selected AND if the corresponding portal has been activated AND if the player Is pressing the 'X' button, if true teleports the Sackbot to the selected portal, if false informs the player that the portal has not been activated and provides instructions on how to activate it, the list goes on...

This microchips contains over 50 circuit nodes just to keep the wiring somewhat neat and 'follow-able' and as you can imagine contains very many Logic Gates.

Now to my question, the microchip causes the game (not to be confused with Internet connection) to become extremely laagy, to the point where it takes almost a minute to connect one wire. Is there any way of removing or reducing this? It is definitely not an Internet problem because I have tried both online and offline with the same result.

Cheers
2012-04-15 06:45:00

Author:
Unknown User


I'm assuming you don't have more microchips inside this microchip. If you don't then you should try to separate this logic into more microchips. I find having to much logic on one big microchip can be very laggy, but if I separate it into more microchips, it gets a lot better.2012-04-15 06:51:00

Author:
DreJ1212
Posts: 240


I have about 6-8 microchips on this one giant one which are all still pretty complex. I could try that but I'm trying to keep it all together so that it is easier to follow each wire. With hundreds of different wires going to multiple separate microchips, I'm guessing it could get very messy.2012-04-15 07:01:00

Author:
Unknown User


it's because of all the wires that are in the chip, when u try to connect another wire the game is constantly trying to calculate the best path for all the wires to make a path for the new wire, and with so many wire it causes framerate to almost come to a complete stop2012-04-15 07:28:00

Author:
evret
Posts: 612


Oh, thanks! That sounds exactly like the problem! Now I have a new question... How do I reduce the number of wires on my circuit board?2012-04-15 09:26:00

Author:
Unknown User


You can build your circuits on pieces of material where there'll be no lag before moving them to microchips.

To reduce the number of wires you need to simplify (http://www.allaboutcircuits.com/vol_4/chpt_7/6.html) your circuit so it uses fewer gates and other components.
2012-04-15 11:47:00

Author:
Ayneh
Posts: 2454


Okay thanks for that. I can begin learning Boolean logic from that website. It's quite interesting 2012-04-15 23:46:00

Author:
Unknown User


You can also try to nest some parts of your logic network in chunks (on their own microchips) so that they can be collapsed and there is no wire calculation. Of course, I'm not sure how feasible this is with your current setup. I really do hate that the wire routing will hold up a simulation frame. It should just wait until the wire is placed to try to update the paths. :2012-04-16 00:03:00

Author:
comphermc
Posts: 5338


Okay, thanks, I've tried placing as much as possible into separate microchips and now the game is a little less laagy. I 100% agree with you comphermc! Perhaps LBP might have an update to smarten the wires.

I've also had to place a whole lot of circuit nodes just to stop the wiring from becoming too much of a mess to to reduce my chances of confusing myself when I make changes. It's not very smart at times... Which becomes frustrating.
2012-04-16 00:39:00

Author:
Unknown User


A friend showed me a way to reduce wire lag caused by setups like these: take out an OR gate (or any gate, it doesn't really matter), set it to very wide and drop it straight in front of the component from which the wires come from. The wires will have no longer a way of following the chip grid and calculating such a path (which causes the lag) is no longer done.2012-04-16 00:54:00

Author:
Antikris
Posts: 1340


Hmm, so are you saying to put an OR Gate in front of every wired input/output on my microchip? If so I think that would just make everything a whole lot more confusing considering that there are over 50 different chips doing different things... Or are you saying to put the OR Gate in front of the main microchip? If so that would not help considering I made it COMPLETELY wireless using tag sensors and tags.2012-04-16 01:18:00

Author:
Unknown User


I think Kris means to do this in front of a huge logic gate. So if you use 100 outputs on a OR gate, just copy-paste the OR gate right next to it. But if the wires come from multiple logic gates, then it won't work. Be careful though, using multiple chips inside chips does take more memory, because the game keeps track of the name, position, size, color and icons of each chip.2012-04-16 02:32:00

Author:
Unknown User


You wouldn't need to keep it there, just while your wiring from that gate. All you would have to do is select the gate you want to wire from, copy it, then place a copy over the outputs of the first gate ( normally directly to the right of first gate with no gap between). They you hide the new gate with L2. You can then wire from it all you want and it won't calculate the wire paths till you delete the gate covering the outputs.2012-04-16 02:39:00

Author:
evret
Posts: 612


I tried that, and either I'm doing it wrong, or it doesn't work... What I did was simply put an OR Gate directly next to the outputs of the microchip that I'm working with...2012-04-16 07:50:00

Author:
Unknown User


2 thing that i have found working in side microchips is if you hide the out going wire it tends to help another thing is making 1 microchip is never a good idea i paid that price with my unusable but realy cool 20 floor eleavator one thing that i do now is make as much of my micro chips remote as posable i have a few large and laggy chips that once broke down and turnd into remotes are easly understood and can be placed anywhere if you would like to see what im talking about look me up on psn2012-04-16 14:02:00

Author:
JKY
Posts: 119


Okay, I also have learned this lesson the hard way but I think I've found a method of reducing the problem... But it involves millions of circuit nodes. The idea is to stop the wires from being calculated, and to do that you need to make it so that the wire only has one path and therefore stopping it from calculating another path. One good thing I have discovered is that wires will NEVER turn at a 90 degree angle and continue straight if it would mean overlapping another wire. Therefore we can fix the problem by placing a rectangular setup of circuit nodes at any '4-Way' or 'T' intersections.

Perhaps an image will better explain this.

http://ic.lbp.me/img/ft/15c3f5d211c1da9a268a5c5515643308c2ebfa0b.jpg

If you look closely at the circuit node positioned 5th from the left on the bottom row, you'll notice it does not have any inputs or outputs. It is there simply to block off any possible other calculations that the wires may attempt, because yes, the wires are stupid enough to try and exit from there and then find another way back around... Unfortunately.

I have positioned this sort of setup at every intersection and since then my wiring troubles have been reduced greatly to the point where, there is still that frame rate lag but it is a fair bit faster and it is now easy to manage.

Thanks for all of your help guys!

Here's the final product of my Sackbot Teleportation Microchip, and as you can see, it's quite busy

http://id.lbp.me/img/ft/b3da1e05681abda0f9b49bc699fe659fe15fe1c7.jpg

http://lbp.me/v/-qxyeb
2012-04-16 14:30:00

Author:
Unknown User


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.