Graphics tearing in VM Emulator

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Graphics tearing in VM Emulator

FilipK
Hi,

I tried to write some simple Space Invaders clone in Jack programming language. I have working simple bitmap implementation and keyboard handling for moving right and left.

My problem is in redrawing screen, it flickers very much. I tried to repaint only small part of the screen, but it doesn't help much. In typical desktop applications or game, this problem is solved with double buffering, one buffer for actual frame and second "backbuffer" for building next frame.

I have no idea how to implement this in Jack, because I didn't seen any way to sync with screen refresh. It is possible with Jack to achieve this?

Thanks a lot
Filip
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Graphics tearing in VM Emulator

cadet1620
Administrator
I don't think that there is any way to synchronize the screen activity.  

You definitely want to do as little painting as possible.  I found that a short delay loop between each rendering of a moving object helped a bit.

--Mark
Loading...