Jump to content
  • Advertisement
Sign in to follow this  
svarvi

Help Me Decide between OpenGL and DirectX

This topic is 3353 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there , i'm a planning to develop a 2D game for PC platform and later port it to some console if time permits. Now i have to take a decision between the two API's. I know that if develop on Directx i can only port to XBOX 360, and at the same time if i choose to develop on openGL i guess i have options like porting to PS2,PSP , mobiles and even WII(of course with major modifications).i Want Your advice on the two API's and which to decide for now.

Share this post


Link to post
Share on other sites
Advertisement
Do you have a developer license with either Sony or Microsoft? Because if not, then you're not going to be able to port anything to those consoles anyway (unless you go with XNA for PC/Xbox, but that's something else entirely).

Developer licenses cost multiple thousands of dollars, and are typically only given to studios with proven track records anyway.

Share this post


Link to post
Share on other sites
As has been said in a lot of other posts asking exactly the same question, part of your decision has to be based on what you want to incorporate into your game.

Besides just rendering graphics, DirectX has support in loading textures, using DirectSound or XAudio, helper functions for matrix and vector manipulation, etc. Are you going to be using that support?

If you develop in OGL, you'll probably want to write a lot of those support routines yourself or use third party routines.

OGL support on older off-the-shelf Windows machines is limited, and there are still a lot of older machines around. For compatibility with older Windows versions, you may want to limit yourself to version 1.2, unless you're very familiar with using extensions.

Having said all that, if you really want to have a choice to port to alternate platforms, modifying OGL for that is going to be a lot easier.

Share this post


Link to post
Share on other sites
The 360 doesn't run on DirectX 9 (it is very similar though).

The PS3/PSP/PS2/Wii do not run on OpenGL.

Mobile phones do not run on OpenGL either (the use OpenGL ES, which is different).


If you write in DirectX you can port between XP/Vista/Win7.
If you write in OpenGL you can port between Windows/Mac/Linux.

If you want to port to any game console, you will have to re-write your DirectX/OpenGL code to use the console's native API.

Share this post


Link to post
Share on other sites
You don't exactly have many choices. On PDAs/phones, you really only have the choice of OpenGL ES (there's a Direct3D Mobile for Windows Mobile devices, but it's utter rubbish). On the consoles, they all use their native APIs except for the PS3 which can use either the native API or OpenGL ES. On Mac/Linux you can only use OpenGL.

The only place where you have really have a choice is on Windows. And if you're on Windows, I would recommend using DirectX.

Share this post


Link to post
Share on other sites
Part of it depends on the language too. If it's an OO language, I would suggest using DirectX because it has a few OO interfaces (I know C++ has one, and I'm pretty sure the managed interface is OO for C#, though don't quote me on that).

If you don't care, aren't using an OO language, or need portability, OpenGL would be a better bet because it's relatively simple to set up.

Share this post


Link to post
Share on other sites
If you've got a 2D game you want to make (or any game for that matter), stick with DirectX. I don't know your industry experience, but if your a pro or a hobbist right now you just want it to work. If you've got cross-platform ambitions, you could try building interfaces between your graphic API and your game. This would allow you to swap between consoles with a bit more freedom. Beyond that, just focus on your title. Also, are you using any kind of engine? If not, I recommend you do. It may sound more hard core to build the whole thing yourself, but it really is alot of work. Having a proven engine supporting your title will definetly make investors feel better, and it could remedy alot of your porting issues. However, Codeka is right. Without the proper licensing (which requires some credibility) your title won't fly on home consoles. I know that may make your heart sink, but just think of it as a work in progress. Pushing a game out on any platform builds cred, and if you don't have any experience in the biz your game will serve as a great show-piece. Good luck brotha.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!