LittleBigForum Archive
LittleBigForum
LittleBigPlanet 1 & 2
Tutorials

The Almighty Feedback Loop!!!!

Archive: 2 posts
2014-06-12 07:57:00 / Author: amiel445566
When people use counters/timers to do large scale counting, or things like health/currency systems, it just sickens me, mainly because I've learned how to use a feedback loop

Feedback loops are gate loops that let you add into or subtract from a memory source, the bare example of this is this
Simple feedback loop(1).jpg

What this certain circuit would do is whatever you put into the bottom modifies the system

The reason this works is because the or gate will keep adding in whatever number you put in to 0% over and over forever, unless you change what 0% is. Then what it does is make a mathematical calculation of previous % in the loop + the new % in the loop

For example, if you do +30% to a new system such as this one, then what you get is 30% staying in there, but then if you add in -22% then what is left is 8%, much like how a calculator adds and subtracts

Now there are ways you could modify this, such as implementing +/- limits, like so
Feedback loop RESTRICTIONS(1).jpg
(B = BATTERY)

What this does is restrict the highest and lowest of each value in the OR so that anything above the limit gets discarded

Now there is one more thing you could add to your loop to perfect it, which is a modifiable reset like so
Feedback loop FINAL(1).jpg

The way the reset works is by doing -(LOOP VALUE)+VALUE WANTED=VALUE TO ADD TO LOOP VALUE

For example, -30+5=-25 and 30-25=5

LAST THING TO KEEP IN MIND
If you don't add in pulses, then the feedback loop won't add your numbers correctly, because it keeps adding whatever input you put in, 30 times a second, so just make it pulse with a counter wired into its own reset hooked up to an and gate set to multiply, and make sure that the counter is set to 0/1.

If you want more information, here and here are some good tutorials that teach the very basics of feedback loops, because I didn't delve in deep
2014-06-12 07:57:00
Author:
amiel445566
Posts: 127

2014-06-12 11:12:00 / Author: Dertyde94
Well, it looks like you're very very good at logic! How awesome.
I already know that, I saw a tuto on the French lbp community website. Quite useful.

Good idea to make a tuto like this

(btw we should meet one day I would love to see how amazing you are with logic
Edit: Oh I've already played one of your levels... I even think you're in my prefered creators... )
2014-06-12 11:12:00
Author:
Dertyde94
Posts: 181
LittleBigForum Archive Statistics
Posts: 37945 • Threads: 4847 • Members: 3878  • Archive-Date: 2019-04-15

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.