Interactive Raycaster For the Commodore 64 Under 256 Bytes 143
New submitter Wisdom writes "1bir (1 Block Interactive Raycaster) is a simple ray casting engine implemented only in 254 bytes to run on a stock, unexpanded Commodore 64. The name comes from the fact that on a C64 floppy disk, 1 block is equivalent to 254 bytes stored on a disk sector. In 254 bytes, 1bir sets up the screen for drawing, creates sine and cosine tables for 256 brads based on a simple approximation, casts rays into a 2D map that lives inside the C64 KERNAL ROM, renders the screen in coordination with KERNAL, evaluates 8-way joystick input and detects collision against walls. The ray casting core employs a brute force algorithm to determine visible walls, while the mapping portion supports both open-ended (infinitely looped) and traditional, closed maps. The source code in 6502 assembly is available, with extensive comments. A YouTube video showcases 1bir in a detailed manner with both kind of maps and more information, while a Vimeo video presents a shorter demonstration."
(oblig) Better late than never (Score:4, Funny)
Good thing it only took him 30 years of development to come up with this. Had the software been around when I used a C64 (when they were the state of the art) I would probably still be looping around inside those maps.
Zip? (Score:5, Funny)
The source code is zipped. For a 254 byte program. This just tickles me for some reason.
Re:Real-work problem? (Score:5, Funny)
I work with an advanced robotics research firm that's trying to take humans out of fragile, disease-ridden bodies and put them in immortal robot bodies. Our project would allow humanity to transcend mortal existence, and it's quite difficult to find talented technical folks to join the team.
I appreciate your cool hobby project, I just wish you would use your not inconsiderable talents to work on something that has a more obvious long-term payoff.
Re:Zip? (Score:5, Funny)
The source code is zipped. For a 254 byte program. This just tickles me for some reason.
When you have a 300 baud modem on your C64 and Delphi Online charges by the minute, every last byte adds up!
Re:Bad link in summary (Score:5, Funny)
Will this run . . . (Score:4, Funny)
Will this run on my VIC-20?
Otherwise, meh.
Re:Optimization (Score:4, Funny)
Well spotted, I missed that one out. :-) Usual problem of looking at the same thing for so long, now it perplexes me how I missed such an easy one. :-)