Heh... I'm not sure what official/original relationship SDL had with Loki- my somewhat fuzzy recollection of things places SDL's existence a tad bit before Civ:CTP's start of development (i.e. the start of Loki...); that could be wrong, but I do know that SDL was actively maintained by Loki during it's existence- with varying parties maintaining it throughout it's existence, including Sam Lantinga and Ryan Gordon. I think Sam's still got some involvement in the whole thing, even.
The rest would be pretty accurate though. However, having said this, the sound support's VERY primitive and the network support's also that way- you'll want to probably consider using OpenAL-soft or Portaudio for sound and Grapple or OpenPlay (I'd vote for Grapple, myself- while it's an LGP originated LGPL library, there's a REASON we ditched OpenPlay and spent 4-6 months inventing Grapple...) for the networking.
Theory sometimes is the reality. Sometimes, it's not so- it's not always the impedance mis-match between the APIs that is the problem. It's the atrocious code that VC++ allows a studio to get away with that is the real bugbear in a porting project.While SDL is not DirectX, it's a close equivalent and it did make Loki's task of porting DX games relatively more straight forward than without. At least that was the theory, hehe.
Keyboard and joystick is close enough to not be too much of an issue. Simple sound playback is also not an issue. Simple networking is not an issue. Basic threading as well. For positional and more complicated Audio, OpenAL was supposed to be the biggie- on MacOS and Windows, it still is. With OpenAL-soft, it should be back on track for Linux. Grapple should handle many of the network solutions- unfortunately, it's not interoperable with DirectPlay.
2D graphics is dealt with nicely so that differences in getting a framebuffer plane is simplistic- and in some cases, some functionalities are hardware accelerated on the platform where possible. 3D is handled by your system's OpenGL layer, but it provides a clean wrapper framework to tie into it portably.
All in all, if you WRITE a game with SDL, OpenAL, and Grapple, you'll end up with a title that will cleanly run on Linux, MacOS, Windows, and more. There may be some performance glitches on some platforms (On Windows, it wraps DirectX with a thin shim, but it's still there... And so on, and so forth...) but all in all, it's not a bad way to make a game if you want to target things easily.
Pretty much every one of them that I know of brings in SDL to provide the threading handling, user input handling, and OpenGL abstraction handling. It makes life a bit easier.I reckon some commercial Linux games use this (all Loki ones, I think) as well as games like Neverwinter Nights.
YOU feel old? Damn, I feel ancient.I'm sure Svartalf can provide more accurate info. I feel old already. hehehe.![]()
![]()


Reply With Quote
