
Show HN: An open source WebGL renderer in 300 lines of JavaScript with 30 maps - aaron-lebo
https://comanche3d.com/
======
aaron-lebo
Hey HN,

I've been inspired by Michael Fogelman's Craft [1] and other links around here
over the years to learn more about 3d graphics programming. comanche has been
my path to learning. It can currently render 30 different maps - 29 of them
were reverse engineered by Sebastian Macke [2] from the game Comanche (1992).
There's no actual relation to the game, I just remember playing it as a kid
and the file format is convenient (two pngs, one representing height, the
other color). There is a lone map by me.

The goal is to build an actual game, but the focus will always be to have very
readable source so that others can learn from it. I've written a blog post
further describing the goals behind it as well as discussing the basics of
graphics programming and the advantage of using WebGL [3]. There are plenty of
links to resources for further learning and the post also includes links to 8
other projects in various languages (lisp, Go, Rust, C++, and Nim) in various
states of completion.

Happy to accept questions, contributions, or (gulp) critiques. There's not a
lot of optimization going on (some basic culling), but it should run fine on a
modern GPU (though it did not run on my mobile phone). Some of the maps are
smaller, should that help. It's not super impressive, but hopefully you find
it interesting. Thanks!

1\. [https://github.com/fogleman/Craft](https://github.com/fogleman/Craft)

2\.
[https://github.com/s-macke/VoxelSpace](https://github.com/s-macke/VoxelSpace)

3\. [http://lebo.io/2018/04/03/a-webgl-
renderer.html](http://lebo.io/2018/04/03/a-webgl-renderer.html)

source: [https://github.com/aaron-lebo/comanche](https://github.com/aaron-
lebo/comanche)

~~~
dgarud
What are the browser requirements? I got error - cant load webgl2.

~~~
aaron-lebo
It runs fine on Firefox 59 on Ubuntu. What are you running? I've done limited
testing.

Thanks.

