Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Very simple C# graphics question

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 johnmarinelli   Members   

304
Like
0Likes
Like

Posted 05 April 2013 - 11:17 AM

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, 05 April 2013 - 11:19 AM.


#2 Álvaro   Members   

20912
Like
2Likes
Like

Posted 05 April 2013 - 11:54 AM

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#.

#3 slicer4ever   GDNet+   

6661
Like
0Likes
Like

Posted 05 April 2013 - 12:19 PM

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?

Edited by slicer4ever, 05 April 2013 - 12:20 PM.

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

#4 3Ddreamer   Members   

3826
Like
0Likes
Like

Posted 05 April 2013 - 08:44 PM

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, 05 April 2013 - 08:46 PM.

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





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.