Live data from Hacker News

Browsercraft: Java Minecraft in the browser

browsercraft.cheerpj.com

61–70 of 107 posts

Re: Browsercraft: Java Minecraft in the browser

#61

The fact I'm playing this at 20 FPS on Firefox with a RX 7600 shows how much web browsers have regressed in 10 years, not how much they've advanced.

Minecraft back in the day was a Java applet, so the game was running in a native JVM. This demo is running the game in a WebAssembly JVM, so performance is absolutely going to suffer. If the game were actually written for the web platform, it would perform significantly better.

Re: Browsercraft: Java Minecraft in the browser

#62

Funny enough, the original version of minecraft used to run in the browser too! It used Java applets. That was a long time ago, I remember playing it as a kid

Yes that's how notch was able to distribute it while circumventing publishers. Very smart move at the time.

Java Applets weren't some magical "workaround" for distributing without publishers, lots (well, subjective) of indie developers were distributing binaries via websites at the point of the first alphas of Minecraft. Of course, way more popular nowadays as there are dedicated platforms for it.

Re: Browsercraft: Java Minecraft in the browser

#63

Hi everybody, happy to see our CheerpJ demo is appreciated. CheerpJ is a WebAssembly-based JVM that can run unmodified Java 8 and Java 11 applications. Java 17 will be supported later in year. I am the lead developer of CheerpJ and CTO of Leaning Technologies. AMA.

Would it work for a JavaFX app? (not sure I'd be able to shrink the bundle size enough for it to make sense though)

Re: Browsercraft: Java Minecraft in the browser

#64
post #26

Earlier quoted context omitted.

If it had come out of Google or Microsoft maybe even Apple, the JRE would have been integrated into the browser much more efficiently and it would have been no slower than Javascript But I don't remember Applets being particularly slow even back then, if you had a decent internet connection and they were written by a decent SDE

I wrote a lot of applets back in the day for little graphics experiments and such, somewhat inspired by Ken Perlin's homepage[1]. I found that it's quite possible to make applets that load fast and run fast if you care about those things while building it and do some profiling. If you pull in hundreds of megabytes of libraries and trigger a GC every second then of course it will be slow. [1] https://mrl.cs.nyu.edu/~p…

Same. I built a lot of animations with applets back in the day and if you avoided dependencies (other than what ships with the JVM) and your code wasn't ridiculous, you could get some pretty damn good performance out of it (minus initial load time which did tend to be suboptimal, but manageable). Applets were a pain in many ways but I think the tech gets blamed unfairly for bad performance.

Re: Browsercraft: Java Minecraft in the browser

#65

Funny enough, the original version of minecraft used to run in the browser too! It used Java applets. That was a long time ago, I remember playing it as a kid

I got into Minecraft via 4chan, of all places. People used to make posts about it and how cool it was and others would naturally talk crap about the game.

Re: Browsercraft: Java Minecraft in the browser

#66

The fact I'm playing this at 20 FPS on Firefox with a RX 7600 shows how much web browsers have regressed in 10 years, not how much they've advanced.

I get similar performance in Chrome on my phone (Pixel 7a). Perhaps this just runs poorly in Firefox?

Re: Browsercraft: Java Minecraft in the browser

#67
post #63

Hi everybody, happy to see our CheerpJ demo is appreciated. CheerpJ is a WebAssembly-based JVM that can run unmodified Java 8 and Java 11 applications. Java 17 will be supported later in year. I am the lead developer of CheerpJ and CTO of Leaning Technologies. AMA.

Would it work for a JavaFX app? (not sure I'd be able to shrink the bundle size enough for it to make sense though)

JavaFX is not yet supported, but we plan to get it to work soon.

The issue here is that there is very little Java in JavaFX, it's mostly native C++ code. This makes it actually quite similar to the LWJGL library used by Minecraft.

Our plan is to use for JavaFX the same technology we have developed for LWJGL.

Re: Browsercraft: Java Minecraft in the browser

#68
post #48

Earlier quoted context omitted.

> Clicking the button below will download the client from mojang.com. By clicking it, you agree to the Minecraft EULA. It's literally just downloading the client from https://piston-data.mojang.com/v1/objects/4a2fac7504182a97dc... where mojang makes it publicly available. It's an older version so it's not linked on their website anymore, but you can find the same download link on the wiki: https://minecraft.wiki/w/Ja…

Lawyers and judges care about the overall effect of a thing, not the technical steps you take to make it happen. The overall effect is: Someone goes to your website, and plays Minecraft for free. Therefore you gave them the service of playing Minecraft for free. Which is illegal. The fact that the file comes from Microsoft's server is one of those "technicalities" that you've heard about some people sometimes, but no…

Start with suing the minecraft wiki then I guess

Also you should probably advice mojang to put some authentication on their download URLs, which have been publicly documented for more than a decade by now.

There is no login prompt. This project is over a year old. You are just misinterpreting the situation. This is like threatening to sue Mozilla because you can use Firefox to click on a download button, or Microsoft because double clicking on an exe on Windows runs the application.

Re: Browsercraft: Java Minecraft in the browser

#69
post #39

When I was in fourth grade, I'd take the half a mile walk to the library almost daily which always made my parents happy because they assumed I was going to read, but instead I was hopping onto their computers, going to http://minecraft.net , and playing minecraft on IE :) Thanks for the nostalgia

The longevity of Minecraft blows my mind. I was always aware of its existence but never looked into it. Now my kid is getting into it. So many generations of kids! It's incredible really. That said, it has been a little sad digging into the current state of Java vs Bedrock, Bedrock iPad vs Bedrock Switch. The platform ubiquity is wonderful and the tradeoffs are what they are. But if folks were able to create a touch-…

An interesting fact about Minecraft is that when it came out, storing the block IDs for the loaded area used up a big chunk of your computer's RAM and had to be optimized as much as possible. So it was 8 bits per block space, and when they expanded to 12 bits, they added on another array with 8 bits per 2 spaces.

Now, it doesn't even use block IDs any more. It uses one whole object per block type, one pointer to one of those objects per block space, and has a lot more block types. The on-disk format stores the entire string name of the block, once per 16x16x16 region it occurs in.

Re: Browsercraft: Java Minecraft in the browser

#70
post #62

Earlier quoted context omitted.

Yes that's how notch was able to distribute it while circumventing publishers. Very smart move at the time.

Java Applets weren't some magical "workaround" for distributing without publishers, lots (well, subjective) of indie developers were distributing binaries via websites at the point of the first alphas of Minecraft. Of course, way more popular nowadays as there are dedicated platforms for it.

the initial scope of minecraft was also in line with the java applet games of ~2005, like the ski simulator. minecraft came well after the applet era, almost to the end of the flash.

huh. Minecraft is the taylor swift of video games. the last big star before big tech took over discovery and access for an industry.

Post reply on HN