Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : Does DROD use DirectX?
New Topic New Poll Post Reply
Poster Message
DiMono
Level: Smitemaster
Avatar
Rank Points: 1161
Registered: 09-13-2003
IP: Logged
icon Does DROD use DirectX? (0)  
I have FRAPS and I'm wondering if I can save my demos in video format, but FRAPS only works on games that use DirectX. What's the scoop?

____________________________
Deploy the... I think it's a yellow button... it's usually flashing... it makes the engines go... WHOOSH!
10-26-2004 at 03:41 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
patmo98
Level: Delver
Rank Points: 38
Registered: 03-14-2003
IP: Logged
icon Re: Does DROD use DirectX? (0)  
quote:
DiMono wrote:
I have FRAPS and I'm wondering if I can save my demos in video format, but FRAPS only works on games that use DirectX. What's the scoop?


DROD uses the SDL library, and since it is portable to linux I think it dosn't use DirectX.
10-26-2004 at 03:58 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Scott
Level: Smitemaster
Rank Points: 578
Registered: 02-12-2003
IP: Logged
icon Re: Does DROD use DirectX? (0)  
SDL uses opengl not directx.
10-27-2004 at 12:21 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2578
Registered: 04-12-2003
IP: Logged
icon Re: Does DROD use DirectX? (0)  
DROD uses SDL, and on Windows, SDL uses DirectX by default. (It doesn't require it, though.)

quote:
Scott wrote:
SDL uses opengl not directx

OpenGL is a 3D library, only used in 3D games (ie not in DROD). The DirectX equivalent of OpenGL is Direct3D, but that's just a part of DirectX. SDL uses DirectX, but not Direct3D.

- Gerry
11-06-2004 at 01:10 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Scott
Level: Smitemaster
Rank Points: 578
Registered: 02-12-2003
IP: Logged
icon Re: Does DROD use DirectX? (0)  
I guess I was fooled by the following quote from the SDL main page

Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
11-06-2004 at 04:27 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 4461
Registered: 02-04-2003
IP: Logged
icon Re: Does DROD use DirectX? (0)  
Updating information for posterity: SDL 1.2.9 and earlier does use DirectX (v5?) by default on Windows, but since SDL 1.2.10, it uses the Windib driver by default.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 10-11-2006 11:47 PM]
10-11-2006 at 09:45 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 2458
Registered: 12-28-2004
IP: Logged
icon Re: Does DROD use DirectX? (0)  
Umm, by the way, do OpenGL is onlu used in 3D games?
I was pretty sure, that some 2D games also use it instead of DirectX to let the game to be portable to other OSes...
Or maybe my imagination tries to drive me crazy O:- .

____________________________
My website | Facebook | Twitter
10-13-2006 at 05:38 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2578
Registered: 04-12-2003
IP: Logged
icon Re: Does DROD use DirectX? (+3)  
OpenGL is a 3D API. It can be compared to Direct3D, which is part of DirectX. As you know, Direct3D is only available on Windows (and, well, X-box), but OpenGL is available just about everywhere you can have 3D acceleration and even many places you can't. So, using OpenGL for 3D acceleration is much more portable.

For 2D, we've got things like SDL (what DROD uses). SDL is a thin wrapper over system-specific stuff like DirectX, Xorg, OS X, etc*, so DROD doesn't have to worry about all those little details that change for every system and just concentrate on the game in stead. Which is nice. SDL does a lot more than just 2D, though. It can be seen as a cross-platform alternative to DirectX. For 3D, SDL supports setting up an OpenGL window/context and leaves it at that. Then you just use OpenGL in the usual way.

So anyway, once upon a time there was 2D acceleration. Then 3D came along, and little by little 3D acceleration was all that graphics card and driver manufacturers cared about. Oh sure, you can still get some 2D acceleration in Windows via DirectX (using obsolete APIs), but using OpenGL or Direct3D to do the same thing is much faster (assuming you do things right, that is). And us poor Linux people using XFree86 and Xorg don't get any 2D hardware acceleration at all. Or, well, there's XRender, but if that's accelerated it usually uses 3D acceleration in the backend. SDL doesn't support XRender, so if you use SDL it's a moot point anyway. (And then there's things like XGL, but that obviously uses OpenGL too.)

So! If you want fast 2D, you use a 3D API. Preferably OpenGL, since it's more portable, but if you don't care about portability Direct3D should work as well.

However, one thing to keep in mind is that using a 3D API to accelerate 2D if you don't have 3D acceleration will result in a major slowdown. 3D APIs are meant to be fast at rendering 3D stuff, so they're designed to be good at that. But doing fast software 3D is different from doing fast software 2D. So, hardware 2D-on-3D is much faster than software 2D, but software 2D is much faster than software 2D-on-3D!

So you have to make a choice. Do you want your game to run faster on current hardware but be unplayable on old hardware, or do you prefer to have it run slower on current hardware but at least be playable on older hardware as well ? Speed or compatibility ? You can of course do both; support acceleration, but support software rendering as well. That means having multiple graphics backends, though, which is much more work than just supporting one.

Unless, of course, you're using a wrapper that handles all that for you. Does SDL do this ? Well, no, SDL 1.2 does not. But the next major release of SDL, which is currently in the works, does! SDL 1.3 has a redesigned API that can take advantage of 3D acceleration for 2D operations.

Does this mean that DROD can automatically take advantage of this once SDL 1.3 is out ? Well, no. As I mentioned above, SDL 1.3 has a redesigned API, so it's not as simple as just lobbing out the old SDL and plopping in the new one and hey presto, magic acceleration. DROD would have to be ported to the new SDL. That in itself would not be enough, though. DROD would also need to be redesigned in places to be more acceleration-friendly. Direct pixel manipulation of hardware surfaces is a big no-no when you're trying to accelerate, for example. You can do it, but it's very slow. Slow enough that you can end up losing whatever speed advantage you got by switching to acceleration in the first place. You can get around that by using software surfaces, but those obviously aren't accelerated.

So, er. Does that answer your question ? :)

~ Gerry

* It even supports some stuff without an X in its name!
10-13-2006 at 07:35 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 2458
Registered: 12-28-2004
IP: Logged
icon Re: Does DROD use DirectX? (0)  
quote:
trick wrote:
So, er. Does that answer your question ? :)



Kinda ^_^. Thanks :).

____________________________
My website | Facebook | Twitter
10-14-2006 at 08:11 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : Does DROD use DirectX?
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.