Hacker News new | past | comments | ask | show | jobs | submit login

Reminds me of another piece of magic I used to use during my Amiga demo days. Infinite Bobs. A Bob was a BlitterObject, a graphic rendered by the hardware, not dissimilar to a sprites.

People would try many things to render as many Bobs as possible.

https://www.youtube.com/watch?v=eDQTxbudvDg

At some point the infinite bob demo appeared (I couldn't find a video for this). Seemingly endless sprites rendered on the screen - all moving, with no slowdown. As a 15 year old programmer learning to code demos in assembly I was very confused, how was it done?

I did eventually (after many hours spent in devpac disassembling code) work it out. They were not rendering infinite bobs, they were rendering one!

If you create three screen buffers. On the first screen buffer draw the bob at position (x,y), then switch to the second buffer draw at (x+delta,y+delta), then switch to the third buffer and draw at (x+delta,y+delta) and then repeat the cycle through the buffers as you move the bob.

If you switch between the buffers on the vsync (50/60hz) then the difference between where you drew the bobs appears like movement. You can draw out infinitely complex patterns and make it look like you're rendering millions of bobs!

Happy days.




That Phenomena demo in the youtube video that you linked to is actually a very clever display of the infinite bob trick. It is just so convincing that it is, still, difficult to spot it.


Dear deity that music made me nostalgic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: