Jump to content
  • Advertisement
Sign in to follow this  
Zaxx

[java] Centering the player

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

If I draw to the screen every frame how would I centrer over the player? I tried the translate() method but the screen doesn't stay centred over the player and it leaves "afterimages" of things drawn in the last frame. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Which way are you drawing the image, are you double buffering? Using BufferStrategy? Overriding the Pain() method?

Share this post


Link to post
Share on other sites
I'm double buffering and using active rendering. I'm not overiding the paint() method (I think).

My animation framework is based on a tutorial found at <http://fivedots.coe.psu.ac.th/~ad/jg/ch1/ch1.pdf>, which is linked from <http://fivedots.coe.psu.ac.th/~ad/jg/>.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!