SDL and Vista: FizzBall fix test

Discussion in 'Game Development (Technical)' started by Ryan Clark, Mar 15, 2007.

  1. Ryan Clark

    Indie Author

    Joined:
    Oct 29, 2004
    Messages:
    656
    Likes Received:
    0
    Hi all,

    I know a few of you out there are using SDL for your games, and I'm wondering if you've encountered any problems with Vista.

    The latest version of SDL defaults to the "windib" video driver, instead of the "directx" video driver, for reasons of compatibility with Vista. I've confirmed that using the directx driver results in very low frame rates for FizzBall.

    However, when using the windib driver, I've noticed strange visual artifacts occur when large portions of the screen are being redrawn. We use a dirty rects algorithm, and it seems that Vista is trying to do something fancy with its screen updating routines, and this prevents regions of the screen from being redrawn when SDL thinks it has redrawn them.

    Long story short, I've hacked the game to check which version of Windows its running on, and stop using the dirty rects algorithm if Vista is running. HOWEVER, Vista is too smart for me, and it seems it sometimes will run games in "compatibility mode" and erroneously report that it is Windows XP when it is actually Vista!

    So... yeah. This is the latest "Vista fixed" version of FizzBall:

    http://grubbygames.com/TEMP_ONLY/FizzBallDEMO.exe

    If any of you are running Vista, I'd appreciate it if you could play through the first 6 levels and let me know if you notice any slowdowns or visual glitches.

    Also, if you have dealt with these problems yourself, I would love to hear your thoughts. I'm not pleased with my current "hacky" solution, even though it seems to work (on my Vista machine).

    Thanks!
     
  2. Slayerizer

    Original Member

    Joined:
    Dec 13, 2004
    Messages:
    103
    Likes Received:
    0
    I will try it out tonight
     
  3. wazoo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    519
    Likes Received:
    0
    I'd be happy to try it out tonight as well Ryan.

    I've found SDL works fine for me without any Vista-Alchemy, but I just use it as a shell to interface with OpenGL..;)
     
  4. Ryan Clark

    Indie Author

    Joined:
    Oct 29, 2004
    Messages:
    656
    Likes Received:
    0
    Yeah, I think the problem arises when DDraw is involved. You're likely bypassing that with OpenGL.

    Anyway, testing would be very much appreciated! Thanks, guys.
     
  5. WaveRider

    Indie Author

    Joined:
    Aug 23, 2005
    Messages:
    222
    Likes Received:
    0
    I played up to and through the first bonus level and didn't find any graphical issues at all under Vista Home Premium.
     
  6. Ryan Clark

    Indie Author

    Joined:
    Oct 29, 2004
    Messages:
    656
    Likes Received:
    0
    Thank-you, WaveRider!
     
  7. wazoo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    519
    Likes Received:
    0
    Worked fine for me with Vista Ultimate edition, even with my crappy NVidia drivers. :)

    hth,
     
  8. Ryan Clark

    Indie Author

    Joined:
    Oct 29, 2004
    Messages:
    656
    Likes Received:
    0
    Thank-you, wazoo! That definitely makes me feel more confident in my fix :)
     
  9. elias

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    39
    Likes Received:
    0
    We don't use directx drawing ourselves, but I've seen that Java's 2D engine have had similar problems on vista:

    http://weblogs.java.net/blog/chet/archive/2006/10/java_on_vista_y.html

    Look at the section titled "Problem 2: Graphics artifacts (black rectangles)", which pretty much boils down to: you can't mix GDI and directx drawing in vista. So if SDL is somehow using GDI for some operations, and directx for others, it could very well be the problem.

    EDIT: The blog links to a microsoft blog on the same topic:

    http://blogs.msdn.com/greg_schechter/archive/2006/05/02/588934.aspx

    - elias
     
    #9 elias, Mar 18, 2007
    Last edited: Mar 18, 2007
  10. Slayerizer

    Original Member

    Joined:
    Dec 13, 2004
    Messages:
    103
    Likes Received:
    0

    I have NOT experienced any slow down or glitches. The game ran perfectly.

    Note: I'm using Nvidia hardware with the driver.
     
  11. Ryan Clark

    Indie Author

    Joined:
    Oct 29, 2004
    Messages:
    656
    Likes Received:
    0
    elias: Thank-you for the blog link; very informative! Perhaps that is what SDL is indeed doing, behind the scenes.

    Slayerizer: Excellent! Thanks very much for testing the game; I really appreciate it.
     
  12. Midnight Synergy

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    275
    Likes Received:
    0
    Hey Ryan,
    works well on my Vista laptop (with crappy built-in video).
    Cheers,
    Patrick
     
  13. Ryan Clark

    Indie Author

    Joined:
    Oct 29, 2004
    Messages:
    656
    Likes Received:
    0
    Awesome; thanks Patrick!
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer