New on java game developing!

Hi guys! i’m studying java in school, and i started it to fullfill my dreams to create videogames!
I think that now i know enough to start learn something about that, so i googled something and i downloaded LWJGL.
Is a good way to start?

Nope! Learn the language first, then come back and learn Java2D. It’s a simple high level graphics library that is perfect for newbies! LWJGL is very advanced, and relies heavily on math and low level functions.

But I have to strongly encourage you not to worry about game development for at least a couple of months. Learn the basics first, programming is a very confusing subject to learn and trying to learn game dev on top will only ruin your experience! Trust me, I see it all the time.

i’m programming since last year, before in c++, this year i started java!

You have multiple options. It’s really up to you which you choose, but I’ll offer some advice.
[h2]Option 1:[/h2] Start off by using Java2D (Swing & AWT). In my opinion this is the easiest way to start. Whether you’re familiar with Swing or not, I’d definitely recommend to start this way. You’ll easily be able to learn about the core concepts of game development: the game loop, collision detection, collision response, etc. The downside of using Java2D however is that it’s slow for content-rich games and doesn’t offer you too much flexibility, for example you can’t use it for Android game development.
[h2]Option 2:[/h2] Start off by using a game engine, preferrably built on top of LWJGL. This is probably the hardest way to start and is not recommended. There are a few decent game engines. For 2D games you can use: Slick2D, LibGDX, MERCury and many more. Of those, LibGDX is most recommended as you can use it to develop Desktop and Android games, however it’s quite advanced and is difficult to use. Some understanding of OpenGL is recommended before using a game engine.
[h2]Option 3:[/h2] Start off by using OpenGL. To do this you can use LWJGL or JOGL, though LWJGL is usually preferred. Learning OpenGL is difficult; it’s very difficult to get started, however once you progress it gets easier (well that’s what I’ve found). With OpenGL you have to be aware that there’s a lot of different versions and not too many graphics cards support the newest versions. It’s probably easiest to start off by learning the fixed function pipeline but it’s recommended that after maybe a month you should progress on to the programmable pipeline. Learning the programmable pipeline requires some understanding (though it can be learnt) of vector and matrix maths. The maths is probably the most difficult part, however once you learn it then everything makes a lot more sense.

Conclusion: I recommend start off with Java2D then progressing to LWJGL. Before you start game development though, it’s required to have a good understanding of the language. You should at least know about concepts such as polymorphism and inheritance.

Time is only a number, it means almost nothing when looking at the experience of a programmer. I spent half a year learning C++ and knew next to nothing about programming because I was too caught up trying to lean game dev! If you feel confident, then look up Java2D, but I still encourage you not to until you’ve learned the basics.

@Troubleshoots I disagree with what you said about libGDx being difficult to use. For me, LibGDx was the easiest thing to work with. The wiki and dermetfan tell you everything you need to know. I would almost refer to it as Java2D on steroids. :wink:

Got it! We are starting to studying Swing those days, so i’ll try to watch java2d, but for now… i’ll wait! :smiley:

Man I wish my school taught Java :’( I had to teach my self everything. So I will give you this piece of advice: If you don’t know how to do something, Google it. If Google doesn’t work, post here.

Remember: GOOGLE IS YOUR FRIEND

Good luck

My school teaches Java and the teacher does independent studies! Right now some of my friends are studying C# and XNA with the teacher, it’s really awesome! They are making a 3D game of some sort and right now they are working on collision detection. I can’t wait for next year, I want to take an independent study with him.

OP, Swing isn’t the same as Java2D just so you know!

Actually it’s a 5 year school, the first 2 years are the same for everybody, the last 3 years you can choose a specific address and i choose IT ;D

Um, no offense to anyone here but I wouldn’t be recommending your MERCury project as anything you should use to start off with, considering it’s still in development and not really up to the level of libgdx and other libraries (yet).

I’m not involved in the MERCury project. I just listed it to keep the OPs options open, after all, it’s usable for small projects.

This book was released free for digital format.

http://fivedots.coe.psu.ac.th/~ad/jg/

Its a bit outdated but it gave me a good background to start with.

I highly disagree with LibGDX being difficult to understand, it is probably the most high level library I have seen over the course of my 7-8 month learning Java, I started with LibGDX a month or so after I started to learn Java. So far it has taught me so much, I would say I am capable of making a clone of most popular games quite easily with ok looking code.

Ofc do not skip on learning more about the language, just recently I realised the awesomeness that is Enums to create State Machines, good for replacing the instanceof checks as well when dealing with polymorphable objects such as Entities.

Any tl;dr learn basic Java, get familiar with the API, especially the Math API :stuck_out_tongue: then if you feel “ok”, follow some tutorials, I recommend dermetfans youtube channel and also the LibGDX wiki is very well maintained. Do not forget Oracle documentation/tutorials as well as Tutorialspoint. All good sources.

Welcome and good luck!

A tip for learning Java: look into the sourcecode of basic Java classes.
In Eclipse and others you can link the sourcecode bundle of the standard API.
There you can look up thee classes actual implementation.

Its really helpful to see what the String class, or Hashtables do under the hood.
Also it can give you some hints how the “pros” organize their code and naming conventions.
And makes it feel less magic.

bro can you help me to create java game i nid simple game but i dont know how to start

I would recommend watching a tutorial on YouTube. Realtutsgml and thenewboston have good ones

Hi

Java2D is slow as is but it is about 5 times faster with GLG2D (based on JogAmp).

Any reliable and actively maintained Java binding for the OpenGL & OpenGL-ES APIs makes a nice job.

Slick2D seems to be almost abandoned, doesn’t it? I disagree about LibGDX and it isn’t a game engine anyway. You talk about some middle and high level APIs with which you can build a game engine or a game, they don’t do everything for you. When their abstractions are well designed and documented, they are easier to use than low level bindings because they lower the entry barrier. I agree with the end of your sentence, those notions are still valuable to understand what is wrong when it doesn’t work as expected.

Preferred? By who? You? Most of developers on JGO? On one hand, LWJGL shouldn’t be compared with JOGL, it should be compared with JogAmp (JOGL, JOAL, JOCL, …), I compare a car with another car, I don’t compare a car with a wheel. JogAmp contains a set of bindings like its competitor. If you can’t argue, don’t write such things. This is just a prejudice presented as a fact, something evident. I’m responsible for engine support and I would feel better if you stopped claiming that what I do is useless. Both projects are very active, there is nothing obvious.

Then, admit that it’s generally less difficult to get started with higher level solutions for somebody who starts from zero.

OK, i can’t really wait! :smiley:
i think i’m pretty good with Java to begin creating game, so I decided to buy a book to help me!
But i can’t make up my mind on those two:
http://www.amazon.com/Killer-Game-Programming-Andrew-Davison/dp/0596007302/ref=pd_bxgy_b_text_y#selectedObb=rbb_rbb_trigger
and
http://www.amazon.com/dp/1592730051/?tag=stackoverfl08-20

do you guys have any suggestions?

I have the first one, it’s OK and good enough to get you started, but both are rather outdated; I know Killer GP (2005) doesn’t cover modern techniques that have emerged, and can instill what are now bad practices. I’m guessing that the other one is even worse as its from 2003, over a decade ago! Concerning literature on technical, quickly evolving subjects, try to get books that are published as recently as possible.

That said, I don’t know your degree of programming skill, and one of these may be at just the right level for you.