
LWJGL: Lightweight Java Game Library 3 - mabynogy
https://www.lwjgl.org/
======
le-mark
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_languag...](https://en.wikipedia.org/wiki/Project_Valhalla_\(Java_language\))

~~~
jackmott
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.

~~~
eropple
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.

------
didibus
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,
hopefully in java 9 they add value types, etc. All to say, I think more people
should look into the JVM as a platform for the future.

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

~~~
roryisok
Minecraft?

------
westoncb
For any unfamiliar, this is the library Minecraft was originally built on.
I've used it to develop some graphically intensive programming tools myself,
and have always been pleased.

------
mooman219
We've all heard the poor story with Java in regards to performance, and the
arguments for/against it, so I'm not going to dwell on that. A significant
amount of work is being done on the GPU now more than ever anyway.

At least in my experience, I've had a great deal of fun working with LWJGL and
it is a pleasure to use. It's very unopinionated and doesn't try to force you
into any sort of specific structure. On top of that, Java + LWJGL hide a
significant portion of the cross-platform mess that you inherently see in this
field. No matter where you stand on the issue, setting up a project to build
and run cross platform, and managing its dependencies is a pain point in
C/C++. Add a trivial maven configuration once and you're good to go the
majority of the time. Having a mature package manager is also something that
you shouldn't ignore.

No one should shy away from writing a game if all they're familiar with is
Java/some JVM language. It's a gradient between choosing the right tool for
the job and premature optimization. Here's a video of what looks to be a dead
project, but still serves as a decent tech demo of a nice looking game running
on the JVM
[https://www.youtube.com/watch?v=eM_bABrFERs](https://www.youtube.com/watch?v=eM_bABrFERs)
.

------
and0
I got into software development through a LWJGL project, and it changed my
life.

~~~
Yhippa
Serious? If so I'd love to hear the story.

~~~
and0
I had a crazy idea re: a multiplayer roguelike engine that would be
scriptable. It was a pipe-dream, mostly due to my skill level, and I abandoned
it after using it as a hobby for roughly 3 years when it became clear it
needed a massive rewrite. However attempting it taught me an insane amount OOP
and modern development practices. The Java client rendered with LWJGL, and it
was very easy to start playing with basic concepts for graphics and voxel
worlds. Without the ease of LWJGL the project wouldn't have taken off at all.

I went from doing general IT to being a professional software developer, and
the first thing I ever starting coding was that engine.

------
AJRF
Is there any good books or tutorials on how to get started in games
development? I would love to take it as a hobby but the tutorial scene is so
saturated I find it hard to cut through the chaff, so it would be nice if
someone from this community could recommended a good starting place.

~~~
jackmott
handmade hero. [https://handmadehero.org/](https://handmadehero.org/)

~~~
skocznymroczny
I wouldn't recommend handmade hero, especially to someone who's just getting
started. First two weeks of handmade hero could be skipped by just using SDL,
rather than rolling out Windows specific windowing, rendering and audio.

------
mobiletelephone
Great library, particularly for beginners who have done a Java 101 course. But
why is it being posted now?

~~~
Tostino
Because version 3 just got released.

~~~
solarkraft
Has it not been a while?

~~~
aw3c2
A year ago.

------
ww520
Is there a way to use LWJGL for mobile games?

~~~
solarkraft
Absolutely. A somewhat higher level library building on lwjgl (2) called
libgdx has good documentation and examples on it - The Google Pixel live
wallpapers (3D models of places, with some parallax effect) are written using
it. There is also a framework called flixel building on top of libgdx, which
also has demos for Android.

~~~
sangnoir
I think Ingress (by Niantic Labs) is a more prominent project using LibGDX

------
fifilapew
Worth checking out LibGDX if you're i to Java game dev also.

