6 ms·
Writing Java game applets was what got me started in software development back in the late 90's. Game development in Java was always a huge challenge for severa
by le-mark 9y ago
Writing Java game applets was what got me started in software development back in the late 90's. Game development in Java was always a huge challenge for several reasons; perceived (and real) slowness, slow startup, distribution, etc.... But putting a game in a web page anyone could play was really cool back then (to me at least). Lwjgl was always one of the marquee projects. The lack of value types[1] in Java has always been a hindrance, in particular when doing vector math calculations for physics simulations. And now all these years later, Java still doesn't have them. It's been many years since I've checked, but once there were several gifted indie game developers using Java, Notch being the biggest success story from that scene. Other than Minecraft, I've not heard of any popular games implemented in Java, has there been any?
[1] https://en.wikipedia.org/wiki/Project_Valhalla_(Java_language) https://en.wikipedia.org/wiki/Project_Valhalla_(Java_languag...
- Asooka 9y agoThe coolest thing I ever did was bundle native libs for Linux, OSX and Windows in an applet, that let me access OpenGL in a Java applet years before WebGL was a thing. We had the technology to do real 3d-accelerated graphics in a type-safe jit-compiled language with a great IDE 15 years ago already.
- _pdp_ 9y agoIt is good that it is now dead in the name of security.
- bilbo0s 9y agoJava is dead in the browser... same as flash, or c or any other language. At least until the nightmare that is WebAssembly comes to fruition. That said... the potential to exploit security holes via GL library calls is, unfortunately, alive and well even with WebGL.
- Jaepa 9y agoFlash isn't dead yet, through its dying for sure. The only positive thing of unfortunately likely EME is it may put another nail in the coffin.
- pjmlp 9y agoIt bet WebAssembly will bring all those plugins back to life.
- izym 9y agoHow would WebAssembly ever do that?
- pjmlp 9y agoEasy, it is just a matter of creating a compiler backend for Java, Flash, Silverlight that target WebAssembly instead of their original bytecodes, then bundle it with their own runtime compiled via emscripten. There are already a few projects doing exactly that. One could even create a ActiveX compliant library, that via emscripten would be able to target WebAssembly.
- jackmott 9y agolack of value types makes many games a pain in the ass to do performantly. basically anyone thinking they might want to use Java could use Monogame instead and have a much better time.
- idobai 9y agomono and .net are no better at such situations. also, if you want value types, there is scala.
- eropple 9y agoI've used both libgdx/LWJGL and MonoGame extensively. They're both fine. MonoGame has its own set of problems (a byzantine build systems, spotty platform support, etc.). Practically, not having value types is not really the kind of problem you'd expect it to be. Cache coherence with something like Mono or the JVM is less of a priority (nice-to-have but let's be real here) and a bunch of arrays of primitives looks uglier than C# structs but it mostly comes out in the wash.
- klodolph 9y agoThere are still a number of indie devs using Java, as far as I can tell the vast majority using LWJGL. When game jams come around I'll play maybe 100 games that other participants made, and a small but respectable chunk will be JAR files (maybe 10 of those 100?). It might even be the second most popular way to make indie games, after Unity. Depends on how you count "indie" games.
- lfowles 9y agoCan't forget Runescape, especially since you mentioned putting a game in a web page anyone could play.
- deleted 9y ago[deleted]
- gntheprogrammer 9y agoThis probably does not qualify as "popular game", but talking about Java games I'd like to mention Terasology (https://github.com/MovingBlocks/Terasology https://github.com/MovingBlocks/Terasology). It's an open source voxel game (Minecraft-like) and the LWJGL-based graphics engine looks very impressive to me (some screenshots here: http://terasology.org/gallery.html http://terasology.org/gallery.html).
- aaron-lebo 9y agoIt also performs horribly on a modern Windows PC with a 1070 (wanting to make sure I'm not slandering the game, just double checked with reduced settings, still barely runs). That performance (along with Mincraft's) convinced me personally the JVM isn't a place you want to build a game like that.
- ecshafer 9y agoJava, not the jvm may be the issue here. Look at the X10 language for example, which focuses more on array, parallel and numerical performance, but is on the jvm. The issue with Java for voxels is that Java does not have fortran arrays. It because nested objects, so that will give a lot of performance hits for a game built entirely on ndimensional arrays.
- benjaminjackman 9y agoThat's pretty true for stuff like that you want to use sideways arrays typically, where you decompose the fields in your object to each be in their own array (and sometimes recursively if the fields are themselves objects). With that and avoiding allocation (aka cache invalidation / garbage generation) at all costs you can get things fast.
- usrusr 9y agoThe java ecosystem offers annotation driven bytecode mangling/generation tools for all kinds of stuff, is there something for "sideways arrays"? The compiler plugin model used by immutables.org (generate a bunch of implementations for the fields implied by an interface) could hopefully make that relatively painless to work with.
- open_bear 9y agoStarsector is quite performant Java-based 2d space merchant sim. It shows a lot of visual effects and does a lot of processing in the background.