Really nice looking impl in JS, though I'd add that doing perlin noise over a limited grid is a pretty limited subset of what Minecraft does. Minecraft's terrain generator does a couple of passes (last I read about this, things may have changed) that generates cave systems, the surface level topography, forests, etc. http://notch.tumblr.com/post/3746989361/terrain-generation-p... Still, definitely a cool project.
MineCraftWebGL
11–20 of 59 posts
Re: MineCraftWebGL
#12Re: MineCraftWebGL
#13Nice, but it seems to busy wait: my CPU is pegged at 50% even when I am not doing anything.
Re: MineCraftWebGL
#14Re: MineCraftWebGL
#15Nice, but it seems to busy wait: my CPU is pegged at 50% even when I am not doing anything.
Re: MineCraftWebGL
#16Nice, but it seems to busy wait: my CPU is pegged at 50% even when I am not doing anything.
Last I looked, the vector math part of 3D wasn't handled by webGL, this uses Three.js to handle that, and looks to be the main bottleneck. Until you can do matrix/vector math using hardware, webGL is pretty much useless.
[1] http://metaphysicaldeveloper.wordpress.com/2011/12/20/implem...
Re: MineCraftWebGL
#17Earlier quoted context omitted.
Last I looked, the vector math part of 3D wasn't handled by webGL, this uses Three.js to handle that, and looks to be the main bottleneck. Until you can do matrix/vector math using hardware, webGL is pretty much useless.
That is pretty much about right. I wrote a bit about the implementation[1], and the discussion went over how to optimize this (including, but not limited to, using shaders to do the drawing and not relying on Three.js so much). [1] http://metaphysicaldeveloper.wordpress.com/2011/12/20/implem...
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=644389
[2] http://www.altdevblogaday.com/2012/06/18/bringing-simd-accel...
Re: MineCraftWebGL
#18Nice, but it seems to busy wait: my CPU is pegged at 50% even when I am not doing anything.
Last I looked, the vector math part of 3D wasn't handled by webGL, this uses Three.js to handle that, and looks to be the main bottleneck. Until you can do matrix/vector math using hardware, webGL is pretty much useless.
Modern matrix libraries like glMatrix
https://github.com/toji/gl-matrix
use typed arrays effectively to do very fast matrix and vector math in JS. A modern JS engine can transform such code into something very efficient, more than fast enough to do things like even first person shooters.
Re: MineCraftWebGL
#19Re: MineCraftWebGL
#20It makes me sad when cool things like this don't support keyboard layouts other than QWERTY