Skip to main content
gamedev.net
🔒 Locked

[java] 2D Game

Started by denebo 2 replies 1.8k views
Original Post
denebo
denebo
I want to start writing a 2D game in Java. I just started learning Java, but it'll be no problem since I know C++ and C# already.
I've seen some 2D game libraries for Java, but I don't really feel like using one. I'd like to make my own game from scratch using either AWT or Swing.

Which one should I use? Both perhaps?
I know AWT is outdated, but I don't know if it'll be better for game programming for any reason.
You guys tell me :)
Erik Rufelt
Erik Rufelt
Do you want to run it as an applet in a web-browser, or as a stand-alone program?
Is it supposed to be a full-screen game or at least a game where the whole window is a double-buffered image, or do you want it to work together with GUI elements like menus and buttons?
Do you want to use Java image-classes to draw sprites, or do you just want a surface to manipulate pixels in?
denebo
denebo
I want it to be an Applet.
I'd like to use Java to draw the sprites (I suppose there's simple image manipulation? For color keys, etc.)
If I use a GUI I'd like to create it myself... I don't think I'd like to use the default Swing GUI objects in a game :P it won't look too good.
Erik Rufelt
Erik Rufelt
Yes there are easy ways to load and draw images. You should be able to find tutorials to start with using Google. Swing might be a bit better, as it has built-in double-buffering so you can skip that part.
Try for example http://zetcode.com/tutorials/javagamestutorial/.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.