Hello everyone, i’m thinking about going into game programming. I have never programmed a game before, but have programmed in java for a year (even though I still consider myself a beginner). My question is, do you guys think I should focus on a swing-based framework for gaming or skip that and jump into some of the opengl bindings available for java, such as jogl?.
Thanks.
My suggestion for you is to get into Java2D first.
However, the first steps of making a game isn’t the programming.
There are few questions you need to answer to yourself:
- What kind of a game is it?
- What is the story/plot of the game?
- In what enviroment will the game take place?
- What are the interactions between the game and the user?
And then you need to some design work:
- Game and map layout
- Decide on what units will be in the game, and what their purpose is
- User interface (what information the user will see)
Making a game isn’t just the programming, in fact in some cases it’s the easiest part. Graphics and audio are the most time-consuming part.
Check out this space-invaders game, it got me started:
Thank for the tips…this site will definately be useful
Yes, start with Java2D first. Eventhough you will get sick of it eventually, it’ll be a great help to learning game programming with a graphical representation of whats going on.
Looking back, I have asked myself these same questions.
“Why didn’t I just go straight to OpenGL? Why was I so reluctant to learn BufferedImages and rastering? Why didn’t I even go straight to 3D?”
Because as I slowly evolve my game that started in Java2D and is ending in LWJGL 3D, I realize one important detail: I never would have understood all these more advanced concepts if I hadn’t had past knowledge to base all this new stuff on. One thing that is great about Java and I think not so good about C++ is that programming constants and practices have for the most part been preserved in every Sun class as well as 3rd party ones. This makes it usually very easy to pick up someone else’s code and understand it (which I highly recommend doing).
Java2D will help you learn things that will let you move beyond it eventually. Perhaps don’t switch so many times while in the middle of making one project (oops, looks like I messed that up), but do small projects to teach yourself as you progress along.
I recommend checking out http://www.kevinglass.com/ (Kev’s website) because you can see from all his work that he has learned by doing exactly that. Slowly build up.