Ruby/Python/LUA scripting within a C/C++ SDL game?

We are interested in developing some commercial games in C/C++ using SDL, but
are interested in keeping some of the AI and game logic in a higher-level
scripting language.

Anyone have any experience with using a built-in interpreter using Python, Ruby,
or LUA to write a good portion of your higher-level game logic?

I have seen PyGame and Ruby/SDL but these are really geared for writing the
entire game in Python or Ruby, but I am only interested in scripting parts of it.

Thanks!
Christopher
Executive Producer
DreamQuest Software

Watch this: www.emthesis.com/elf/

Alessandro Rasulo
Emthesis Development s.n.c.
www.emthesis.com | @Alessandro_Rasulo_Em

Get Firefox! Get Thunderbird! Use OpenOffice.org My status

Christopher Williamson ha scritto:

We are interested in developing some commercial games in C/C++ using SDL, but
are interested in keeping some of the AI and game logic in a higher-level
scripting language.

Anyone have any experience with using a built-in interpreter using Python, Ruby,
or LUA to write a good portion of your higher-level game logic?

I have seen PyGame and Ruby/SDL but these are really geared for writing the
entire game in Python or Ruby, but I am only interested in scripting parts of it.

Thanks!
Christopher
Executive Producer
DreamQuest Software_______________________________________________
SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Christopher Williamson <chrisw dqsoft.com> writes:

Anyone have any experience with using a built-in interpreter using Python,
Ruby, or LUA to write a good portion of your higher-level game logic?

http://boost.org/ has a module called Boost.Python that allows the use of Python
scripting in a C++ application. LUA might be better to use, however.

I have seen PyGame and Ruby/SDL but these are really geared for writing the
entire game in Python or Ruby, but I am only interested in scripting parts of
it.

You are right about that.

One other engine you might look into is http://Panda3d.org . It doesn’t use SDL
but has been ported to several platforms. It uses Python and/or C++ as its
scripting language.

Christopher Williamson wrote:

We are interested in developing some commercial games in C/C++ using SDL, but
are interested in keeping some of the AI and game logic in a higher-level
scripting language.

Anyone have any experience with using a built-in interpreter using Python, Ruby,
or LUA to write a good portion of your higher-level game logic?

I have seen PyGame and Ruby/SDL but these are really geared for writing the
entire game in Python or Ruby, but I am only interested in scripting parts of it.

Thanks!
Christopher
Executive Producer
DreamQuest Software


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

http://www.gaffer.org shows you how to embed the python interpreter into
you c++ application and easily execute scripts from within your c++ app.
inclusive parameter passing.
http://www.gaffer.org/archives/category/ruby/

Anyone have any experience with using a built-in interpreter using Python, Ruby,
or LUA to write a good portion of your higher-level game logic?

For Lua you should use LuaBind. It has a bit of a learning curve but
works very well. Keep in mind that Lua was specifically designed to be
embedded, which is not the case with many other scripting languages.

http://www.rasterbar.com/products/luabind.html

Anyone have any experience with using a built-in interpreter using
Python, Ruby,
or LUA to write a good portion of your higher-level game logic?

For Lua you should use LuaBind. It has a bit of a learning curve but
works very well. Keep in mind that Lua was specifically designed to be
embedded, which is not the case with many other scripting languages.

If you plan to use LUA in plain C (like we do), read that:

http://www.debian-administration.org/articles/264

Surely there are other tutorials, but I found that one to be really
simple.

RegardsOn 11 Apr 2007, at 8:33 PM, Ilya Olevsky wrote:


Kuon

“Your computer requests another OS, deny or allow?”
“You should stop playing with that, or it will eventually works.”

Company website:
http://www.goyman.com/

Personal blog:
http://arkhi.goyman.com/blojsom/blog/default/