Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

asdasd12345

More idiot friendly - SDL or Allegro?

This topic is 5421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Its all a matter of opinion. Me id say choose sdl because its cross platform anda wrapper for opengl and direct x. Another good thing is u can get plugins for sdl that have networking and text. So on So Forth. Get Sdl!



Share this post


Link to post
Share on other sites
Allegro seems to support more features directly without the need for third-party libraries but this is due to the decision to keep the core SDL library as lightweight as possible.

I personally found SDL easier to use as you dont have the hassle of aquiring and releasing the screen and keyboard before you can do anything for example.

My 2D game engine

Share this post


Link to post
Share on other sites
Why bring up the argument ''cross-platform'' to newcomers in gamdevelopment? Generally, you don''t start off with developing a platform independent game. To a newcomer the simpleness matters most.

Share this post


Link to post
Share on other sites
A couple of pluses allegro has over SDL is the resource packing system and built in font display. You can use the font bitmap tool to generate your fonts, then pack them up with all of your other images, audio files and string tables into a nice little compressed dat file.

Share this post


Link to post
Share on other sites
>When you say acquiring and releasing the screeen, do you mean the 'GetDC()' command.<

No, you don't need to deal with that, and personally I haven't tried SDL so I can't really tell which one is easier. I'll give you a small code sample so you get an idea what it looks like

#include <allegro.h>

int main()
{
allegro_init();
install_timer();
install_mouse();
install_keyboard();

set_color_depth( 16 );

set_gfx_mode( GFX_AUTODETECT_FULLSCREEN, 800, 600, 0, 0 );

//create offscreen bitmap

BITMAP *buffer = create_bitmap( SCREEN_W,SCREEN_H );

while(1)
{
clear( buffer );

//do your rendering here...


//flip buffer to the screen

blit( buffer, screen, 0, 0, 0, 0,SCREEN_W,SCREEN_H );
if( key[KEY_ESC] ) break;
}

destroy_bitmap( buffer );

return 0;
}
END_OF_MAIN();




[edited by - FtMonkey on January 12, 2004 7:23:36 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!