Remix.run Logo
bombcar 3 days ago

Java really could have taken over the world, and it can be performant, too.

One of the versions of the most popular game in the world is written in Java, and it's quite capable of being very fast.

steve1977 2 days ago | parent | next [-]

Well this must have been around Java 1.2 or 1.4 IIRC, I'm not even sure if Hotspot was a a thing back then.

I just remember that GUI programming with Swing felt like molasses compared to native GUIs at that time (i.e. Win32/MFC, Cocoa, Motif).

But of course the cross-platform aspect was cool and since I did quite a bit with Solaris back then, Java got of course pushed a lot by Sun.

CyberDildonics 3 days ago | parent | prev [-]

Are you talking about minecraft? Minecraft was known for working only because it is so simple graphically compared to other games. It was said to allocate and deallocate hundreds of megabyte of memory every frame.

bombcar 2 days ago | parent [-]

Minecraft still runs, and it may look graphically simple but it's actually pretty complex (as it has millions of blocks in memory at any time and has to cull which to not render, etc).

Minecraft does do some horrible things to the JVM, but it's strong and can take it.

CyberDildonics a day ago | parent [-]

it may look graphically simple

Because it is graphically simple. That's not even a CPU issue.

millions of blocks in memory at any time and has to cull which to not render, etc).

128x128x128 is already 2 million voxels. Minecraft and any other game like that can use an octree or some variation to not individually deal with blocks. When things are in the distance or occluded or empty space you cull a courser level of the octree.

Java can be fast compared to scripting languages but I don't know why minecraft would be an example. It is a simple game that was poorly written and had to be re-written in C++ for other platforms. It got by on being simple and but running on full PCs at the same time.