Jump to content
  • Advertisement
Sign in to follow this  

Java Game Programming Library

This topic is 5079 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to write a wrapper library for programming games in Java. I know it is already simple enough in Java, but certain concepts such as threading, main loops, etc. are confusing to Java beginners. If I write this class, it is not to write good games with, it is for beginners to learn. What sort of things should I abstract from the user? I want this class to be able to write a spaceshooter.

Share this post

Link to post
Share on other sites
Games are very possible to write in java, it may be worth getting hold of the java2d api, sun's description:

"The Java 2D API is a set of classes for advanced 2D graphics and imaging, encompassing line art, text, and images in a single comprehensive model. The API provides extensive support for image compositing and alpha channel images, a set of classes to provide accurate color space definition and conversion, and a rich set of display-oriented imaging operators. "

Also in your description you do not seem overly confident with writing a main game loop. It may be worth going back to basics to cover some more object orientated tutorals, and a few tutorials on threads, these aren't necessarily difficult topics if you are shown how to do them propperly.

My recomendation is to buy yourself:
"Beginning Java 2: SDK 1.4 Edition" -- Ivor Horton

When i was beginning java i used this book and i swear by it to date, it is an excellent book for taching a lot of the basics very well, the author then gets on to making you do what you haev been taught at the end of the chapter, which is invaluable in learning a language. This book covers the likes of threads and applications which will contain main function loops and the like.

This is not a games book, however it is an enjoyable read (if you have a twisted mind like i have) and if you work through it you will learn the language solidly enough to approach a problem like the one you have mentioned.

Classes i'd include (bearing in mind i love objects, Input manager (key/mouseListeners), spacecraft/asteriod class (for an asteriod like game), maybe a projectile class for when you come to collision detection, a background manager, screen manager.
One other idea i'd implement in this is use a jFrame, make it fullscreen and you will have acess to both the awt, and swing libraries for menu's ??

If any of the last paragraph looks rubbish, it could be, it is 2am and i need sleep...

All the best with the idea, and let me know how it goes!


-- oh pants have i just missed the point completely ?? i'm not sure what you meant now... I think i've jsut completely missed the point... I definately need sleep!!

Share this post

Link to post
Share on other sites
Guest Anonymous Poster

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!