I looked around at the articles and whatnot, and I haven’t found much that will get me anywhere. Are there any engines/libraries that are good and well-documented for me to start with? I’ve just finished reading a few books on the language and I’m pretty fond of it. Some helpful guidance would be appreciated.
It’s hard to answer this type of question, since there are about a million different ways to get started. There is no one single correct way to go about it.
I’d recommend starting out in Processing, which is built on top of Java but uses a simplified syntax that makes it easy to get something visual and interactive up and running. Learn the basic syntax, learn about objects, etc.
From there you can “graduate” to Java, and there are several libraries worth checking out: LWJGL, libGDX, JMonkeyEngine, and JOGL are probably the most popular. Google is your friend.
Be patient. Start small. Make Pong. Go from there.
Shameless self-promotion: I’ve written a series of tutorials geared towards walking a novice through the process of learning how to program, available here.
Can recommend Processing. Especially since version 3 just came out, it has some nifty things: https://vimeo.com/140600280
Hey, Processing! I’ve heard of that before, from Raven Kwok (http://ravenkwok.com/skyline/), he’s done some amazing art using it. I’ll give it a try. Hopefully it won’t contradict what I’ve been reading about. Thanks for the points you gave there, KevinWorkman.
Personally I started years ago with Runescape private servers, which were incredibly fun to work on, lol. Most bases you’ll find for that are poorly done and may teach you bad habits, but it may also help you to recognize and avoid those mistakes in the future. If you’re not a fan of the RS scene, maybe there’s another java game you’ve played that has a private server community?
If not, try to make simple games such as Snake for example. Use an IDE - I recommend Eclipse. Up to you if you want to try using a library like Libgdx; setting it up and learning the documentation may over-complicate things for you since you’re just starting out, though.
But it should simplify things, as that is its purpose (once you get to the top of the learning curve).
Hi
When you feel comfortable with Java itself and after having created some 2D games, I advise you to look at JogAmp(JOGL, JOAL, JOCL) and JogAmp’s Ardor3D Continuation.
Just thought I’d throw in a vote for JavaFX and plain ol’ Java 8 here…
Cas
Ah yes, good ol’ Gradle; the bane of many a LibGDX “newbie” on this forum for whatever reason If you don’t use LibGDX because you can’t figure out how the Gradle build system works, then I would recommend going back and trying again! Dependency management/build systems make deploying/moving projects around easy as pie and are very powerful. Just spend a couple hours going over the basics of Gradle and I guarantee you’ll understand it!
first set your environment
1.- learn how to use java
2.- Canvas, Jframe, threads, POO in general
3.- learn the parts that make a videogame, colisions, physics, game loop, sprite, etc
4.- read books only the parts you are interested, leave 3D games for now
5.- try to render a picture in the screen, after that, try to move that picture with the keys
6.- you can watch videos in youtube about the issue
7.- use plain java first, after that you might use a framework or library
8.- keep reading about games
9.- ask in the forum
I would go straight to using libraries like JavaFX or LibGDX. That’s what I did, but maybe it isn’t suitable for everyone.
I found that ForeignGuyMike’s youtube tutorials were the perfect learning platform for myself, but I knew Java pretty well by the time I watched them. Check out this video, he shows you what the series will end up creating right at the start. It uses native Java APIs (apart from the sound effects later in the series) and leaves you with a decent first game engine to continue learning with later.
I’m with princec!
JavaFX is the main graphics system now for Java, and has many benefits over AWT/Swing/Java2D.
I’d start with “JavaFX for Dummies” (the best written presentation of several I’ve tried, actually), and get to the chapter on Animation/Bouncing Balls as soon as you get past the basics. Lowe’s “the hard way” is to be preferred and is not at all hard.
I know Swing pretty well. Are there any advantages to picking up JavaFX for someone who knows Swing inside and out?
I was (am) an expert in Swing, and it works just fine at making rather dry and boring applications and the API is much more mature. JavaFX however makes a bunch of stuff easier (specifically, graphics, animation and effects) and certainly potentially a lot prettier. It’s still at the stage of occasionally coming up against incomplete APIs and occasional bugs, unlike Swing which is by now very robust and complete indeed. However as all further development effort looks like it’s going to go into JavaFX from now on it’s maybe a good time to jump on the bandwagon.
From the perspective of making games, JavaFX beats Swing hands down, as all the stuff you want to do all works great and most importantly it’s consistently fast. I don’t think it’d be as fast as using custom made OpenGL-based engines but it wins hands down on ease-of-use.
Cas
Let me get something straight here… the creator of LWJGL prefers JavaFX to LWJGL?
I think if you are the creator of something and are being susceptible about (instead of shun yourself away from) all the things around you, and never let your ego be in your way, then you can be realistic and objectively estimate the usefulness of your creation in certain situations and usecases.
In fact, when you develop something like a library/framework, you would really want to know every other library in that same and adjacent domains to get the most impression and inspiration from those other libraries as possible and to position/scope yourself correctly in the sweet spot (usecases where others are lacking support for).
This enables you to recommend things to people that really suit those people, instead of always recommending your own creation.
And this is because you know that you would damage yourself and the reputation of your creation far more by recommending it to people who then themselves eventually find that it is non-fitting to their needs, than being honest and saying: “Well, it does not suit your needs. Maybe you should try XYZ instead.”
In the case of LWJGL, the strange thing that happened a few times on the forum is that recommending people NOT to use LWJGL but instead LibGDX or JMonkeyEngine (because what they wanted to make was a real game), made them even MORE wanting to use LWJGL.
So, simply be honest about what you do and why you do it, and try not to recommend others to use something when there are much better alternatives that those people would benefit more from.
That of course requires that you be on the constant lookout for things.
- Don’t just think about making the game look amazing, because if it only runs 20~ fps then people wont play it
- Check out how games prior to 1990’s were created since they done some nifty things to push out performance from very slow consoles
I agree with you but if a developer makes a very simple game, maybe he will never have any performance problem anyway. It’s possible to make a game look amazing but simple, isn’t it?
I’m not sure that their nifty things are still relevant now (some of them still are), it depends on what you mean exactly.
Two things… I kickstarted LWJGL way back in 2001 or something when Java graphics/sound performance was miserably rubbish and not hardware accelerated. Since then, others have taken LWJGL and made it into something much more mature, and Java itself is now awesome. JavaFX is highly accelerated.
And secondly, it’s not at all an apples to apples comparison. JavaFX is an entire framework for building highly interactive rich client applications… LWJGL is a very thin wrapper over some native libraries, by and large. JavaFX could well be implemented using LWJGL.
If I were to make a new game from scratch today, I’d be seriously considering first whether I could get the performance I want out of JavaFX before deciding whether to go totally bespoke. As it happens, I’ve got a pretty neat bespoke system already which does everything I want, just not quite so easily as JavaFX. Although it is ultimately somewhat faster at certain things and some things it can’t do at all (eg. SVG rendering).
Cas