Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

this is very impressive, how is this done? the executable is only a few hundred KB and it runs for me, wasm is doing the magic here but I don't know too much about how the process works.

I added -I/usr/include/SDL2 to build.sh, made sure wasm-ld is in place, and it builds and runs smoothly.



It's a simple software rasterizer. If you're interested in writing your own, I've written a tutorial explaining the basics. https://magcius.github.io/xplain/article/rast1.html


Also look at the source for original Quake (https://github.com/id-Software/Quake), one of the last pure software-rasterizing AAA 3D PC games. Michael Abrash's Graphics Programming Black Book (https://github.com/jagregory/abrash-black-book) explains many of the critical parts of the rendering pipeline.

By the way, quake.exe for DOS was 404,480 bytes.


Nice website. Looking forward to the next rasterization article!


Actually, there is already rast2 article: https://magcius.github.io/xplain/article/rast2.html. Also there is the menu article: https://magcius.github.io/xplain/article/menu.html.


FYI, these are unfinished, and I have no plans to work on this series again.


Unfortunately, repository https://github.com/magcius/xplain is archived and the latest update is from 5 years ago.




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

Search: