Bit Blot Forum
Aquaria => General => Topic started by: Gravious on July 15, 2007, 12:08:46 am
-
Hi,
I'm an established PHP developer who's looking to start making games in my spare time. I'm set on using C++ and i want to develop 2D games (at least to start with,) so I've been looking at my options and i thought they boiled down to the following;
- C++ & DirectX
- C++, SDL/Allegro & OpenGL
So i was surprised to see Aquaria using OpenGL and DirectX together, obviously your using DirectX for everything other than the renderer, but why is that? If your using DirectX so much, why not just use a Direct3D renderer?
Is there a reason your not using SDL or Allegro?
-
Actually, we don't use DirectX. Just XInput (the X360 Controller drivers). Sorry if something I said somewhere was misleading. :)
Right now we use SDL for input and window management, and OpenGL for rendering. The main reason for that is just 'cause I prefer the way OpenGL is set up. I prefer SDL to Allegro, just 'cause I think Allegro has a lot of components I wouldn't use in this situation. (although I love Allegro and used to use it back in the old days!)
DirectX
Pro: Supported on Windows XP and Vista, makes XBox360 port easier
Con: Not supported by Mac.
OpenGL
Pro: Supported on Mac
Con: Not supported at all or very well on Vista yet. :( (don't have too many details on this, but hopefully it'll change)
-
Con: Not supported at all or very well on Vista yet. :( (don't have too many details on this, but hopefully it'll change)
Hopefully. The problem with OpenGL support in Vista is that most of the hardware manufacturers' drivers don't support it. My understanding is that NVidia is working on it, and that ATi is basically ignoring the issue, especially with older cards. At any rate, third party drivers will probably get done at some point, and OpenGL will be happy.
xander
-
Well I'm running an nvidia 8800GTX on vista and can play OpenGL games (so far) without issue. I believe it is vendor based driver issues that are causing the problem and as the drivers are being updated the issues are getting smaller.
On a side note, I've got Visual C++ 2005 on Vista and I've been able to compile some OpenGL tutorials and have them run successfully, so i think I'll have a look for some SDL/OpenGL tutorials now :D
-
Thanks, xander. I hope it all gets solved up nice.
As for SDL/OpenGL tuts...
Simple Intro:
http://gpwiki.org/index.php/C:SDL_OGL
Think this is the NeHe examples redone with SDL:
http://www.libsdl.org/opengl/OpenGL-intro-1.1.1.zip
'Nother one that looks promising:
http://www.devshed.com/c/a/Multimedia/Using-OpenGL-with-SDL-for-Game-Programming/
There's some other one that was more a reference page that I really liked, but can't find it atm.
-
Thanks, xander. I hope it all gets solved up nice.
As for SDL/OpenGL tuts...
Simple Intro:
http://gpwiki.org/index.php/C:SDL_OGL
Think this is the NeHe examples redone with SDL:
http://www.libsdl.org/opengl/OpenGL-intro-1.1.1.zip
'Nother one that looks promising:
http://www.devshed.com/c/a/Multimedia/Using-OpenGL-with-SDL-for-Game-Programming/
There's some other one that was more a reference page that I really liked, but can't find it atm.
Thanks, that's fantastic ;D
By the way, Aquaria is looking fantastic, i hope it works on Vista (lol?)
Good fortune to you all.
-
For basics, this is a pretty good page too.
http://lazyfoo.net/SDL_tutorials/index.php
But I think that the author of those tutorials isn't very advanced himself.
He does some weird things sometimes, but it's a good introduction to SDL.
For OpenGL you'll have to read through some of the the NeHe tutorials/examples.
Have fun.
PS: I strongly advise you to stick with SDL + OpenGL, as it is a very capable combination, used by some very popular game makers. And SDL/OpenGL itself is very portable to other devices and/or operating systems. (Allegro is cross-platform too though, but I have no experience with that and I haven't seen that many people use it)
-
I think the only cases where you'd want to use DirectX over OpenGL:
- if you prefer how DX's commands are set up
- if you need certain visual effects (DX has a different Shader language, some claim its better / has different functionality)
- if you're targeting XBLA (it would make a 360 port much simpler)
-
I heard that DirectX is all pointers and classes while OpenGL is pretty much all function based? Would you say that is accurate?
Though pointers and classes are available in PHP, they're horribly implemented and i don't use them much yet.. :(
-
I strongly advise you to stick with SDL + OpenGL, as it is a very capable combination, used by some very popular game makers. And SDL/OpenGL itself is very portable to other devices and/or operating systems. (Allegro is cross-platform too though, but I have no experience with that and I haven't seen that many people use it)
There are good reasons to stick with the SDL/OpenGL combo. However, there are good reasons to go with DirectX as well. One of them is XBox compatibility, and getting the "Games for Vista (or Windows or whatever it is)" logo on the box. As a Linux user, you may not find that important, and, as Mac user, I would prefer OpenGL; but, as a software developer, being able to sell your games via the Windows/MS marketing machine must be attractive. I know that IV rewrote the Darwinia rendering engine to incorporate DirectX -- this was done, in part, for Vista compatibility, but I imagine that it was also done to sell through the "Games for Windows" program.
xander
-
IMO I just find OpenGL has a simpler, cleaner system. DirectX is a bit more "messy".
But they're both solid, and I wouldn't try to convince anyone to use one over the other. It depends on the project and your personal taste.