Jump to content
  • Advertisement
Sign in to follow this  

The Great Graphics Mystery.....

This topic is 2101 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

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.



Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

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...

Edited by Karsten_

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!