Cross-Platform Game Development Libraries? 13
Ratfink18 asks: "Is there a cross platform Game development library for Windows, Macintosh (Carbon or Coca) and Linux? I am a project director for a computer game and as such I am strongly pushing for release on all platforms simultaneous. Since programmers are limited I am looking for a library that will take the pain out of simultaneous releases of software. The library should support both 2D, 3D, input and sound functions."
SDL!!! (Score:1)
SDL! (Score:1)
Here's a couple I like (Score:3)
Crystal Space [linuxgames.com] is a free 3D engine which is supported on multiple platforms, or
Flight Gear [flightgear.org] is around for those who'd like to code a Flight Sim of some sort.
All of the above are noted for their portable API and I've been following their progress for some time now. I hope this helps.
Anything but DIrectX? (Score:1)
There is a cross-platform research project... (Score:2)
...that can be found here [wpi.edu]. It's a college research project (by me and another person actually) that studies cross platform design, current software used for cross platform design and solutions to problems and design issues. It's a 90 page .pdf file. It also includes a survey on cross platform design and it's results. We did the research project in order to try and find out why many commercial companies do not create cross platform software, and to find solutions to the problems they claim. It is an interesting read I think.
P.S. Currently this is the next to final draft.
SDL (Score:2)
SDL is a cross-platform game devel library, that (off the top of my head) works on Linux (X and fb), MacOS, Windows, and probably a bunch of other targets too :) )
The API is quite nice, and the whole thing is.. it's just nice :). I love it.
SDL has sound support, and 2d video. If you need 3d, you can use GL for graphics with SDL for everything else, which is a big plus.
SDL is, BTW, what Loki [lokigames.com] uses to port games from Windows to Linux (Like Civilization:CTP, etc).
-----
OpenGL + OpenAL (Score:2)
My project.. (Score:1)
Well, my project [wirewd.com] is using OpenGL and OpenAL [openal.org] as the 3D library and audio library, respectively. For a 2D library, OpenPTC [gaffer.org] is always nice, but you can also try faking some 2D under OpenGL. That is the first step on getting your software cross-platform.
Input is not as problematic as you'd think and is relitively easy to port across platforms. Especially for joystick, mouse, and keys.
Right now I'm using GLUT [sgi.com] to handle input and windowing for the actual game executable and wxWindows [wxwindows.org] for the other tools. I'm tempted to switch entirely over to wxWindows, although it doesn't have an up-to-date Mac port. The problem with GLUT is that it isn't fast and isn't powerful, but it's great for getting things up and running quickly.
But as long as you just have to rewrite the program that popps up a window and sets up the OpenGL/OpenAL contexts, it's not as big as starting in DirectX and porting to GL. Just carefully architect the basic framework and there won't be any problems.
Also note that Mozilla's C++ Portability guide [mozilla.org] may prove to be useful. The goal is to think about portability from the beginning.
Use CrystalSpace (Score:1)
It runs on every platform you can think of, and is accelerated in Windows and Linux. Supports 2D, 3D, console, network, physics, Windows-ish GUIs, and even Python scripting.
Also think about Allegro. It's much more low-level than CrystalSpace, but it's easier to learn (C instead of C++). It exists for Windows and X, though I haven't heard of a Mac version.
Anyone have actual experience with these two libraries? I've never used either in anything serious.
Oh yeah - check out PyGame too. Write the whole game in Python, and it will run on any platform with SDL! Samesource code for every platform. (I don't think SDL alone is what you're after, though.)
Re:SDL!!! (Score:1)
I recommend Crystal Space (Score:1)
Check it out at http://crystal.linuxgames.com
Greetings,
Re:SDL!!! (Score:2)
www.libsdl.org (BeOS, MacOS, Linux Win32 others?)
SDL is indeed worthy of praise, but I should point out that Linux, Win32 and BeOS are the only platforms that it _officially_ runs on. From their FAQs [libsdl.org], MacOS "sort of" [libsdl.org] works (8-bit displays don't work properly, audio support is experimental). I mention this since the original questioner specifically asked about Mac support.
My experience (Score:3)
rendering: Glide
input: DirectInput on Windows,
sound: Midas
widget set: Qt on Linux, win32 on Windows, text mode hackery on DOS
There were plenty of custom code blocks (file access, system timers, keyboard input, window setup) but they were all small, very quick to write, and self-contained.
In other words, it's actually no big deal to not use a single, all-encompassing library to protect you from the horrors of coding to a specific platform.
However, there are other choices these days. OpenGL+OpenAL+Qt would make a pretty nice, completely cross-platform toolkit setup that should do everything you want and more.
And of course there's SDL, which I think is probably the best choice. I haven't used it extensively myself, but everything I've seen looks very good, and moreover it's what Loki uses, so that's a pretty good recommend right there.
Also, you might check out the links here [slashdot.org].