Live data from Hacker News

LWJGL: Lightweight Java Game Library 3

lwjgl.org

41–50 of 67 posts

Re: LWJGL: Lightweight Java Game Library 3

#41
post #40

Earlier quoted context omitted.

It 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.

It has more to do with the quality of the programmers than with Java. Actually Java and the JVM are the heroes here, because the guys that took over after Notch, just wrote shitty code allocating several hundred MB per second on the game loop. Also the majority of Mincraft plugins are written by kids, whose understanding about how to write game code is nonexistent.

Yup. You can write very, very tight code without too much work using Java (I mean, look at financial companies). The programmers working on Minecraft, including Notch, were grinders, and it shows. That's not a criticism of the product; they shipped. But they never really dug out of that hole.

Re: LWJGL: Lightweight Java Game Library 3

#42
post #5
post #2

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 al…

lack 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.

I'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.

Re: LWJGL: Lightweight Java Game Library 3

#43
post #40

Earlier quoted context omitted.

It 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.

It has more to do with the quality of the programmers than with Java. Actually Java and the JVM are the heroes here, because the guys that took over after Notch, just wrote shitty code allocating several hundred MB per second on the game loop. Also the majority of Mincraft plugins are written by kids, whose understanding about how to write game code is nonexistent.

You don't think it has anything to do with the abstraction and indirection levels that java operates at? Where are these well coded java games that look like something from this decade?

Re: LWJGL: Lightweight Java Game Library 3

#44
post #39
post #31

Now that the JVM is a multi-programming language platform, I hope things like this become more popular. Kotlin, Frege, Clojure, Fantom, Ceylon, JRuby, etc. There's a language for everyone. So building more value into the JVM with projects like that would be really great. The JVM is probably the most advance VM currently, and hopefully it'll just keep getting better, maybe faster startups with the new module system, h…

More popular? It's already used in the second most popular video game of all time.

[deleted]

Re: LWJGL: Lightweight Java Game Library 3

#45

Earlier quoted context omitted.

It 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.

Java, 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.

That'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.

Re: LWJGL: Lightweight Java Game Library 3

#46
post #43
post #40

Earlier quoted context omitted.

It has more to do with the quality of the programmers than with Java. Actually Java and the JVM are the heroes here, because the guys that took over after Notch, just wrote shitty code allocating several hundred MB per second on the game loop. Also the majority of Mincraft plugins are written by kids, whose understanding about how to write game code is nonexistent.

You don't think it has anything to do with the abstraction and indirection levels that java operates at? Where are these well coded java games that look like something from this decade?

Good Java programmers are better payed to write High Performance Trading systems, than working on games with their low salaries and crazy schedules.

Yes, there are some performance issues regarding lack of value types, but not every single game is going to be the next Crysis.

Yet it appears by some in the game community that if language X cannot be used for doing Crysis than it is not worth it, let alone that most likely they will never finish their game.

Unity's runtime is a fossilized version of Mono, with much more performance issues than OpenJDK, yet indies flock to them.

Only because they are deeply committed "to all or nothing", in what concerns advancing the status of doing game development in .NET. Since they created their own AOT compiler (IL2CPP) they have even started to port sub-components from C++ to C#.

Re: LWJGL: Lightweight Java Game Library 3

#47
post #9

Is there a way to use LWJGL for mobile games?

You would want to use LibGDX which allows you to develop for mobile using a LWJGL backend (if you feel like it) and then simply publishing to Android or iOS.

I've been using LibGDX for a small little thing, and honestly can't recommend it. I had the app for a few years, and whenever I wanted to update things after a few months, so many things would just break. Be it the build-system, the APIs, RoboVM or some randoms project settings - it was always a headache to get it running again. When RoboVM shut down, there wasn't even any clear way to get it running on iOS again for a while, leaving me with an undeployable app.

If you're investing into anything serious, I would strongly recommend going with Unity over this.

Re: LWJGL: Lightweight Java Game Library 3

#48
post #31

Now that the JVM is a multi-programming language platform, I hope things like this become more popular. Kotlin, Frege, Clojure, Fantom, Ceylon, JRuby, etc. There's a language for everyone. So building more value into the JVM with projects like that would be really great. The JVM is probably the most advance VM currently, and hopefully it'll just keep getting better, maybe faster startups with the new module system, h…

I'm not sure the JVM is the most advanced. the CLR has parity for the vast majority of JVM features and has historically had the jump on the JVM with generics, async etc

Re: LWJGL: Lightweight Java Game Library 3

#49
post #46
post #43

Earlier quoted context omitted.

You don't think it has anything to do with the abstraction and indirection levels that java operates at? Where are these well coded java games that look like something from this decade?

Good Java programmers are better payed to write High Performance Trading systems, than working on games with their low salaries and crazy schedules. Yes, there are some performance issues regarding lack of value types, but not every single game is going to be the next Crysis. Yet it appears by some in the game community that if language X cannot be used for doing Crysis than it is not worth it, let alone that most li…

Unity 2017.1 includes an updated version of Mono supporting .NET 4.6. Still experimental at the moment, but coming out of the deep freeze that it has been in for a while.

Re: LWJGL: Lightweight Java Game Library 3

#50
post #39
post #31

Now that the JVM is a multi-programming language platform, I hope things like this become more popular. Kotlin, Frege, Clojure, Fantom, Ceylon, JRuby, etc. There's a language for everyone. So building more value into the JVM with projects like that would be really great. The JVM is probably the most advance VM currently, and hopefully it'll just keep getting better, maybe faster startups with the new module system, h…

More popular? It's already used in the second most popular video game of all time.

Minecraft?
Post reply on HN