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

Other tips on how to make clean logic (and why)

Archive: 9 posts


Sorry about the lack of pictures in this tutorial, I couldn't get on LBP for a little while, I will try to upload pictures if I get on later

1) Have sub-microchips for EVERYTHING
Why? Well because lets say you encounter a problem, or a part of your logic isn't working as well as planned, you can find the localized chunk of logic that isn't preforming as planned, and can be fixed very quickly. It also keeps your logic clean so you can see which parts are unnecessary, helping you keep your logic low thermo as well

2) Color code
Why? Because it helps you see where everything is going, and can help you see how to make your logic work the way you want to make it work more easily. It also helps make things user friendly, and see what parts do what in the logic (color coding for: function, mode of logic (multiply, or lowest for AND, add or highest for OR ETC.), inverted) which helps you take out even more useless parts, just by eyeing your logic

3) Make wire-pathing WORK!
Why? Although this may be painstaking to achieve, it really helps you see why your logic preforms the way it does, and it also keeps the thermo lower, if you provide a direct path from your output to the input, because less pathing needs to be done in the coding every time the logic is used, therefore less lag, thermo, and makes the logic easier to change because it lowers wire-lag as well Here is some ways to improve your wire-pathing with a tutorial I made previously (https://lbpcentral.lbp-hub.com/index.php?t=83116-Wiring-Cleanly)

4) Label everything
Why? It makes things easy to change, because instead of searching through your logic for lengthy amounts of time, you could just hover your courser over the output of a microchip, and see what it is for, or you could just do the same for a microchip and see its purpose, instead of searching through all your microchips for the right logic pieces. It also helps in case you forgot what a certain area of logic does, so you can save your progress, and easily finish/improve your logic. (notes can help here immensely, not to mention they can make your logic user friendly)

5) PICTURES!
If you are too lazy, or don't want to take the time to check the name of microchips, then you can put a picture on it (WOW I KNOW >.<). This not only provides information for what that logic does, but it also helps with quickly copying modules of logic, and it also improves the overall aesthetics of the logic. (Functionality over form, unless you can achieve both, while complimenting the effects of the other)

Here's a pic of my logic probe, and how my logic, being neat, helped me create a very efficient version (http://i3.lbp.me/img/ft/48354346821e200811b8ed84c036c3e83cffc5d2.jpg)

http://i1.lbp.me/img/bl/961d31bcfa9ab928169a154808498c6aca3f549d.png (http://lbp.me/v/qpwpcd9) Here is the probe itself

If there is anything I forgot, don't hesitate to add onto the tutorial in the comments, any additions would be much appreciated (and again sorry for the lack of pictures)
2014-04-13 05:05:00

Author:
amiel445566
Posts: 664


Great tips!

Reading this can help save a lot of blood sweat and tears!

Thanks
James
2014-04-13 08:07:00

Author:
James-p
Posts: 286


I had completely forgotten that you can colour-code. Thanks much for reminding me as it does help quite a bit in microchips.2014-04-14 07:08:00

Author:
koltonaugust
Posts: 1382


Really good tips. I hate messy logic, and when people see my projects they often remark how clean everything is. It takes some time up front, but you are absolutely right about it saving headaches later.

If I may add one more, keep things directional!

Chips are designed with a logical entry and exit point. Keeping logic moving in that direction saves loads of time tracking where x input came from, or at what stage y output becomes active. Of course there will be looping back, but keep that obvious as well (circuit nodes are your friend here).

One other thing that I do is to use direction of circuit to indicate what it does. Rotating the chips can be a great help. Most of my logic/interaction circuits run left to right. Binary/numerical based circuits go bottom to top. Looking at where the wires come in and out immediately tells me what type of chip that is without ever opening it.

This also makes calculations easier to see and follow for me when using binary registers and binary to decimal conversions.
2014-06-16 04:35:00

Author:
tdarb
Posts: 689


That is a good tutorial how to make your levels less intricate with reaching to the wanted logic and prevent laggings.if I used this kind of tips this will really help me,but for some reason I always get confused by where I placed everything even if it is the most clean logic I made lolz.2014-06-28 19:50:00

Author:
SeVeN161
Posts: 16


That is a good tutorial how to make your levels less intricate with reaching to the wanted logic and prevent laggings.

also if you want to prevent lag overall you could just over-expand the microchip by using extendable logic (IE counters that grow longer) to force the microchip space to grow, which breaks the wirepathing completely, and thus no microchip lag (discovered by pate59)
2014-06-29 07:44:00

Author:
amiel445566
Posts: 664


Great tutorial. Most of my experience with logic has been on sackbots, so I'll share a tip I found.

The easiest way to keep sackbot chips clean is to use multiple controllinators (on the sackbot chip, all set to receive) instead of microchips. I'm not sure if this is more intensive on the thermo but instead of a mess of wires stringing out from the controls, think of how many functions your sackbot needs, place a controllinator for each set of functions and avoid placing a wire from one chip onto a different controlinator, I just copy the logic pieces over to the other chip and add to it as needed. And the best thing is you can save the controllinator to your popit, place it on another sackbot and it performs the same! Any weapons should be placed on the following chip (on a hologram) with a joystick rotator. And still use microchips on sub-controlinators.

For example:
I made a controlinator chip to recreate Sackboy's emotion changes.
I placed another controlinator to add a sprinting function.
I made another to add flight, although I placed an impact sensor and hooked a few not gates to some buttons to prevent it conflicting with the sprint function which uses the same controls.
I can have any combination or all three on the same sackbot without any conflicting wires.

I'll try and post an image if I can to explain.
2014-07-01 21:41:00

Author:
wally-217
Posts: 521


Very useful! Must use at some point in the future.2014-07-03 22:39:00

Author:
The11thWheatley
Posts: 230


You know, I will make it a goal to create neat logic--in LBP3.

I am too lazy right now lol Great tutorial!
2014-07-03 22:59:00

Author:
Rpg Maker
Posts: 877


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.