3 ms·
Can anyone recommend something similar but with more code comments?
by WalterGR 9y ago
Can anyone recommend something similar but with more code comments?
- rileyphone 9y agohttps://github.com/antirez/kilo https://github.com/antirez/kilo A text editor by the guy that made redis, in less than 1000 lines and a lot of comments.
- pls2halp 9y agoThere’s also a tutorial to build kilo at https://viewsourcecode.org/snaptoken/ https://viewsourcecode.org/snaptoken/
- s-macke 9y agoVery similar technique (raycasting), but for different type of data. https://github.com/s-macke/VoxelSpace https://github.com/s-macke/VoxelSpace The text in the README describes the technique very well. The JavaScript code is a little bit more complicated to read because most of the source contains the usual organizational tasks around the algorithm (initialization, keyboard input, ...). But this is also true for the provided C-code of this article.
- PyComfy 9y agohttp://lodev.org/cgtutor/raycasting.html http://lodev.org/cgtutor/raycasting.html ~200 LOC
- simias 9y agoI wrote a similar code a few years ago, although it also supported textures (including ground and skybox, unlike the original Wolfenstein). I don't know if it'll be more to your taste but there are afew comments: https://bitbucket.org/simias/wolf/src/873cad46f3c8281e7d94293b21af3c72e831d860/wolf.c?at=default&fileviewer=file-view-default https://bitbucket.org/simias/wolf/src/873cad46f3c8281e7d9429... the magic happens in wolf_horizontal_intersect. Note that I use fixed point which obfuscates the arithmetic a bit (I was targeting an embedded platform without hard float at the time). It looks like this while running: https://svkt.org/~simias/misc/wolf-floor.png https://svkt.org/~simias/misc/wolf-floor.png That being said if you're interested in writing something like that I recommend that you use any basic tutorial on raycasting and try implementing it "from scratch" yourself, it's pretty simple and quite fun IMO. IIRC I used this one: http://lodev.org/cgtutor/raycasting.html http://lodev.org/cgtutor/raycasting.html
- diimdeep 9y agoPlease add Readme with few words about project.
- dejv 9y agoNot really better documented, but still great gem to read: https://github.com/fogleman/Craft https://github.com/fogleman/Craft
- buzzier 9y agoTiny Renderer or how OpenGL works: software rendering in 500 lines of code https://github.com/ssloy/tinyrenderer https://github.com/ssloy/tinyrenderer
- Entalpi 9y agoI am writing a rendering engine that I try to keep minimal and clean while having some cool computer graphics stuff in it. Although it is in modern C++. :-) It uses a deferred rendering pipeline and currently I am trying to get light volumes to work. https://github.com/Entalpi/MeineKraft https://github.com/Entalpi/MeineKraft
- glouwbug 9y agoThats a very interesting name for your project
- ahuth 9y agoBiased because it's my own, but here's one in Javascript and React: https://github.com/ahuth/raycast https://github.com/ahuth/raycast.