You are being forwarded to the lastest updates ot his page!
Or you can Click Here if it doesn't work or you don't wish to wait.

game animation ( 2d )

rms360
dont know a lot about the subject, anyone have any info about...

ways to draw a game background?

ways to scroll / update background?

ways to draw characters onto background?

I've been playing around with a JFrame. I've been able to read a 2-dimensional array of 1s and 0s and then draw one image or another onto the JFrame. That makes the background. I can put that into a thread to keep the background updating. Scrolling and character drawing have stumped me.

Would I need to keep track of how much to offset the background, and repaint it at a different position ?

Thanks, sorry for the vagueness.


dranonymous
It sounds like you are trying to make some type of RPG where you wander around. If, so then you don't need a seperate thread, unless you want things to animate when the user isn't doing anything - ie stars blink or water to move etc.

Whats your overall goal? That will determine alot about how you set things up. Some different architectures could be -

- No threads, event driven based on user input
- Animation thread, event driven based on ....
- Timer based for computer / simulation thinking, turn based or not
- Main animation thread for animations and inputs

They are all pretty different and bring different types of issues with them.

HTH,
Aaron R>


Reup
Check out this free online book on Java Game programming techniques, which covers all of your questions (and many more)


rms360
Aaron - I was thinking about trying a Mario rip actually. Just something to play with. I'm not familiar with game/animation programming at all.

Ruben - thanks for the link, That helps.

Thanks both of you.