3 ms·
Here's what I think is happening (without actually looking at the code). 1. For each person, store an integer ("ping count"). 2. Whenever you receive a ping f
by daxelrod 11y ago
Here's what I think is happening (without actually looking at the code).
1. For each person, store an integer ("ping count").
2. Whenever you receive a ping from that person, increment the ping count.
3. Periodically decrement the ping count, stopping at zero.
4. When a person's ping count is zero, do not display them on the screen.
Let's say a ping is transmitted every second. "decrement the ping count at a slightly slower average rate than the ping broadcast" means that #3 should happen every 1.2 seconds.
The result of this is that, if somebody is solidly within broadcast range, their ping count constantly goes up.
If they are just past the edge of broadcast range, they'll start getting signal loss. The result is that some of their signals will be delivered and some won't. This will mean that their ping count will slowly drop. If someone is completely outside of broadcast range, their ping count will drop more quickly.
- jchrisa 11y agoThis is similar to how direct stream digital audio (SACD) encodes with a 1 bit dac at 2.8 MHz bitrate. https://en.wikipedia.org/wiki/Direct_Stream_Digital https://en.wikipedia.org/wiki/Direct_Stream_Digital Cool tidbit: you can do the digital to analog for this with a low-pass filter.