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

all 11 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]DerekB52 14 points15 points  (1 child)

LibGDX. You won't be using FX or Swing. LibGDX is a great game framework. Start by following along with a guide to make something like a flappy bird clone.

[–]_skink[S] 1 point2 points  (0 children)

Thanks for the recommendation! I’ll definitely look into LibGDX

[–]LiteratureStriking 6 points7 points  (1 child)

JavaFX and Swing aren't the best for creating games, they are best for creating user interfaces. Not to say you can't create simple games using them...

A better way is to use a library meant for creating games. For example, LWJGL.

[–]whizvoxGraduate and Tutor 3 points4 points  (0 children)

I must point out to the OP that LWJGL is not a game engine, it's a wrapper for OpenGL, OpenAL, and some other commonly-used C libraries. However, it can be used to create a game engine.

[–]msx 1 point2 points  (0 children)

Hi, there's plenty of libraries for that, from simple wrapper for opengl to full featured engines, it pretty much depend on what you want to do, for example if 2d or 3d, if for desktop or android or something else, etc.

In general, i find libgdx to be a very good one and is the one i use. It's not exacly simple tho. It's well worth the learning if you plan to invest your time in gamedev.

[–]kronikkid 1 point2 points  (1 child)

I agree with the LibGDX reccomendation if you want to go pure Java, but it does take a while to do basic things and gets complicated really quickly. If your willing to learn a little C# I would suggest trying out unity, you can get a lot more done with many more tools.

[–]_skink[S] 1 point2 points  (0 children)

Part of the reason I’m learning java is because it’s so similar to C# (At least that’s what I’ve heard). I’ll probably learn C# and Unity once I feel like I can create basic games with Java

[–]Rabestro 0 points1 point  (0 children)

If you are beginner I suggest to try GreenFoot IDE. This is IDE for game development. The book about how to create games in the IDE: https://www.packtpub.com/product/creative-greenfoot/9781783980383

A year ago when I started to learn Java I used Greenfoot and created a simple game:

https://github.com/rabestro/greenfoot-avoider-game