Hacker News new | ask | show | jobs
by mrspeaker 1590 days ago
I can't believe it's actually happening - I was resigned to the fact it was dead.

I once (4 years ago, sheesh) made a "Pure-JS, no-build-step-required Minecraft Thing": https://github.com/mrspeaker/webgl2-voxels

When I made it I needed to specify it "Requires ES6 modules and WebGL2 support." At the time I was sure WebGL2 was going to be widely available soon and that ES6 modules would probably never be supported!

5 comments

Wow! A simple 3D game in 425KB.

For me, google.com is 1.47MB. It makes you wonder what they put inside.

You got me wondering what was going on - 425Kb seemed pretty high. I imagined there would only be around 50K of non-compressed source code. Turns out the 200Kb+ culprit is the texture atlas I nabbed off the internet: https://github.com/mrspeaker/webgl2-voxels/blob/master/res/m... - I'm only using a handful of cells out of that, I should chop it!
This is not the world we wished for, but this is the world we deserve.
Nah, we don't deserve it. We just don't have a choice at this point until someone is capable of creating an alternative to JavaScript.
Nah, we don't deserve it. We just don't have a choice at this point until someone is capable of creating an alternative to JavaScript.

Didn't you mean "an alternative to Google?"

Don't blame the tool for the (lack of) craftsmanship.

It has nothing to do with Google and everything to do with JavaScript.
The issue isn’t JS. Sites are bloated because cheap/lazy/dont care. Also because ads are bloating and payload size isnmt really thought about much.
The issue is JavaScript unless you're talking about people that use BMP image format instead of JPG/SVG.
You are asking for an alternative for browsers and 30 years of evolution. Be careful what you wish for :)
Way too many abstractions.
You know what would be fun? Trying to program a bot to clear all the titles using the same interface as humans (WASD + Mouse + Vision). That could even be a competition.
That looks pretty simple. Is there anything you're doing that wouldn't be possible in WebGL 1?
Nothing at all - rewriting it for WebGL1 would be trivial (if you rely on OES_vertex_array_object being present). But really it was just me learning, and I naively assumed WebGL2.0 would be ready "any day now". The only non-supporting browser was Safari. That was 4+ years ago!
Thank you for sharing. Appears you did not pick a license - I'd recommend just releasing under MIT unless you have any particular preferences (it's a well-understood "do what you want" license that I believe is suitable for educational content).
Looks great!