Java Game Programmer

Started by
9 comments, last by cmasupra 12 years, 3 months ago
Where would be a good place to start learning java game programming?
Advertisement
That all depends on how you define "good." In reality, there are a few good places to start. My personal suggestion is to start learning the language first. As a general rule of thumb, you should "start small and progress gradually." Once you know the language, you can start making simple text-based games (like card games, simple adventures, etc.). Then once you feel comfortable with the concepts, move on to graphics and, again, start simple. Print something to the screen, move it around using keys, etc. etc. I think it's pretty self explanatory.

Yo dawg, don't even trip.

I think nowadays java isn´t a language for games. I am currently running a project for a simple action game in java with AWT, and the main menu(only a few buttons) is rendered with 60 fps only! I would recommend C# or C++.

If you say: "But I want to learn Java" then you should start with the basics as boogyman said.
Furthermore you have to be really patiently cause noone just starts game programming. First comes normal programming.

I think nowadays java isn´t a language for games. I am currently running a project for a simple action game in java with AWT, and the main menu(only a few buttons) is rendered with 60 fps only!


Why not? Java isn't quite as popular as C++ in the game industry, sure, but let's not forget about Minecraft, for example. Minecraft is hugely successful and it's written in Java.

Also, why could you only get it to render at 60 FPS? This seems strange.
60 fps is plenty - users will not be able to see any visual difference above this frame rate. The frame rate is probably vsync capped anyway. Either way, it is not a conclusive argument against using Java for games.

Generally one does not use AWT for games (unless they are the kind that lend themselves particularly to such a "standard" GUI, or a prototype). There are many libraries or frameworks which allow you to use Java with something like OpenGL for rendering.
Java is the language used for Android apps (along with XML for the manifest file) -- I just started learning Java too, to eventually develop Android games.

Check out these tutorials from Oracle (the developers of the Java language, if I'm not mistaken). I'm using these, and it's coming along great. It helps to have a bit of background in some other language to use these tuts, though:

http://docs.oracle.com/javase/tutorial/

[quote name='IceBreaker23' timestamp='1325440029' post='4898711']
I think nowadays java isn´t a language for games. I am currently running a project for a simple action game in java with AWT, and the main menu(only a few buttons) is rendered with 60 fps only!


Why not? Java isn't quite as popular as C++ in the game industry, sure, but let's not forget about Minecraft, for example. Minecraft is hugely successful and it's written in Java.

Also, why could you only get it to render at 60 FPS? This seems strange.
[/quote]

That seemed weird to me too. I think the problem is that there are 5 images which are getting scaled real time. I need to improve this^^



60 fps is plenty - users will not be able to see any visual difference above this frame rate. The frame rate is probably vsync capped anyway. Either way, it is not a conclusive argument against using Java for games.

Generally one does not use AWT for games (unless they are the kind that lend themselves particularly to such a "standard" GUI, or a prototype). There are many libraries or frameworks which allow you to use Java with something like OpenGL for rendering.


We are only using AWT, because in our school we only learn standard java and I hope the performance of AWT does it.

We are only using AWT, because in our school we only learn standard java and I hope the performance of AWT does it.
[/quote]
That is OK. But it is not an excuse to claim "java isn´t a language for games", because that cannot logically follow from your experience* with a single API.

* [size=2]And not to be mean, but I could just as easily say "relative inexperience" here, as you are still learning.
I want to thank you guys for the replies. I know the language at about a novice level, and those are great examples for me to start. What I need help with are handling resources, such as sounds, images, 3D models, and loading and playing sounds. I already have input covered.

I think nowadays java isn´t a language for games. I am currently running a project for a simple action game in java with AWT, and the main menu(only a few buttons) is rendered with 60 fps only! I would recommend C# or C++.

If you say: "But I want to learn Java" then you should start with the basics as boogyman said.
Furthermore you have to be really patiently cause noone just starts game programming. First comes normal programming.

I find nothing wrong with java for games. The only difference I see in java and C/C++, is that java isn't officially supported on consoles, other than rumored performance differences.
I wrote a Zelda clone in Java using the "

Beginning Java SE 6 Game Programming" book by Harbour. It covers creating a 2D game engine in Java using Java2D. For a more detailed book with better error detection and better full screen performance check out the

"Developing Games in Java" Brakeen book. His website also has same code you can check out to get an idea of what you need to know. Finally, the most in depth and largest Java game programming book I have read and is "Killer Game Programming".

[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

This topic is closed to new replies.

Advertisement