How do I learn to start Game Programming In Java (Or any language)
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: Fedora at home, Ubuntu 10.04 at work
Posts: 88
Rep:
How do I learn to start Game Programming In Java (Or any language)
Hi there,
I have a reasonable level of programming experience, mainly in Java through a 200 level University course. But we have only ever designed things like sorting algorithms and data structures.
I would love to start to learn game programming, just to make some basic 2D and maybe somedy 3D games remeniscent of my childhood Amiga games. I really don't know how to move from programming concepts to moving graphics and accepting key inputs. Can anyone please tell me what I need to start researching/reading up about? Point me in the direction of some tutorials? I would be using Eclipse on Linux.
I have been reading around 'http://wiki.gamedev.net' but it doesn't say how to get from "Hello World" type things to actual games.
I would happily learn another language if it is going to be more beneficial.
For 2D stuff, you can do anything from using X widgets (or better still GTK2 widgets for portability) to generating html pages for rendering (see the project "nowhere else and beyond").
If you do it in Java, it will be portable - you just have to learn enough Java to be able to render your images before you start.
Also, look through source of various free and open source games from side-scrolling shooters to cell-based RPGs.
The 3D stuff almost invariably uses a "rendering engine" for the graphics, something else for sound, maybe something else again for physics, and since the internet is so popular, many games have a network layer too.
For examples of 3D engines, have a look at the OGRE project and also Crystal Space. There are actually numerous engines to choose from and people have made interfaces to all sorts of languages.
When you find you can read through the source code for an existing game and actually understand it, then you can set off on your own.
For simple 2D games Pygame seems ideal and can really do a lot of the leg work for you. I have to admit I am very much still a learner but even I managed to create a dodgy skiing game over a few evenings.
All you need is python, the SDL stuff, pygame and gedit.
SDL and C++ seem to be working for me with the help of a book by Alan Thorn called
"Games programming" it shows just enough so to get started on a small cross-platform
puzzle game that can be expanded out into something decent later on.
Just visit Sun and download their javadoc as well as their jave tutorial(s). In order to make any use of java3D, it is vital that you are comfortable with 2D and AWT/Swing first.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.