Very simple C# graphics question

Started by
2 comments, last by 3Ddreamer 11 years ago

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.

Advertisement
The standard technique to get rid of flickering is called "double buffering". A quick Google search gave me this: http://msdn.microsoft.com/en-us/library/3t7htc9c.aspx

Disclaimer: I don't know the first thing about C#.
your going to need to show us how your rendering your game(unless someone whom is familiar with windows forms knows of this problem?)

edit: or as Alvaro mentioned your not double buffering?
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

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.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

This topic is closed to new replies.

Advertisement