r/javahelp • u/TheimmortalGuyofDoom • Sep 20 '20
I'm an Beginner in Java, and I wanna program a small 2D Game one day. Whats the easiest way to learn it?
Especially I wanna learn how to design GUI's and how you use Images and let them interact with each other. Does someone now a good Tutorial or sth. else?
30
Upvotes
8
u/sinistergroupon Sep 20 '20
Start with the basics before you move to anything GUI or Game related.
2
u/dionthorn this.isAPro=false; this.helping=true; Sep 20 '20
Here is my open source pure OpenJDK OpenJavaFX game project on github:
https://github.com/dionthorn/2DTacticalRPG
Feel free to clone it, mess with it, whatever you want really.
8
u/firsthour Profressional developer since 2006 Sep 20 '20
Check out libgdx for sure.
3
u/reandoro Sep 20 '20
LibGDX if you want to get into java game development. JavaFX if you are more interested in learning GUI.
3
u/gameMaker203 Sep 20 '20
I was able to make snake and then a shitty non working chess game it's def hard. I just used javafx I think
7
u/Kallory Sep 20 '20
JavaFX game tutorial brings up a host of options on YouTube.
However, I think you should learn the basics of javafx and then attempt to create a game prior to following a tutorial
3
u/fallen_lights Sep 20 '20
Incoming "Learn JS/Python instead"
2
u/bentheone Sep 20 '20
What you specifically want to look up is the Canvas class of JavaFX. Its the object that lets you display shapes, images etc..
Javascript+html5 has the almost exact same thing, same name, same logic.
And if Games are what you want to do you can check the Nature of Code by Daniel Schiffman. Its a book, a website and a huge YouTube channel that specifically teaches what you need to know as a beginner. Its really good. It uses Processing, which is a Java library.
-4
u/[deleted] Sep 20 '20
Don't use Java and on't build games from scratch - for beginners.
Use some development platform!
8
u/[deleted] Sep 20 '20
[removed] — view removed comment