Best Cross-Platform Lib?


Michoko

Member
Joined
May 13, 2008
Messages
458
Location
France
Hi,

I've always loved to create my own games, and I'm currently developping homebrews on the Nintendo DS. It is quite fun, but the game design is rather specific to this platform due to the use of two screens.

Now I'd like to commit to a new (2D only) project, with portability in mind. There are many options though: SDL, Allegro, Pygame... to name a few.

Here is what I'm looking for:
- Portability to many platforms, preferably handheld ones (PSP, Pandora, Wiz, Cannoo, Android?)
- Nice 2D features (like rotating, scaling, alpha blending, smooth scrolling, VSYNC)
- Programming language is not an issue, it can require advanced technical knowledge
- Possible hardware acceleration on the most common platforms

I was wondering if you'd have some suggestions for me please. I'm more interested in performance and powerful features, even if that requires extra efforts, because generally I hate to begin a project and realize the technology I chose is not able to put in action what I had in mind ;)

Thank you for your feedback ;)

Cheers
Michoko
 
I don't think the PSP can run anything the Pandora can, so you might have trouble getting portability.
SDL runs on Pandora, I think on Wiz, and I suspect on Canoe, but I can't say about Android since it used only Java until a little while ago, and I don't know if SDL's been ported to it.

Qt has a lot more features than SDL, like OpenGL acceleration, networking, multiple windows, widgets, rotation, scaling, alpha blending, and vector graphics, BUT definitely will not run on PSP and does not run on Android yet. It might not work on Wiz, I can't say. It also is ridiculously huge, but it's a shared library in Linux so each program only loads it once. (probably) It does run on Pandora, desktop Windows, desktop OS X, and desktop Linux. And whatever Nokia bought it for, like the N900.

Edit: Yeah, no, Qt doesn't have joystick support. I'm probably going to mix it with SDL for that. I'm going to need EVERY library.

Pygame is a Python wrapper for SDL.

I've never used Allegro, but it's probably a similar situation to SDL.

Irrlicht would support rotation and scaling since it's technically a 3D graphics engine, but I don't think know if it runs on Wiz and it almost certainly does not run on PSP.

In fact, I can't think of any libraries that run on the PSP. You'd have to ask someone from the PSP community.
 
our zx-81 have provided SDL binaries for psp : http://www.ultimatepsp.fr/forums/programmation/9829-librairies-sdl-pour-psp-pretes-a-lemploi.html (warning french link)

So I guess SDL is the best :)
 
Farox said:
I'm not sure about it but SDL isn't available on Android.
It's available through the NDK, but there are much easier-to-use APIs that fill the same purpose in Android, and a port from SDL to the Android API is simple.
 
Last edited by a moderator:
Allegro is not as widely used as SDL, but have the "Nice 2D features" you want :)
 
Thank you very much for your replies!

Well, I'm not a big fan of the QT option, because I think QT can be rather bulky and I'm not sure all the game related features are present (like joypad handling?). I'd like something a bit lighter, I guess ;) (but thanks for the info, I didn't even think about it in the first place).

I also stumbled upon SFML, which seems to be a modern implementation of an SDL-like lib, but it doesn't seem to be as widely available as SDL on various platforms.

Well, it seems then that I'll have to choose between SDL and Allegro. SDL seems to be the best choice if I want portability to its maximum, mainly because it appears low-level and limited to the most basic features. I'm not very familiar with it yet, but from my understanding, it is just a basic layer for graphic interfacing, right? So I'd have to make my own sprites, collision, scrolling implementations if I wanted to develop a game?

On the other end Allegro seems more advanced in terms of features... LOL that's always been my problem: trying to figure out the "best" software technology, while I suppose this time would be better dedicated to figuring out a cool gameplay concept ;)

Anyway thanks again for your help! This is really a great community here. ;)

Cheers
Michoko

PS: Sebt3, it seems that the link to the PSP SDL implementation is dead. I think I'll have to bother ZX-81 if I want to get it from him :)
 
Michoko said:
SDL seems to be the best choice if I want portability to its maximum, mainly because it appears low-level and limited to the most basic features. I'm not very familiar with it yet, but from my understanding, it is just a basic layer for graphic interfacing, right? So I'd have to make my own sprites, collision, scrolling implementations if I wanted to develop a game?
SDL_mixer also provide function to play sound and music (lots of format supported) and mix them nicely. SDL also provide abstraction for input (joystick, keyboard, mouse...) etc..

Michoko said:
PS: Sebt3, it seems that the link to the PSP SDL implementation is dead. I think I'll have to bother ZX-81 if I want to get it from him :)
I'm not in the PSP scene (don't own the device in the firt place:p ), but I was sure sdl for psp existed, so this was my first result to my google query :)
 
Last edited by a moderator:
Michoko said:
SDL seems to be the best choice if I want portability to its maximum, mainly because it appears low-level and limited to the most basic features. I'm not very familiar with it yet, but from my understanding, it is just a basic layer for graphic interfacing, right? So I'd have to make my own sprites, collision, scrolling implementations if I wanted to develop a game?
As sebt3 said, SDL handles various sorts of both inputs and outputs. You could likely make a game using no libraries other than SDL.

Pygame, the Python wrapper to SDL, includes sprite classes and collision tests that are very useful. Programming in Python has the advantage that you don't need to compile for other platforms, but I don't know if Python and Pygame are as widely supported as C++ and SDL.
 
Last edited by a moderator:
SDL runs on pretty much everything, including PSP, DS, Wii, GP2X, Wiz, Pandora, iPhone, Android, PC, Linux and Mac - pretty much any device you'd care about, and then some - so if you're aiming for supporting as many platforms as possible, that's the way to go.
 
Back
Top