maggit
Joined 18 years ago
Joined 18 years ago
(Edit: Here it is! https://pwmarcz.pl/kaboom/ And the write-up: https://pwmarcz.pl/blog/kaboom/ )
This is similar in spirit to my take on the game: https://magnushoff.com/articles/minesweeper/
Unfortunately, not being familiar with SAT solvers, my implementation can grind to a halt in some configurations :)
The third buffer comes into play if you want to start working on the next frame _before_ the switch has occurred. So you start drawing in C, and if the right time should hit, the display system can still flip A and B. In this case, triple buffering gave you a head-start with drawing the frame in C.
Going further, if you complete the frame in C still before the A/B switch has happened, you queue up C as the next frame, instead of B. Then, you can start working on the next frame again in B. With this scheme, there is no sense in having more buffers than three.
Running code from the linked notebook (https://github.com/AdamScherlis/notebooks-python/blob/main/m...), I can see that a 32 bit representation of the number 3 decodes to the following float: 2.999999983422908
(This is from running `decode(encode(3, 32))`)
1. https://pharr.org/matt/blog/2018/04/18/ispc-origins
2. https://pharr.org/matt/blog/2018/04/19/ispc-volta-is-born
3. https://pharr.org/matt/blog/2018/04/20/ispc-volta-going-all-...
4. https://pharr.org/matt/blog/2018/04/21/ispc-volta-c-and-spmd
5. https://pharr.org/matt/blog/2018/04/22/ispc-volta-first-resu...
6. https://pharr.org/matt/blog/2018/04/23/ispc-volta-users-and-...
7. https://pharr.org/matt/blog/2018/04/25/ispc-volta-avx
8. https://pharr.org/matt/blog/2018/04/26/ispc-volta-more-on-pe...
9. https://pharr.org/matt/blog/2018/04/27/ispc-volta-open-sourc...
10. https://pharr.org/matt/blog/2018/04/28/ispc-talks-and-depart...
11. https://pharr.org/matt/blog/2018/04/29/ispc-retrospective
(More details here: https://support.apple.com/en-us/102149 )