The Great Graphics Mystery.....

Started by
2 comments, last by kop0113 10 years, 6 months ago

Hello All,

This is going to sound like a REALLY strange post but....

I am a professional C#/VB .NET developer, working with both desktop and web applications, who is looking to brush on up on his Java skills by writing an RPG.

Now I have had a look around, read some tutorials etc. and it all seems fairly straight forward (Building player objects, state machines, basic game loop logic etc.) however, is there somewhere I could look for a GOOD explanation of the big black box that is GRAPHICS.

In my day job I don't really use graphics as such, or if I do they are simply static images for decorative purposes, so I have never really given it much thought. We where never taught about them in any real fashion at University either.

Basically at the moment I have a state machine machine with the various game state classes etc all ready to start testing and building up. I have a JFrame and a extended JPanel to draw on....but I have no idea how I join A to B.

As I said this may sound strange but I am just stumped. This doesn't have to a beginners level tutorial or anything just one with good code samples that show the principles behind the process.

Thanks for the help and apologies if I have put this in the wrong place.

Kevin

Advertisement

May I suggest a book?

Killer Java Game Programming: ( http://fivedots.coe.psu.ac.th/~ad/jg/ )

this book will help you to understand the basic concepts of java drawing, how to manage a game loop in java and will build your knowledge about Java programming step by step.

I am also a programmer, I live by codding for about 12 years now, and I still love the 'JKGP' book a lot.

The most chapters are free on that site ( fivedots.coe.psu.ac.th ) so you can give it a try.

Hope it helps.

KrinosX

Also, these should help get you up and running:

http://www.gamedev.net/page/resources/_/technical/general-programming/java-games-active-rendering-r2418

http://www.gamedev.net/page/resources/_/technical/general-programming/java-games-keyboard-and-mouse-r2439

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

Since you mentioned that you have been programming for a while the following might give you the clue you need.

Once you have your drawing frame or canvas prepared just iterate through all the objects in your game and call update / draw on them (passing in some sort of reference to the paint system). You then need to trigger another repaint (probably through some sort of Java timer). This is effectively then the game loop

In this same loop you do things like query key presses, set new positions for each game object based on gameplay etc...

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

This topic is closed to new replies.

Advertisement