DirectX vs. OpenGL

Discussion in 'Game Development (Technical)' started by Battleline, Apr 16, 2005.

  1. Battleline

    Original Member

    Joined:
    Feb 15, 2005
    Messages:
    194
    Likes Received:
    0
    I've been working on my first large game project, developing it using DirectX 8. I chose DX8 because it comes installed with Windows XP. I really didn't do any research into what API would be best to use. Now that I'm somewhat familiar with DirectX, I was wondering what OpenGL has to offer. What are the benefits of using OpenGL, as opposed to DirectX and vice versa?
     
  2. Abscissa

    Original Member

    Joined:
    Nov 27, 2004
    Messages:
    678
    Likes Received:
    0
    Last I heared about the D3D vs. OpenGL debate, it really just came down to a matter of preference.

    But there are the issues of compatibility: D3D is *only* supported on windows, so if you ported your game to another platform, you'd need to switch it over to OpenGL. OpenGL is supported on just about anything, but I've heared that a lot of Windows systems have really bad OpenGL drivers. A lot of games circumvent the whole issue by just supporting both D3D and OpenGL.

    Also, I've heared that a lot of the fancier newer features are easier to do on D3D, but you probably don't want to rely on fancy hardware anyway unless you're Epic or id.
     
  3. Jim Buck

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    1,158
    Likes Received:
    0
    I would search out all the thread on the subject here on these messageboards.. there are quite a few - even one that I started. Abscissa pretty much nails the final summary of them.
     
  4. Rainer Deyke

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    380
    Likes Received:
    0
    One really nifty thing about about OpenGL: you can write to the really old OpenGL 1.0 API and still use all of the latest features on hardware that supports them by checking the appropriate extensions. With DirectX, you're basically stuck with picking one version, forgetting about older hardware that doesn't support that version of DirectX, and forgetting the features that were added in a later version of DirectX.
     
  5. brianhay

    Original Member

    Joined:
    Dec 27, 2004
    Messages:
    43
    Likes Received:
    0
    Can't you just use something like OGRE which supports both OGL and DX on Windows and is cross-platform with OGL?
     
  6. Raptisoft

    Indie Author

    Joined:
    Jul 29, 2004
    Messages:
    804
    Likes Received:
    0
    This is gonna sound like it's coming across as a flame, but it's not:

    Use OpenGL for hobby development. Use DirectX (8 if you must, 7 if possible) if you're trying to make money.
     
  7. Robert Cummings

    Original Member

    Joined:
    Apr 3, 2005
    Messages:
    1,155
    Likes Received:
    0
    Real Arcade has a couple of OpenGL titles that are doing well namely rocketbowl, thinktanks and orbs.
     
  8. Battleline

    Original Member

    Joined:
    Feb 15, 2005
    Messages:
    194
    Likes Received:
    0
    Ok, I'm a little nervous to ask this question, because I really don't want to start a flame war, but I'm honestly curious. What's the reasoning behind this? Does Windows have poor support for OGL? Also, do you need to include redist files in your download for OGL? I know if you want to include the DX9 redist in your download in increases the size by some 40MB.
     
  9. Daire Quinlan

    Original Member

    Joined:
    Feb 22, 2005
    Messages:
    103
    Likes Received:
    0
    I honestly believe, on windows at least, that it doesn't make a bit of difference which you pick. I prefer OpenGL for a variety of reasons, including cross compatibility with the Mac and Linux platforms, which given that I'm programming in Java makes sense in that regard. Even crappy laptops with onboard Intel chipsets have baseline support for at least OpenGL 1.2 so as long as you're smart about providing alternate codepaths for platforms that don't support things like VBO's and Vertex Shaders then you'll be fine. At the high end theres nothing to distinguish the two APIs. If you're worried then do as a poster suggested above, and use one of the many wrappers that allow you to switch between the two.

    D.
     
  10. James C. Smith

    Moderator Original Member

    Joined:
    Aug 21, 2004
    Messages:
    1,768
    Likes Received:
    0
    This topic has been discussed many, many times here. I don’t mind new discussion about old topics as long as people have something new to say and the people participating in the discussion have made some attempt to read the previous discussions. Here are some of the threads where related topics were discussed. These threads are not all specifically about GL vs DirectX but most of them touch on this issue and bring up many relevant points.

    OpenGL + Windows = tech support nightmare?
    OpenGL on portals
    2d using 3d - what's the deal here??!
    3D Hardware for 2D. Is it worth it?
    Minimum system requirements + worst OpenGL card
    Selling OpenGL only games on
    OpenGL and the end user
    Hardware Demographics for Casual Gamers
    How does a customer's hardware influence conversion?
    Setting Minimum Comp Requirement for your game
    Software rendering
    Software 3D library?
    Whither DX9, DX8, or DX7?
    Making a software mode backup renderer-- some questions
    2D games using hardware
    Reflexive updated Wik & The Fable of Souls (no more OpenGL)
    Valve's steam hardware survey
    2D games: how big is market

    I don’t agree with some of the summaries posted in this thread but I won’t go into details here. You can read my numerous posts on the subject it in the many threads listed above. In many of those posts I advocate using software rather than hardware. That only applies to 2D games. If you are making a 3D game for Windows I would recommend Direct 3D 7 or 8. You could get away with requiring GL or Dx9 if it was targeted at hard core gamers. If cross platform is very important to you then you may want to use OpenGL.
     
    #10 James C. Smith, Apr 16, 2005
    Last edited: Apr 16, 2005
  11. Dan MacDonald

    Moderator Original Member Indie Author

    Joined:
    Jul 26, 2004
    Messages:
    1,424
    Likes Received:
    0
    Now, if only everyone had the same mastery of the search tool James does!

    Nice post James!
     
  12. Mike Boeh

    Administrator Original Member

    Joined:
    Jul 26, 2004
    Messages:
    949
    Likes Received:
    0
    Yes, it has been covered many times before, and data collected from members of this forum suggests that 25% of windows installations do not have proper opengl support. As far as I know, the only OpenGL game to ever crack the top 10 at Real was Reflexive's Wik. And it didn't stay there long.

    What basis are you using for "doing well"? According to the James RealArcade top 10 database, none of those 3 games ever cracked their top 10. That doesn't make them unsuccessful overall, just not at real. I have no idea how these titles did overall.
     
  13. Pyabo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    1,316
    Likes Received:
    0
    Another one for the mythical FAQ...
     
  14. Jim Buck

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    1,158
    Likes Received:
    0
    And to note about Wik: though it debuted with OpenGL, James very soon after release put software rendering in due to the flood of problems people were having.

    The 3 games mentioned - rocketbowl, thinktanks, and orbs - I'm not sure if the soccer moms are exactly the ones downloading those games.. I think most of the people playing those games are the types of people that used to play more hardcore games.. the ones who of course have the right drivers.
     
  15. Vorax

    Original Member

    Joined:
    Jan 21, 2005
    Messages:
    349
    Likes Received:
    0
    You better get in touch with ID software and inform them they aren't going to make any money using Open GL...those crazy amateur hobbiests over there think they know better ;)
     
  16. luggage

    Moderator Original Member Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    2,132
    Likes Received:
    0
    I don't think ID are aiming at quite the same crowd as the majority of us somehow.

    I look at it like this...

    It doesn't matter if your game is good or bad you're not going to sell a game unless it works on the customers machine.

    As for the 3 titles mentioned, aren't they all Torque games?
     
  17. Jim Buck

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    1,158
    Likes Received:
    0
    id's games cater to the same audience as the Valve survey. You won't find my wife or mother playing Doom3. If you plan to go for the hardcore crowd, OpenGL is absolutely not off of the table of possibilities. But for the majority of the posters on this messageboard, it's a much deeper decision.
     
  18. Vorax

    Original Member

    Joined:
    Jan 21, 2005
    Messages:
    349
    Likes Received:
    0
    My point was only that it can and is indeed be used professionally...and not all games are casual.

    To be honest, OpenGL has many advantages over DirectX in terms of compatibility. Despite the myths. OpenGL is available with nothing more then the drivers for your video card, EVERYONE has drivers for their video card. OpenGL doesn't come in different flavours...7, 8, 9 etc... you can develop against OpenGL 1.0 and then check if extensions are available or more powerful features exist on the client machine.

    DirectX on the other hand, comes in various versions and different ones require various service packs to have been installed, and its not part of the video card driver so it either has to be bundled or downloaded from MS...you say it's so much easier and avialable?

    How many times have you heard this in a thread: "Should I develop for DX9? It has some great features I want, but I am afraid I will have to include it because not enough people will have it installed? What do I do?" ....(lengthy thread ensues)...mean while OpenGL guys go back to programming and add a new extension check for that fancy feature :D

    Here is the instructions from OpenGL.org if you are having problems running an OpenGL game:
    Bottom line...download the lastest video card drivers...try explaining how to install Service Pack 2, update your video card drivers and install DX 9.... Actually, if you're smart with your OGL code, just check extensions so the "less computer savy" never have to worry about it. If they have the latest drivers, they get the latest goodies (if their card supports it), if not, they probably won't miss the features anyways and they get vanilla OGL, no need to install anything to run your game no matter what capabilities the game itself supports.

    PS: I think M$ marketing got to a few to many casual games developers :)
     
    #18 Vorax, Apr 17, 2005
    Last edited: Apr 17, 2005
  19. Jim Buck

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    1,158
    Likes Received:
    0
    No, actually, the point is that most people have crap OpenGL drivers. For some reason, and this is where MicroSoft's power came into play, vendors just did not put quality into their OpenGL drivers for a long time. Sure, if you download the latest drivers, you are good the go.. but downloading drivers is a task for the more hardcore computer users.. not the types of people that most people on these messageboards are catering to. Read some of the threads about it, and specifically look for James C. Smith's comments - he gives a lot of details and insight into this. Don't get me wrong, I personally LOVE OpenGL and have been using it since the very beginning of its existence (even when it was its former self Iris GL), but when it comes to making a business decision, there are many other factors at play here. The people on these messageboards have computers that aren't typical of the casual market, therefore you can't extrapolate any conclusions about the majority of computer users based on your own computer.
     
  20. Vorax

    Original Member

    Joined:
    Jan 21, 2005
    Messages:
    349
    Likes Received:
    0
    Granted, HL2/Doom 3 gamers are not using HW typical for casual gamers...not even close. ;) But that's really beside the point...heres why:

    Good OpenGL drivers have been around for the majority of video cards released in the last 5 years, except some Intel cards which were late to join the rest of the world (mostly on laptops).

    Quake 3, Half Life (the original) and Unreal weren't for everyone but they all had Open GL support, and what's more other games were being built using their engines. That woke up the manufacturers enough to include good OpenGL drivers.

    FPS gamers of today are a good measure of what the typical user will have in 5 years. 5 years ago, they were all OpenGL ready. Now it is pretty safe to use OpenGL. A couple of years ago I would have conceded, but not anymore. I believe it's no more of an issue then supporting DX.

    The first recomendation you are going to make if someone has graphics problems with your DX game is the same as you would make with an OGL game...upgrade your drivers. Except with DX they may need a service pack to go with it.
     

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