Sign in to follow this  
Icefox

SDL bindings for various languages

Recommended Posts

Just out of random curiousity, what have been peoples' experiences using SDL with programming languages other than C/C++? I've been thinking ahead a bit to my next game design, a turn-based tactics game, and it occured to me that performance probably won't be much of an issue so I'm free to use a higher-level language. Hurrah! Anyway, there's always pygame, which is good and which I'm familiar with, but I have a weakness for using weird and unusual programming languages, and was wondering what else was out there. I've found two Ruby bindings; ruby/sdl and RUDL, but no information on what makes them different. There's also a Lua library, but my luck with getting Lua to work with packaged libraries has been... spotty. Any other suggestions? My goals are consistancy, reliability, and ease of use more than anything else. Thanks!

Share this post


Link to post
Share on other sites
Well, I've used SDL with FreeBASIC a couple of times, just for test projects, and it seemed to work pretty well. Much easier than doing it with C (no main() syntax to get perfect, although this actually isn't that much of a problem), and it ran just about as fast (maybe a quarter of a millisecond slower). Try it out, the compiler is here . It comes with SDL (after you run install.bat, which takes a while), so you won't have any problems getting it to work. It's syntax is that of QBasic, so it's pretty easy to learn.

Share this post


Link to post
Share on other sites
There's ML Game which is built on OCaml SDL which is an interface between OCaml and SDL.

This website seems to have just been opened and has a great introduction to OCaml. It is a collection of the tuts I used to get into OCaml and has been put into Wiki form, apparently.

OCaml compiles to machine code or byte code, so performance isn't a problem. Note I haven't used any of those libraries, but feel free to contact me about OCaml. As far as I know, it's pronounced like "O Camel".

Share this post


Link to post
Share on other sites
Heh, thanks... Not too interested in most BASIC's I'm afraid, but I'll give it a look anyway.

As for MLGame... Wow, I wish I'd discovered that before I wrote 9/10ths of that stuff in OCaml SDL. :-P Ah well, it's certainly good to have around for the future.

Has nyone ever tried the Ruby or Lua libraries and give some advice on whether they're good or bad?

Share this post


Link to post
Share on other sites
I have worked with SDL in the D programming language.



It is a better C/C++ that is in beta form, but very good to use anyway.

You have the choice of bindings that are loaded at runtime , or bindings that load at compile time

There are also bindings of OpenGL, Lua, SDL (mixer/image), GLFW, and some others.

To prove they work, a screeshot of my current game in D that uses all of the above expect GLFW.

Share this post


Link to post
Share on other sites
i'm working on a (poorly implemented) ant colony simulation in OCaml with SDL atm.
Image Hosted by ImageShack.us

works without any problems, except i had some issues actually compiling the lib with mingw

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this