开发者

Painted Shapes are Flashy and Jumpy when Repainting?

开发者 https://www.devze.com 2023-03-19 06:23 出处:网络
I m开发者_开发技巧ade an Applet that paints shapes in the Windows, then each frame, I make them go down to simulate Basic Gravity but the shape flashes alot ( Which is unwanted ) And I couldn\'t find

I m开发者_开发技巧ade an Applet that paints shapes in the Windows, then each frame, I make them go down to simulate Basic Gravity but the shape flashes alot ( Which is unwanted ) And I couldn't find a way to make it Smooth. I don't mind slight lag for Smooth Graphics.


Sounds like you're about to discover double buffering: http://en.wikipedia.org/wiki/Multiple_buffering#Double_buffering_in_computer_graphics

For help implementing it in Java: http://download.oracle.com/javase/tutorial/extra/fullscreen/doublebuf.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号