lua-users home
lua-l archive

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

I thought there was a lua binding for SDL somewhere? cannot remember
where now..

Anyway, just to share some experiences with SDL and Lua. The two are
actually a good match, and our own title, which was already launched,
had both them. There isn't any great performance penalty either.

The only pain we had is, SDL does not support line input (not
just keystrokes, but line input with platform native IME).
But it is probably not supported anywhere in any game SDK, so we
ended up using a not-so-nice hack to hide Windows/X11 IME behind
the scene.

We pretty much had every bit of the core (db access, GUI, scene &
sprites, events, network, etc) accessible through Lua, and the entire
game was about 20,000+ lines of lua codes, including resource
settings. It was great.


On Mon, Oct 15, 2001 at 10:17:14AM -0400, Thatcher Ulrich wrote:
> 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
> use.
> 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.
> -Thatcher