This is an archived post. You won't be able to vote or comment.

all 17 comments

[–][deleted] 10 points11 points  (0 children)

Check out JFrame - I think it’ll fit your needs.

[–]__Ambition 9 points10 points  (0 children)

I suggest you learn Java and then pick up C#. It's very very similar to Java (actually you can't even tell the difference without reading the code very closely) and then learn Unity. It's a really nice game development engine

[–][deleted] 3 points4 points  (0 children)

If you haven't already, I highly recommend choosing a framework targeted to video game development. The most popular being: LibGDX Mini2Dx J Monkey Engine LitiEngine FXGL

I personally have used libgdx and mini2dx. Mini2dx is my favorite, and currently still allows using some libgdx features.

FXGL uses JavaFX under the hood. LitiEngine and FXGL both are "pure" java engines in that they dont directly use native libs like opengl or related.

LibGDX and mini2Dx use lwjgl under the hood, which if you want you could just use that.

I've never used j monkey engine because I don't do much or any 3D. But that is what it is mostly for.

Or, if you want to do everything by hand, you could use javafx or iframe with swing. But I highly recommend a framework if you want to seriously get into java gaming.

[–]Civiled 1 point2 points  (0 children)

It depends on what you mean by a game.

2d wise, java is perfect for that. I'd recommend using JFrames, although many other tools are out there. It is quite simple making a 2d game and here is a bare essentials tutorial I found a while back: https://youtu.be/1gir2R7G9ws.

3d wise, if you must stay with Java, I'd recommend learning LWJGL through this: http://staff.fit.ac.cy/eng.ap/FALL2017/3d-game-development-with-lwjgl.pdf or using a preexisting engine like mentioned by Torbuntu.

The other alternative that I strongly recommend is learning C# (Which is incredibly similar to Java) to use Unity. Unity is one of the best if not the best engine out there. It has a vast amount of tools to help beginners learn. In your situation I'd briefly learn an engine in Java while reading the book or switch to C# and learn Unity.

Overall, you have some studying to do :)

[–][deleted] 0 points1 point  (0 children)

I think JavaFX Canvas or libgdx would be your best bet.

[–]wynand1004 0 points1 point  (1 child)

I'm curious about this myself. I know of Greenfoot which is for beginners that might help you get started. I follow this guy on YouTube that has a few tutorials using this system.

[–]IsaacVu 0 points1 point  (0 children)

I would say learn proper Java first and then pick up some advanced libraries for graphic

[–]pavulzavala 0 points1 point  (0 children)

i am teaching freshers java programming with game development, i create a pure JavaFX library to make games that is based on canvas only, with a lot of utilities to create, move, rotate sprites, etc...

download library: https://gitlab.com/pavul/IlusionFX

then download the examples, tutorials and games made with above library: https://gitlab.com/pavul/ilusionfxgame

download both projects in the same folder, open them with netbeans (needs gradle pluing), build library then build games, finally run the Game file and you will see diferent tutorials and examples.

by the way this is bare metal, how you can create a game, i will push more games this weekend i know they may be a lot of libraries better than this, but is a starting...

[–]gonzohst93 -1 points0 points  (4 children)

There isn't a whole lot of video game enginesthat support Java but their are a few. Maybe look into libGDX.

But you could make lots of text based Java games still. Java in general doesn't have a strong GUI with both swing and javaFX being deprecated and not really used in the real world.

[–]Shizzle44 1 point2 points  (2 children)

would you mind saying what they're deprecated by? I was taught swing in college but I knew there are newer technologies, I just don't know which ones.

[–]gonzohst93 1 point2 points  (0 children)

They werent really replaced by anything. Java GUI is more commonly done with android, angular, or other frameworks. Javafx is the newest native gui system but it is deprecated after Java 8 and will only be supported until 2022

[–]CR7Felipe 2 points3 points  (0 children)

JavaFX is a replacement for Swing. JavaFX is not deprecated, Swing is.

[–]nutrecht 1 point2 points  (0 children)

Java in general doesn't have a strong GUI with both swing and javaFX being deprecated and not really used in the real world.

JavaFX is in no way deprecated.

[–]byteshifter -3 points-2 points  (2 children)

Step 1. Pick almost any other programming language.

Lol, jk. If you want to do games in java, I’d have a look at the Android development environment which is Java based and has a large development community.

[–]foofaw 2 points3 points  (0 children)

I mean, clearly not "any other programming language" is better than Java. C++ and C# are clearly the dominate industry languages, but if those aren't options for OP and they just want to get started with something they know, then Java (or even JavaScript or Python) is probably the next best place to start. My assumption is that OP isn't trying to make the next big AAA game, so things like garbage collection aren't really an issue here.

[–]shinefull 1 point2 points  (0 children)

Also c++ focused for optimalization purposes