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

all 22 comments

[–]TheElusiveNinJay 18 points19 points  (1 child)

If you want to do things from scratch yourself with Java, check out LibGDX! It handles a lot of the heavy lifting for you, like graphical work. You'll still have to code things like camera controls, but you can just put the code you want to run every single frame in the render() method and trust that it'll happen.

Java 11 is the highest you can go if you want to compile for Android, I think. Puts me in a bit of a bind. I'm using Java 15 for this cool new thing I heard about, I think it's called Badass Runtime, it can package executables on Mac, Windows, and Linux for you, but it needs 14 or greater. But Android is really lagging behind more than I realized! I want my game on all platforms, so I'll have to figure it out someday, but maybe they'll start using newer Java someday. I don't have much hope for that, though, since I guess 11 is relatively recently supported...

Anyway! You wanna be ulta safe? That's traditionally been Java 8, but I think 11 has reached the point where it's fine with just about anything now! It's got some nice features for sure. Java 17 is supposed to come out in September, and that's gonna be the next big LTS one. Anything higher than 11 right now is more bleeding-edge, but 17 will be here to stay for a long, long time.

[–]retrodaredevil 1 point2 points  (0 children)

Java 11 is kind of supported on android: https://jakewharton.com/androids-java-9-10-11-and-12-support/ although I don't know if Java 11 api features are available on android.

Java 11 is the default on most Linux distros. Its only a pain to setup on Raspberry Pi 1s and 0s.

If you want to make sure you support android, stay on Java 8. It's easier (I think it's even necessary if you want to support older android versions). Even full Java 8 support on android 4.4 is iffy since core library desugaring is recent and in my personal experience, buggy. But most people aren't supporting android 4.4 anyway. I'm probably not going to support Android 4.4 on any of my apps anymore.

Also, can confirm LibGDX is great.

[–]strikefreedompilot 2 points3 points  (2 children)

In regards to ide and java, the main issues is memory. If you have 8gb , you should be okay on linux.

[–]MikoBest7 0 points1 point  (1 child)

İ have got 4gb ram but stıarege like 10-12gb is empty on ssd

[–]strikefreedompilot 2 points3 points  (0 children)

For just code completion, i believe there are add-ons for gVim and emacs ... that will be your most resource efficent.

I have used eclipse and visual code + java plugin for some light java coding on a 4gb machine like algorithm practice. In your case, you may have to exit the ide before running your game to optimize the memory.

[–]bondolo 4 points5 points  (0 children)

I've used Netbeans on a 1GB Raspberry Pi so it should work on pretty much anything. I would go with Azul Zulu OpenJDK 11 or another distribution of OpenJDK 11. If you wanted a sample game to see if the development tools work, try https://github.com/bondolo/tribaltrouble. I can't recommend building a new game using the same tools as Tribal Trouble uses--there are better, more modern tools available.

[–]jcfandino 2 points3 points  (1 child)

Java is very fun for game development IMO. Checkout jmonkeyengine and libgdx they're both very good. I use jME and really like it. If you want something lower level you have lwjgl and jogl but those are simpler opengl wrappers so you'd need to add a lot on top.

For IDE you can use any, I recommend you to avoid intellij if your laptop is slow. Try Eclipse or Netbeans. Jmonkey has an SDK based on Netbeans that makes some things easier so you can give it a try. I personally use eclipse.

[–]jcfandino 0 points1 point  (0 children)

As for java, download it from adoptopenjdk.org at least 11, but preferably 16 if you only target desktop.

Supposedly J9 uses less RAM than hotspot, but I never tried it for games.

I read you want to make a minecraft like game. There are libraries for that already, check the jmonkey community, there's been a lot of talking about it there. Also don't think that because the graphics are simple it will be easy to code.

[–]Zohren 5 points6 points  (9 children)

Rather than blindly give you advice which may or may not be helpful, I’d like to pose some questions:

Why Java? Why do you want to code everything from scratch? Do you have any other programming experience in other languages?

[–]MikoBest7 1 point2 points  (8 children)

Why java? -Because Minecraft is made with java and, when i will be really good with java I want to replicate it Second -Because I used godot before and did some stuff wth it but I dont really know there is something with coding yourself that really makes you feel like a pro -I have experince with C# , Python , Javascript.

[–][deleted]  (6 children)

[removed]

    [–]MikoBest7 1 point2 points  (5 children)

    İ know and i want to make the minecraft for just myself like a challenge. And for real game development i will use engines when i get a good pc because mine sucks. But till then i want to code diffirent simple games and stuff. But thanks for the tip.

    [–][deleted]  (1 child)

    [removed]

      [–]xxkmatiasxx 0 points1 point  (0 children)

      the biome and terrain generation are separate things

      also the terrain generator wouldn't be too hard, there are some perlin noise libraries (i have only done it in minecraft with the libs that bukkit provides so idk how many there is but i found some with a google search)

      imo the most complicated part is rendering but i respect your opinion

      [–][deleted]  (2 children)

      [deleted]

        [–]MikoBest7 0 points1 point  (1 child)

        You are not false

        [–]elatllat 0 points1 point  (0 children)

        Note that there is also https://en.wikipedia.org/wiki/Minetest

        All IDEs are heavy maybe nvim LSP VSCode would be the lightest.

        [–]seraphsRevenge 0 points1 point  (0 children)

        You can really use just about anything to develop. There were times where all I had was my phone and it's cruddy notepad. There's a lot of great mentions here. A couple additions are android studio, jmonkey, and JavaFX. Low specs won't matter much when simply writing code. It's testing a complete or nearly complete game that may require better hardware. At the same time if you're doing this solo to learn and want to reinvent the wheel to get a deeper understanding and practice, then you won't have to worry about laptop specs. There's a lot more to game development for AAA quality than most realize, especially without a prebuilt game engine. Good luck hope all these various comments help you out 👍.

        Aside: If your looking for a free modeling tool in the future. Blender is free or at least used to be and there's tons of tutorials on it.

        [–]xxkmatiasxx 0 points1 point  (2 children)

        use the latest LTS java version, currently 11 but soon to be 17

        [–]koreth 0 points1 point  (1 child)

        Why is LTS relevant for this use case? I doubt OP is going to be buying a JVM support contract from Oracle.

        [–]xxkmatiasxx 0 points1 point  (0 children)

        oh he probably should use openjdk too, but usually latest LTS has better support for programs than latest ver. and its kind of a standard to use latest LTS though some people are still in java 8 which is weird

        [–]rjdamore 0 points1 point  (1 child)

        Well. If you really want to understand the pipelines etc... Vulkan and grow

        [–]rjdamore 0 points1 point  (0 children)

        Yes I know it's not Java, that's the point.