Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I recently startet to programm some basic OpenGL stuff in Java, but OpenGL and DirectX is to much to handle and to understand for me and i'm getting bored really fast. Now i am wondering if there are other possibilities than OpenGL (or DirectX) to make simple 2D graphics and to get started in Game Development, even if its limited. I will probably use OpenGL anyway when i am more experienced.

share|improve this question
add comment

5 Answers

up vote 12 down vote accepted

There is also the library Slick which provides the most common features for developing 2D games (images, animations, sounds, gameloop...). It has the advantage over the Java 2D library to be more specific to video games as it includes collisions checking and a physics engine.

share|improve this answer
3  
Slick wraps OpenGl and hides the "hard stuff" –  David Young Aug 18 '10 at 14:26
    
Slick is a great library and I highly recommend it. Unlike many game engines which force you to do things their way Slick gets out of your way and let's you focus on getting things done. –  Alex Schearer Aug 18 '10 at 18:40
    
I will definitely try this, it seems really good –  Simiil Aug 20 '10 at 11:43
    
I highly recommend Slick –  Bryan Denny Aug 26 '10 at 16:55
add comment

Of course! Java has a built in Java 2D library which requires no OpenGL or DirectX knowledge, and I highly recommend starting with it! In fact, it has pretty okay performance.

The essential starting point is to define your own class which extends Frame (or Applet), and then override the paint(Graphics g) method and use g to draw to the screen.

share|improve this answer
1  
Indeed, nothing wrong with Java 2D. Just cast g to Graphics2D though, or you'll throw away all the things that make it good. –  Bart van Heukelom Sep 7 '10 at 20:01
    
I like this answer (+1) because it suggests a pure-Java solution that doesn't require any third-party libraries that have non-Java components (e.g., such as those written and compiled in ASM/C/C++). –  Randolf Richardson Jun 12 '11 at 21:05
    
Yep, which makes it 100% portable (cross-platform), stable (since the Java 2D library has presumably been better tested than many of the 3rd party libraries out there), well-supported, and easy to develop and deploy. I also recommend the book "Developing Games in Java" by David Brackeen; in it, he develops a software 3D engine using only Java 2D, and the book of course explains it step-by-step including the math involved and the decisions and optimizations made along the way. It's very impressive and broken down so it's easy to understand. –  Ricket Jun 13 '11 at 2:17
add comment

Why don't you simply use Swing or Awt for a start (for 2D)? If you correclty design your game (I mean, a well though MVC design), you will be able to upgrage your game with a better game display engine later. The main goal, if you're working alone, is to quickly achieve to have something displayed on the screen, is'nt it ? It boosts your enthusiasm ...

share|improve this answer
add comment

Not exactly intended for games, but Processing is quite popular for 2D canvas graphics, it might be interesting to check.

share|improve this answer
add comment

Try basic canvas libraries if you are looking to develop just 2D games. I actually learn't to use 2D canvas by building a game on it right about the time this question was posted :) Now I am graduating to webGL.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.