4 ms·
I wrote a primitive 3D engine in high school, in qbasic. But this was before I knew linear algebra or the idea of z-buffers so it worked based on the math I kne
by InclinedPlane 13y ago
I wrote a primitive 3D engine in high school, in qbasic. But this was before I knew linear algebra or the idea of z-buffers so it worked based on the math I knew at the time, which ended up being fairly convoluted and a little buggy. And it achieved texture occlusion through drawing the closest shapes last. Also, it didn't have a buffer at all it just drew directly on the screen. It actually worked though, which I thought was pretty cool, but I can only imagine how I would judge the code today.
P.S. Oh man, I found it. OK, here's the code: http://pastebin.com/Hi2wYSmW http://pastebin.com/Hi2wYSmW and I think this is a data file for it: http://pastebin.com/eF1WuhVb http://pastebin.com/eF1WuhVb
Also, it looks like at some point I learned about z-buffers while writing the thing. I seem to have a couple different versions on backups.
For reference I wrote this when I was a teenager and it ran on a 286 (IBM PS/1).
- hippich 13y agoThis is VERY clean code :) Luckily, I do not have any of my code from that age available :)