Sign in to follow this  
johnmarinelli

Very simple C# graphics question

Recommended Posts

Hi everyone,

 

I'm building a very simple game in C#.  However, it seems that for every few frames, the game "blinks".  I have read some material about saving the game screen as a Bitmap object to avoid this; however I'm not entirely sure how to implement this. 

 

So, how do I keep the screen from "blinking"? 

 

 

EDIT: just to clarify, I'm not using XNA - I'm using C# Windows Forms.

Edited by johnmarinelli

Share this post


Link to post
Share on other sites

Hi,

 

There is not enough information in the O.P.  Does this happen in the same way all the time or only at certain times?  Does it only happen when an object using the texture is in motion?  If the problem varies, then it might be useful to know when it is at the worst.  Does the problem persist when you have no texture in use? Does the test with no texture cause any change in this stuttering.  You should run tests to determine the texture file coding is the source of the issue.

 

If C# is not coded correctly, then it is prone in some cases to cause a game to stutter as memory data is handled automatically but clumsily.  If well coded, then C# can allow auto memory management to run smoothly but takes experience in when and how to code parenting and other points.

 

Bottom line is that your coding is in need of correction or optimization somewhere and the texture is not the cause. Coding may allow almost any image file, certainly all the more common ones.  Sure, try Bitmap, but you would be better as a programmer to understand how two or more different types of images files may be coded in your game.

Edited by 3Ddreamer

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