PDA

View Full Version : Centralized and deferred counting using circular signaling



hesido
06-22-2011, 12:54 AM
The name is definitely over-engineered (!) but the technique is not: It's a very simple method :)

In this tutorial, I describe a method which can be used to store peripheral count information in a central chip, in a deferred or on-the-fly manner using signaling. The signaling is circular and all signals are held until the receiving end acknowledges reception, which makes it very sturdy. The main takeaway lesson is the circular signaling system, not the actual counting. I hope this has not been mentioned before by someone else.

I also put up an example gameplay that uses the deferred counting principle. For counting, I used simple counters, but the main point of the tutorial is signaling and this should be compatible with the really nice digital or percentage counters (timers) fellow LBP'ers share here on LBP central.

The main principle of circular signaling used here can be used to signal many other things, since it is basically verifying the reception of the signal on the other end, objects can act accordingly at desired times, and errors due to load may be avoided this way.


http://www.youtube.com/watch?v=k6qTjLRJOOI

The level can be found on http://lbp.me/v/0k6k8s and is copyable / shareable for you to investigate all the chips.

SSTAGG1
06-22-2011, 01:17 AM
Wow, at first I was, well, -_-, but once you showed it in action, that is actually really useful. I probably never would have thought of this.

I think I'm going to use something similar for my Merc project. Rewards collected while on missions will only be dispensed upon successful completion. Since it's open world (well, hopefully), this system will come in handy.

Just need to mess around to get timers to replace the counters and I should be good.

Thanks.

Krondelo
06-22-2011, 03:12 AM
Man too smart for me. Good stuff though.