Sign in to follow this  
Tegramon

In need of suggestions ...

Recommended Posts

Tegramon    122
Hi I am interested in gamedev. I need you guys to recommend me some libraries like Direct3D and OpenGL based on some things I need. First of all, I come from an UNIX enviroment and am very fluent in Ansi-C. I would like a library or engine that at least understands C. I was thinking of OpenGL, however compared to Direct3D, it does not look that great, or am I mistaking? I also looked at Microsoft's XNA, but for some reason it gives me the creeps, maybe it's beacause of the proprietary code. So basicly, I am searching for an equivalent of Direct3D, Ansi-C compatible, fast and furious :) Any ideas? T.

Share this post


Link to post
Share on other sites
Ezbez    1164
How good looking something is depends on artwork, not on the graphics API used. Besides, check out Doom 3 if you want to know a game that looks good with OpenGL. Some engines provide rendering paths for both OpenGL and DirectX, and they look practically identical.

Share this post


Link to post
Share on other sites
superpig    1825
If you're using C, Direct3D is not a friendly choice (it works with C, but it's designed for C++), and XNA is completely out (requires a .NET-based language like C# or C++/CLI). OpenGL is probably your only serious choice for hardware-accelerated 3D graphics. If you only want 2D, you could use Allegro or SDL.

Share this post


Link to post
Share on other sites
Tegramon    122
Quote:
Original post by Ezbez
How good looking something is depends on artwork, not on the graphics API used. Besides, check out Doom 3 if you want to know a game that looks good with OpenGL. Some engines provide rendering paths for both OpenGL and DirectX, and they look practically identical.


You mean to say Doom 3 is actually made in OpenGL?

Share this post


Link to post
Share on other sites
ToohrVyk    1595
Doom 3 can be set up to use OpenGL. From the point of view of capabilities, OpenGL can do about as much as Direct3D 9 (I don't know about Direct3D 10, though).

Share this post


Link to post
Share on other sites
swiftcoder    18426
Quote:
Original post by ToohrVyk
Doom 3 can be set up to use OpenGL. From the point of view of capabilities, OpenGL can do about as much as Direct3D 9 (I don't know about Direct3D 10, though).


Pretty much all DirectX 10 features have already been implemented as OpenGL extensions.

Share this post


Link to post
Share on other sites
TheGilb    372
You'll have to wait for OpenGL3 to get finished before you can match the capabilities of DX10 but in all honesty both DX9 and GL2.1 offer the same capabilities it's just a different interface.

I'm pro-GL but let's just say I heard Carmack said they'd be using DX for the idTech5 engine.. Bring on GL3 .. soon!!!

When GL3 is finished it'll be the only API to support the same capabilities as DX10 on windows xp, and other compatible platforms.

Share this post


Link to post
Share on other sites
In the interview i watched where he was showing idtech5 off, im pretty sure he said something like "this is all running on openGL, so no need for DirectX 10"

i could be wrong, or maybe this is dated info?

Share this post


Link to post
Share on other sites
swiftcoder    18426
Quote:
Original post by Interesting Dave
In the interview i watched where he was showing idtech5 off, im pretty sure he said something like "this is all running on openGL, so no need for DirectX 10"

You are correct. And even the big studios using DX10 haven't all been wild about it - remember when it was discovered that you could enable the DX10-level graphics in Crysis under DX9?

Share this post


Link to post
Share on other sites
stonemetal    288
Quote:
Original post by TheGilb
You'll have to wait for OpenGL3 to get finished before you can match the capabilities of DX10 but in all honesty both DX9 and GL2.1 offer the same capabilities it's just a different interface.

I'm pro-GL but let's just say I heard Carmack said they'd be using DX for the idTech5 engine.. Bring on GL3 .. soon!!!

When GL3 is finished it'll be the only API to support the same capabilities as DX10 on windows xp, and other compatible platforms.


It runs on OS X. That should be a strong indicator of doing the job in opengl. If it supports DX That is a plus for MS. It was demoed at one of the recent mac expos so there should be video of it running on a mac out there.

Share this post


Link to post
Share on other sites
jpetrie    13103
Quote:

You are correct. And even the big studios using DX10 haven't all been wild about it - remember when it was discovered that you could enable the DX10-level graphics in Crysis under DX9?

All that really means is that Crysis didn't take advantage of the features of D3D10 that require hardware support (e.g., geometry shaders) or could intelligently fall back to the code path that did not use geometry shaders when they were not present even though you were running the game "Direct3D 10" mode. I'd be extremely skeptical of any conclusions drawn based on the "Crysis argument," since the unlock was originally discovered by gamers (traditionally rather technically inept) and game developers traditionally play fast-and-loose with customer-facing tech usages (because its the path of least resistance). Without seeing the code and knowing what Crysis is actually doing under the hood, it's dangerous to make too many conclusions.

A lot of what Direct3D 10 offers as a benefit to developers is not fancy stuff like the geometry shader, it's the reorganization of the API and its underlying semantics to make it cleaner and to allow more work to be done kernel side and for better GPU resource virtualization. As an aside, this doesn't map 1:1 to OpenGL because OpenGL never had the same semantics as Direct3D 9, entirely, so some features don't translate exactly.

Developers are more likely to be less-enthused with Direct3D 10 because it's such a breaking change (while ultimately for the best, this does make it neccessary to have multiple code paths for the renderer to support 9 and 10) that also requires investment from the userbase (that is, Vista and a D3D10 card), so that switching wholesale to D3D10 is not a good business move. But then again, many of us have to / have had to scale all the way back to fixed function support, so...

Quote:

I was thinking of OpenGL, however compared to Direct3D, it does not look that great, or am I mistaking? I also looked at Microsoft's XNA, but for some reason it gives me the creeps, maybe it's beacause of the proprietary code.

OpenGL's code is proprietary too, you know. There are open-source implementations floating around (like Mesa), but the OpenGL that drives your fancy games is completely closed.

OpenGL's probably what you want to try first if you are more comfortable with the C programming paradigms.

Quote:

So OpenGL does not have file loading and sound capabilties. How can you overset this? Through extensions?

No. You need additional libraries for this. OpenGL should be compared to Direct3D, not DirectX, which is a suite of libraries.

OpenGL and Direct3D are basically functionally equivalent. Your concerns about the appearance of games you've played almost assuredly come down to art content, which can easily make-or-break the visual experience for a game.

Share this post


Link to post
Share on other sites
SimonForsman    7642
Quote:

There is certainly no plans for a commercially supported linux version of Rage, but there will very likely be a linux executable made available. It isn't running at the moment, but we have had it compiled in the past. Running on additional platforms usually provides some code quality advantages, and it really only takes one interested programmer to make it happen.

The PC version is still OpenGL, but it is possible that could change before release. The actual API code is not very large, and the vertex / fragment code can be easily translated between cg/hlsl/glsl as necessary. I am going to at least consider OpenGL 3.0 as a target, if Nvidia, ATI, and Intel all have decent support. There really won't be any performance difference between GL 2.0 / GL 3.0 / D3D, so the api decision will be based on secondary factors, of which inertia is one.

John Carmack


from http://games.slashdot.org/comments.pl?sid=302231&cid=20671657
Posted in September last year i think.

The officially supported platforms will probably be MacOSX, Windows, PS3 and Xbox360 from what i've read.

The only API i would avoid for a game that is about to be released would be D3D10 due to the "low" (around 13% in february 2008 according to net applications) marketshare of Windows Vista. Windows in general has around 92% marketshare according to the same source, GNU/Linux is at around 0.6%(About the same as Windows98) and MacOS(All versions) at around 7.5% (It isn't accurate numbers though since its based on browser id strings gathered from certain websites but it should give you a rough idea on what OS you really really want to support)

(Vista's marketshare appear to be growing quite rapidly though so in a few years it will probably be safe to ignore XP for non-casual games)

Share this post


Link to post
Share on other sites
Tegramon    122
Ok, so do you have any recomandations of some DirectInput similar lib's to use in conjunction with OpenGL, or some sound libs, or even some netcode libs?

Share this post


Link to post
Share on other sites
SimonForsman    7642
Quote:
Original post by Tegramon
Ok, so do you have any recomandations of some DirectInput similar lib's to use in conjunction with OpenGL, or some sound libs, or even some netcode libs?


SDL and SDL_Net works well for sound , input and networking if you're aiming for platform independance.

OpenAL is also a nice multi platform option for sound (Its even used with alot of DirectX/Windows titles such as Battlefield 2, Bioshock and many others).

OpenAL platform support works out like this
Quote:

Platform Devices Licence Holder
MacOS 8/9 Sound Manager Open Source (LGPL)
MacOS X Core Audio Open Source (Apple)
Linux OSS Open Source (LGPL)
Linux ALSA Open Source (LGPL)
BSD native Open Source (LGPL)
Solaris native Open Source (LGPL)
IRIX native Open Source (LGPL)
Windows MMSYSTEM Open Source (LGPL)
--------DirectSound Open Source (LGPL)
--------DirectSound3D Open Source (LGPL)
--------NVIDIA nForce Open Source (LGPL)
--------Creative Audigy Creative Labs Inc.
--------Creative Audigy 2 Creative Labs Inc.
--------Creative Audigy 4 Creative Labs Inc.
--------Creative X-Fi Creative Labs Inc.
Ms Xbox native Creative Labs Inc.
Ms Xbox 360 native Creative Labs Inc.


For a Windows Only title you could use plain Winsock for networking and the Windows API for input aswell.

Share this post


Link to post
Share on other sites
Tegramon    122
Thanks for all the help. I chose to remain on a combination of OpenGL and SDL for now since they are free and seem to be pretty good for a low budget 3D app.

Share this post


Link to post
Share on other sites
swiftcoder    18426
Quote:
Original post by Tegramon
Thanks for all the help. I chose to remain on a combination of OpenGL and SDL for now since they are free and seem to be pretty good for a low budget 3D app.

Note that this isn't only for low budget apps - virtually every linux/Mac port of a commercial game in the last few years uses this combo.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this