Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Allegro vs SDL (revisited)

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Allegro vs SDL (revisited)
Evert
Member #794
November 2000
avatar

Quote:

With memmove patch applied I got 140504.09 blits/sec in 8bpp mode, 55492.87 in 32bpp mode versus 126534.13 and 40573.54 before and SDL's 167249.80 and 59295.20.

So, with memmove I see an 11% improvement in 8bpp mode and a 37% improvement in 32bpp mode.

Cheers. In that case, the situation seems to be such that some platforms benefit from this patch and some don't care. In other words, I think the patch should be applied.

Neil Walker
Member #210
April 2000
avatar

Let's be honest now, the relative speed and O/S support is not the issue with SDL being better, neither is the better core functionality in allegro being better. These are academic.

The main difference is (ever since I saw SDL a few years ago), is SDL has an absolutely rubbish website, a crappy repository for libraries, no forum to speak of, and no community spirit.

So, three cheers to Matthew for making the difference between the two ;)

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Thomas Harte
Member #33
April 2000
avatar

Quote:

"Allegro vs SDL" benchmarks are more than useless. The speed is comparable and the differences are mainly results of your specific hardware combination/drivers.

With all due respect, that statement doesn't hold true on OS X where neither offers any acceleration of the DirectDraw style mode. For both it is OpenGL or nothing. Both of the drawing tests are pure software, which is something both do using their own specific code. Neither use any sort of OS driver or hardware other than the CPU for those tasks. That memmove is able to make such a difference (blitting speed +37% in 32bpp mode on the tiny benchmark thing, as stated above) shows that your comments do not universally apply.

Quote:

The main difference is (ever since I saw SDL a few years ago), is SDL has an absolutely rubbish website, a crappy repository for libraries, no forum to speak of, and no community spirit.

I can't be bothered to remind you again that SDL has a usenet group on a free to access usenet server which is mirrored to a mailing list for people who can't be bothered to download a usenet client. You might not like usenet, but that does not mean that it does not provide a "forum to speak of".

EDIT: it additionally has a web interface for reading and searching the usenet group.

Mokkan
Member #4,355
February 2004
avatar

I prefer SDL to Allegro... probably not for the best reasons, but still enough for me to prefer it :P. But my reasons are:

-Easier to use with OpenGL (better OpenGL support?)
-More functionality, with the standard libraries (SDL_image, SDL_mixer, SDL_net, SDL_rtf, SDL_ttf, which are all optional)
-Better event handling
-No END_OF_MAIN
-A bunch of other things which are probably just my opinion

What I don't like about SDL:

-Annoying to compile under Windows
-Redirection of stdout and stderr to temporary text files, which can't be disabled (I've only noticed this on Windows)

So yeah... that's what I think. I do love Allegro... it helped me learn a lot about programming, not just for games. But I find that I can get a lot more done when I use SDL...

Thomas Harte
Member #33
April 2000
avatar

Quote:

Redirection of stdout and stderr to temporary text files, which can't be disabled (I've only noticed this on Windows)

Link against SDLMain_NOSTDIO rather than normal SDLMain to disable that. You certainly end up building NOSTDIO libraries if you build from source in MSVC, I couldn't comment on the prepackaged development packages or the targets built by other compilers.

Mokkan
Member #4,355
February 2004
avatar

Quote:

Link against SDLMain_NOSTDIO rather than normal SDLMain to disable that.

Ooh, I could never find a solution to that... thanks much :). Perhaps I just didn't search hard enough, hah...

HoHo
Member #4,534
April 2004
avatar

Quote:

-No END_OF_MAIN

I always find it a bit funny if someone said lib X is better than lib Y because I don't have to write one certain line of code in my projects :)

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

-Easier to use with OpenGL (better OpenGL support?)

I find Allegro+AllegroGL quite easier, and significantly more functional. SDL discourages using its graphics API when using OpenGL, where AllegroGL is designed to let you use Allegro's graphics API with it. AllegroGL also autoloads all known OGL extensions for you and lets you use them right away, where with SDL you still need to declare and grab the function pointers manually.

Quote:

-More functionality, with the standard libraries (SDL_image, SDL_mixer, SDL_net, SDL_rtf, SDL_ttf, which are all optional)

Yay, more DLLs to worry about. :P And instead of one extra switch at link-time, you have to worry about which parts you're using and add the right ones.

Quote:

-No END_OF_MAIN

Forgetting, for a minute, that SDL requires you to declare main a specific way, instead of any stardard-compliant way you want..

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

instead of any stardard-compliant way you want..

Technically speaking with allegro you still can't define it in any standard-compliant way you want (example: leaving off the return type of main).

Realistically speaking, the whole END_OF_MAIN thing is one of the smaller points when deciding MAX(Allegro, SDL).

Evert
Member #794
November 2000
avatar

Quote:

Technically speaking with allegro you still can't define it in any standard-compliant way you want

Yes you can. There are two standard ways:

int main(void);
int main(int, char **);

Both of them work fine. Actually, so should the incorrect non-standard

void main(void);
float main(void);
void *main(int);
char *main(int, int**);

They likely won't work right but hey, that's hardly Allegro's fault, is it? ;)

Quote:

(example: leaving off the return type of main).

Functions that don't specify a return type default to int.

axilmar
Member #1,204
April 2001

I tried to start a GUI project with SDL but I found it very hard, since it lacks a lot of functionality that Allegro has. Additional SDL libraries for drawing stuff are not coded up to the same level as the main library, lack certain functions that are necessary, and many libraries either intersect with each other or offer more things that are necessary. I've found it is easier to use Allegro + Alfont + PThreads than SDL plus tens of little small libraries built around SDL. I guess SDL is more useful when all the extra stuff Allegro has is not needed.

Thomas Harte
Member #33
April 2000
avatar

Kitty Cat said:

I find Allegro+AllegroGL quite easier [than SDL]...

Kitty Cat said:

Yay, more DLLs to worry about. :P And instead of one extra switch at link-time, you have to worry about which parts you're using and add the right ones.

Draw your own conclusions.

Kitty Cat said:

SDL requires you to declare main a specific way, instead of any stardard-compliant way you want..

Evert said:

There are two standard ways:

I think Dustin Dettmer says it best:

Dustin Dettmer said:

Realistically speaking, the whole END_OF_MAIN thing is one of the smaller points

As for:

axilmar said:

I tried to start a GUI project with SDL but I found it very hard, since it lacks a lot of functionality that Allegro has.

Well I would find a GUI project very hard in either because both lack about 99% of the functionality of Cocoa.

axilmar
Member #1,204
April 2001

Quote:

Well I would find a GUI project very hard in either because both lack about 99% of the functionality of Cocoa.

I was talking about a GUI library, not a project with a GUI interface. Allegro makes it easier to write a GUI library, since it has drawing functions and other things.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Draw your own conclusions

AllegroGL doesn't have a DLL by default. :P But past that, yes, I do find the extra links annoying, though when the two are integrated that won't be a problem.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

 1   2 


Go to: