![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Benchmark: Allegro and SDL |
Rodrigo Monteiro
Member #4,373
February 2004
![]() |
I think that it should also be mentioned that Allegro is essentially public domain while SDL is LGPL. I've also considered many times using SDL, simply because I prefer using OpenGL, anyway, and don't need the vast majority of Allegro's functions... I just haven't managed to take that step yet. [EDIT] Besides, Allegro has the Speedhack... that alone should be worth it, right? _____________________________ |
Vanneto
Member #8,643
May 2007
|
Whats wrong with the LGPL? You dont have to include the license if your program is closed source. You can sell your program. LGPL FTW! P.S. Still, no license is better than any license In capitalist America bank robs you. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote:
P.S. Still, no license is better than any license No licence means its 100% proprietary, and no one is technically aloud to use, or distribute it. A licence is just an "easy" way of giving broad permission to "people" to use and/or distribute your work. -- |
Richard Phipps
Member #1,632
November 2001
![]() |
I'm now using PTK instead of Allegro, and even though it's a bit buggy and I'm not that fond of the API, it gives me all the basics needed and hardware acceleration (via OpenGL or DirectD3D). |
Thomas Harte
Member #33
April 2000
![]() |
I'm about to run for a train, so no time to post at length. Apologies for that, keep in mind that I'm not being deliberately short. Quote:
Re: Not use 100% CPU Oh, I didn't mean the example specifically. It's clearly meant to be a stress test, so 100% CPU is appropriate. Quote: SDL_image forces me to include a whole JPEG library. No it doesn't. It can load the LibJPEG (or whatever its called) DLL at runtime, and simply not load JPEGs if the DLL isn't present. Quote: Okay, I'm wondering what else needs to be done to prevent a 100% CPU usage outside of using rest(1). Implementations vary, but the basic idea is that you either (a) use a vsync that sleeps properly (Allegro's may work, it's written in such a way that it may also silently fail); or (b) apply some simple timing logic. You know how many FPS your game is supposed to work at. So you can work out how long each frame should take. You can also use timing to work out how long each frame has taken. And you can use rest to sleep for the number of milliseconds you specify. So you don't need to use 100% CPU. We discussed this quite loudly recently, and opinions clearly vary, but for 'pure Allegro' (i.e. no extra libraries), I like this:
Apologies, the above is just typed from the top of my mind, it isn't thoroughly checked. [My site] [Tetrominoes] |
Neil Walker
Member #210
April 2000
![]() |
I haven't read every message and don't know SDL, but surely SDL is using video and the allegro code is using memory buffers, which means the tests aren't equal in any way. Change the create_bitmap to create_video_bitmap and try it again. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Thomas Harte
Member #33
April 2000
![]() |
Quote: but surely SDL is using video and the allegro code is using memory buffers I don't think so — "SDL_CreateRGBSurface(SDL_SWSURFACE...)" means create a surface for the fastest possible software blitting, which on a PC means the same as creating a memory bitmap in Allegro. The DisplayFormat thing just makes sure that all the bytes/depths/etc are the same as the display buffer. So it creates a new surface, does a colour conversion blit to it from your original, and returns it. EDIT: I spotted a logical error in the not-100% CPU code I posted above. You should probably change this bit: else { we're too slow, just jump up to date skip next frame; framestart = my_timer_var; } To something like: else { we're too slow, just jump up to date skipped_count++; if(skipped_count&7) skip next frame; framestart = my_timer_var; } So that if the computer in question just is too slow to play your game, you still display something, allowing the user to realise what is going on. In this case you'll display every 8th frame, still going too slowly. [My site] [Tetrominoes] |
sigmar
Member #2,343
May 2002
|
Allegro is good for: one-hour hacking, simple testing, games, learning(?); you can scrape something together fairly fast from scratch or mod a previous project without too much thinking about hardware-level. SDL is good for: providing an engine layer for a semi-serious (gamedev?) project. What you basically do when using SDL is to re-code Allegro as far as you need it. Of course it's faster etc., and combined with OpenGL also more powerful; nothing stops you from actually achiving commercial outlook with some labour (scenegraphs etc are available, OI e.g.). Now once you have a basecode set up, engine ready, SDL is as easy as you make it; possibly easier than Allegro. Allegro is a general-purpose gamedev lib for simple apps and has primarily hacking interest to me (although there are impressive Allegro projects as well, of course). |
Michael Faerber
Member #4,800
July 2004
![]() |
Oh no! EVERYBODY'S LEAVING! COME BACK! COME BACK TO UNCLE ALLEGRO!
-- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
When I switched to SDL the graphics got way better, I finished all of my games, and millions of people started playing them. |
Thomas Harte
Member #33
April 2000
![]() |
Quote: When I switched to SDL the graphics got way better, I finished all of my games, and millions of people started playing them. If you like SDL, you should try programming in HTML. [My site] [Tetrominoes] |
Richard Phipps
Member #1,632
November 2001
![]() |
Naw, Matthew doesn't like to use variables.. |
Neil Walker
Member #210
April 2000
![]() |
Quote: means create a surface for the fastest possible software blitting In that case, he should use create_system_bitmap Quote: When I switched to SDL the graphics got way better Is this why www.sdl.cc redirects to allegro.cc, is there something you haven't told us Matthew Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
GullRaDriel
Member #3,861
September 2003
![]() |
Quote:
Is this why www.sdl.cc redirects to allegro.cc, is there something you haven't told us Matthew Incredibly it is the case ! I'm dumb! ! ! ! For all those SDL's addict: don't they have a forum for SDL related things ? Didn't you noticed that there is the word 'allegro' in each page of allegro.cc website ? PS: The last comment is just pure jerk. "Code is like shit - it only smells if it is not yours" |
Simon Parzer
Member #3,330
March 2003
![]() |
There is no such thing as an SDL community. There is only a mailing list for technical problems related to SDL. |
GullRaDriel
Member #3,861
September 2003
![]() |
So, just for that, SDL sucks. A project without a community is / not fun / boring / pure shit . "Code is like shit - it only smells if it is not yours" |
Neil Walker
Member #210
April 2000
![]() |
Quote: A project without a community is / not fun / boring / productive Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
|
1
2
|