22 ms·
Cool stuff! It looks like you're just rendering plain cubes, I'd be curious to see how much performance could be had by doing things the same as Minecraft (bat
by rileya 15y ago
Cool stuff!
It looks like you're just rendering plain cubes, I'd be curious to see how much performance could be had by doing things the same as Minecraft (batching only the visible surfaces into larger 'chunk' meshes). I've been interested in WebGL for a while, and it'd be interesting to see how practical Javascript is for a fairly CPU-intensive game like Minecraft.
I've always thought Minecraft was an interesting programming challenge (I made a little clone of my own a while back (with portals, for whatever reason): http://www.youtube.com/watch?v=Qk_KjtbHUIs http://www.youtube.com/watch?v=Qk_KjtbHUIs).
- DanielRibeiro 15y agoWow, your minecraft portal implementation looks amazing! If you open source it, please let me know.
- rileya 15y agoThanks! It's not the prettiest of code, but it's up on my github: https://github.com/RileyA/VoxelsAndPortals https://github.com/RileyA/VoxelsAndPortals
- yogrish 15y agoI too would like to see the performance improvement if he enables back face culling.
- BlackAura 15y agoI doubt there would be one. On modern graphics hardware, backface culling is done by the hardware itself. It would help if this demo were anywhere close to the limits of the hardware, which it isn't. Instead, it's likely to be limited by the JavaScript code that runs it. Backface culling wouldn't help here. riyela is probably referring to the way Minecraft itself draws the world. If you have a solid block floating in free space, Minecraft draws all six faces of that block. However, if you have two solid blocks touching, Minecraft doesn't bother drawing the faces between them. It only draws the faces that are exposed to air (and are, therefore, visible), so it doesn't need to draw nearly as many faces. That should get a decent performance improvement.