lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, 15 Oct 2001, Nick Trout wrote:

> I need a cross platform library for developing little 2d games (which
> will be wrapped in Lua). Usual features required, ie. surface/sprite
> rendering, sound, device handling. Networking and thread support
> libraries would be a bonus. At a later date it might be nice to extend
> the system to 3d.
> I'm looking at SDL and Allegro. There seems little between them, only
> really looked superficially. Also spotted ClanLib but they dont look
> so well supported. Previously I have used CDX (which is a DirectX
> wrapper).
> Has anybody used SDL and/or Allegro, that can share any useful
> information? Are there any other libraries that I should be looking
> at? If anybody has used both can they give a comparison. I found the
> discussions/flames on the Allegro mailing list mainly subjective and
> unhelpful. Feel free to reply direct to avoid cluttering mailing list.

I can vouch for SDL.  It's really pretty great.  SDL has many extension
libraries built on top of it; the ones you'll probably want the most are
SDL_mixer (core SDL only provides low-level sound access; SDL_mixer makes
it usable) and SDL_image (loads .jpg, .png, many other bitmap formats).
They're all listed on the website and generally are easy to

SDL hides the platform-specific parts of OpenGL setup as well, if you
venture into 3D.  I ported Soul Ride from Win32 to Linux twice; once using
the native Linux/X11 APIs (educational, but frustrating), and then again
using SDL.  SDL takes care of a lot of dirty, uninteresting platform
peculiarities and presents a clean comprehensible interface to your app.

I started fooling around with a SDL.tolua interface definition file, but
never got it to the point of working.  I'd love to see something like that
finished (if anyone wants my work-in-progress let me know; it's just
basically all the SDL headers inlined into one file, a half cleaned up).

I've never really looked at Allegro.