Skip to main content
GameDev.net gamedev.net
🔒 Locked

[.net] XNA: MyFirstGame flickers

Started by bullnakke Jan 26, 2008 at 7:41 AM 10 replies 4.5k views
Original Post
bullnakke
bullnakke
Hi I've compiled the code from the MyFirstGame tutorial (http://msdn2.microsoft.com/en-us/library/bb203893.aspx) and it flickers. The sprite I'm using is 64 x 64 pixels so that shouldn't cause any problems. I've searched for a solution and I've tried setting SynchronizeWithVerticalRetrace = false; in the constructor as someone suggested but it didn't help. Running the game in full screen doesn't help either. I'm running this on a gaming laptop, Dell XPS M1710, that doesn't have problems running any other game. Can anyone help me out? I really wanna make a game but the flickering is downing my motivation :-(
gharen2
gharen2
Disabling vsync won't stop flickering. If anything, it'll make things worse by adding tearing, as the rate the game redraws the screen doesn't match the rate that the monitor refreshes.

You didn't alter the code in any way right?

I don't know what to suggest, except to say that there's no such things as a "gaming laptop", especially one that's also a Dell. Laptops are notorious for poor graphics support, and there's a reason Dells are so cheap :)
Chrono1081
Chrono1081
A guy who is beside me at the moment worked for Dell for 12 years and refuses to ever buy a dell. If you want a laptop capable of running games take a look at Asus or for more power a hypersonic those are both great. (oops sorry for going off on a tangent!)
bullnakke
bullnakke
Quote:
Original post by gharen2
Disabling vsync won't stop flickering. If anything, it'll make things worse by adding tearing, as the rate the game redraws the screen doesn't match the rate that the monitor refreshes.


Ok. I tried setting it to true aswell. Still flickering. And no, I didn't alter the code in anyway. I've tried the XNA game Rocket Commander and it doesn't flicker but some other small XNA games like breakout, tetris do flicker. Very strange.

These are very simple games so I simply can't understand why they flicker? More advanced games like Battlefield, Madden 2008 run perfectly on my machine.

Dragon88
Dragon88
Perhaps they're not bothering with doublebuffering?
bullnakke
bullnakke
Quote:
Perhaps they're not bothering with doublebuffering?

Where can I find an example of double buffering with XNA? I've searched, but no luck.


Dragon88
Dragon88
I wish I could help with that, but I can't. I've never used XNA. I just read your description of the problem and it sounded like it might be a difference between single buffered games and double buffered games. I have no idea how XNA handles it (perhaps XNA even ignores the whole issue and assumes you want double buffering).
gharen2
gharen2
I doubt it's a double buffering issue, as from your description, it only occurres with sprites. If it was in single buffer mode, the whole screen, even 3D objects, would flicker.

Regardless, I don't believe Xna/Direct3D even gives you the option of selecting a single buffered mode.

My money says it's either your laptop's hardware being poor, or poor drivers. Which reminds me, have you installed the latest drivers for the video card?
bullnakke
bullnakke
Quote:
Which reminds me, have you installed the latest drivers for the video card?

I've tried with the latest graphics drivers from Dell and 167.45 from nVidia. Still flickering :-(

Machaira
Machaira
Can you post the project in question so people can see what you're talking about?
Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development
bullnakke
bullnakke
Quote:
Can you post the project in question so people can see what you're talking about?

I'm linking to the project / source in my first post. Well, I've given up trying to fix this programatically. I think it has to do with my laptop's monitor. I'll try attaching a normal monitor. The flicering/trail might occur in other games but maybe I only see it now that the background is the same one color(?!).
Machaira
Machaira
Must be your hardware. Looks just fine on my PC.
Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.