Jump to content

View more

Image of the Day

#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

The Great Graphics Mystery.....

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Spawn_Kcb   Members   


Posted 21 October 2013 - 04:57 AM

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.



#2 krinosx   Members   


Posted 21 October 2013 - 06:05 AM

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.

#3 Glass_Knife   Moderators   


Posted 21 October 2013 - 04:51 PM

Also, these should help get you up and running:





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

#4 Karsten_   Members   


Posted 21 October 2013 - 05:03 PM

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_, 21 October 2013 - 05:05 PM.

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.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.