Sign in to follow this  
jagguy

2d screen

Recommended Posts

i am using directX7 with c++. i have found that if you write all sprites and static background to backbuffer before display the screen flickers badly, what is the norm for 2D game display? you dont need to erase any sprites like this as the whole screen is re-drawn is it more of a standard to display a background once then display a sprite move and erase in a loop....?

Share this post


Link to post
Share on other sites
Quote:
Original post by jagguy
i have found that if you write all sprites and static background to backbuffer before display the screen flickers badly, what is the norm for 2D game display?
Are you sure that you're rendering to a back(!)buffer? The hole point of using one is to eliminate flickering, compared to writing directly to the front buffer, so at worst you'll experience tearing. If the problem is tearing then I suggest that you enable vsync manually since many "advanced" players like to tweak such settings themselves.

Quote:
Original post by jagguy
is it more of a standard to display a background once then display a sprite move and erase in a loop....?
It used to be but nowadays it's rarely worth the effort. Some effects, such as paralax scrolling, are close to impossible to optimize with such a scheme anyway.
There's still some exceptional cases around though. So if you're doing software rendering in a high resolution with mostly static backgrounds and you expect the user to be running other programs in the background it might be a good idea (think Tetris).

Share this post


Link to post
Share on other sites
i believe i am using a backbuffer correctly ( i will check again). if i display the background once and move a sprite i dont get a flicker but an image trail that hasnt been erased.

its only when i display a background each frame that this happens

Share this post


Link to post
Share on other sites
[quote]Original post by Armadon

the window flickers but it doesnt flicker if i display the background image once and just draw and erase on the background image in a loop for animation.

nothing to do with vsync

[Edited by - jagguy on February 16, 2005 3:22:12 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this