|
|
|
|
|
by ggambetta
883 days ago
|
|
That's pretty impressive. The main difficulty with reflections in the ZX Spectrum is not so much the limited color palette, which can be dealt with, but the 2-color limit per 8x8 block. It's already a big issue with just lights and shadows as it is :-/ |
|
Well, you impressed me (and others) with your simple bet that "hey, what if I simply choose the two most popular colors" and just code that in simple BASIC. The same could be done with the shading. It would probably pick a good compromise when bright yellow meets dark red: by choosing to have the few should-be-red pixels become yellow, you avoid a bigger obviously-square-grid-based clash of colors.
Next step: error diffusion dithering would IMHO be a good bet. But maybe that becomes really to much for Basic.
I've been considering doing Raytracing on the Amstrad CPC, but in C. Perhaps using integers only, for speed.
Done that instead: https://cpcitor.itch.io/just-get-9
Hey, found this https://bbcmic.ro/?t=9ctpk via "BBC BASIC raytracer in 432 characters (mastodon.me.uk)" https://news.ycombinator.com/item?id=39023056#39023768