Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scheme as an embedded game scripting language.

38 views
Skip to first unread message

Ian Millington

unread,
Mar 11, 2003, 8:36:55 AM3/11/03
to
All,

I am writing a book chapter on game scripting technologies. I want to
mention Scheme, but I don't have any first-hand knowledge of using it in a
real-time embedded context. I've heard it mentioned by other developers as a
possible choice, but I can't find anyone who admits to actually doing it.

I've used Scheme myself in a stand-alone way, so I know about its syntactic
and semantic properties.

Can someone evangelise Scheme for embedding? Or else point me to resources
that can answer questions such as:

What embeddable implementations are there?
What is the (ball-park) structure of the VM?
What speed / memory hits do you get?


Thanks in advance folks,

Ian.

Bill Clementson

unread,
Mar 11, 2003, 1:59:02 PM3/11/03
to
"Ian Millington" <i.mill...@mindlathe.com> wrote in message news:<lznba.381$Wb...@news-binary.blueyonder.co.uk>...

> I am writing a book chapter on game scripting technologies. I want to
> mention Scheme, but I don't have any first-hand knowledge of using it in a
> real-time embedded context. I've heard it mentioned by other developers as a
> possible choice, but I can't find anyone who admits to actually doing it.

Naughty Dog used a lisp-like language in a number of their games. Have
a look at the following urls for some more info:

http://www.franz.com/success/customer_apps/animation_graphics/naughtydog.lhtml
http://www.gamasutra.com/features/20020710/white_02.htm

and a thread on comp.lang.lisp:
http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=4bs0jaurq.fsf%40beta.franz.com&prev=/groups%3Foi%3Ddjq%26as_ugroup%3Dcomp.lang.lisp

--
Bill Clementson

Jens Axel Søgaard

unread,
Mar 11, 2003, 2:45:36 PM3/11/03
to

FreeCraft uses an embedded SIOD:
http://sourceforge.net/projects/freecraft/

While looking for FreeCraft, I fell over Mote, which
apparantly also uses an embedded Scheme:

http://mote.sourceforge.net/

--
Jens Axel Søgaard


Matthias Heiler

unread,
Mar 11, 2003, 3:30:24 PM3/11/03
to
Ian Millington wrote:

> All,
>
> I am writing a book chapter on game scripting technologies. I want to
> mention Scheme, but I don't have any first-hand knowledge of using it in a
> real-time embedded context. I've heard it mentioned by other developers as
> a possible choice, but I can't find anyone who admits to actually doing
> it.

There is an article by Shiro Kawai on "Scheme for Real-time CG Content
Production" on http://www.shiro.dreamhost.com/scheme/index.html

Matthias

Ian Millington

unread,
Mar 11, 2003, 4:14:46 PM3/11/03
to
Okay I was aware of Jak & Daxter. But this didn't use embedded scheme; it
used a custom written compiler for a custom LISP lanugage. The compiler was
also written in LISP.

I have a separate section on creating custom languages based on existing
tools.

I'm interested in embedded scheme (or LISP). I don't need concrete examples,
I would be happier if someone is willing to advocate why and how scheme
could be a used in an embedded context.

None of the scheme sites I have googled give good information on embedding
into C/C++.

The open-source projects look interesting. I'll email the maintainers. My
suspicion is, however, that the much lower resource requirements of
open-source games means that they are unlikely to be good benchmarks.

Ian.


"Jens Axel Søgaard" <use...@soegaard.net> wrote in message
news:3e6e3d0d$0$152$edfa...@dread11.news.tele.dk...

Neil W. Van Dyke

unread,
Mar 11, 2003, 5:49:59 PM3/11/03
to
"Ian Millington" <i.mill...@mindlathe.com> writes:
> I am writing a book chapter on game scripting technologies. I want to
> mention Scheme, but I don't have any first-hand knowledge of using it in a
> real-time embedded context. I've heard it mentioned by other developers as a
> possible choice, but I can't find anyone who admits to actually doing it.

One embeddable Scheme implementation was almost used for a high-profile
MMORPG. IIRC, their legal department got bogged down in licensing
questions on that particular implementation long enough that they had to
move forward with their second choice (a non-Scheme). It was a silly
incident, since there were better Scheme implementations with welcoming
licenses that would've been great for the game.

> Can someone evangelise Scheme for embedding? Or else point me to resources
> that can answer questions such as:

One particular strength Scheme has as an extension language is that its
especially powerful syntax extension mechanisms can be used to turn
complicated and error-prone API code patterns into clean and safe
syntactic forms, while retaining the full power of Scheme.

And of course, Scheme has the usual Lisp strengths at symbolic
manipulation, which is good for game AIs. Scheme's support for
continuations makes some AI algorithms, such as backtracking searches,
easier.

The best Scheme implementations are fast -- and certainly faster than
the canonical implementations of Python and Java.

> What embeddable implementations are there?

Quite a few of the following are embeddable, and others have FFI:

http://www.schemers.org/Documents/FAQ/#implementations

I primarily use PLT Scheme, which comprises the embeddable MzScheme and
the DrScheme programming environment. Like many implemementations (and
unlike the oddball one chosen by our hapless MMORPG people), it has a
well-defined and accomodating license. The partitioning of Scheme
environments used in the implementation of DrScheme may have useful
application in games, though I haven't yet looked closely. Detailed
docs on embedding:

http://download.plt-scheme.org/doc/203/html/insidemz/index.htm

More info:

http://download.plt-scheme.org/doc/
http://www.plt-scheme.org/

There are other excellent Scheme implementations, which have different
performance characteristics and features, so which you choose is
sensitive to your particular application. There are enough good
implementations that people don't like to try to enumerate the best ones.

BTW, there's a tangential risk-management benefit to the diversity of
Scheme implementations: to some extent, you can develop for a particular
implementation and later (say you encounter a scalability issue late in
development) retarget to a different Scheme implementation more easily
than you could retarget to a different language. (Small example: a
library I wrote a couple years ago was developed specifically for one
Scheme implementation, portability be damned, but was recently ported to
a different implementation, then quickly made portable to 13 different
ones. If I'd had to switch to a non-Scheme language, I would've had to
rethink the entire approach to the algorithms, rather than just tweak
the few portability issues.)

--
http://www.neilvandyke.org/

Harvey J. Stein

unread,
Mar 12, 2003, 10:48:39 AM3/12/03
to
"Ian Millington" <i.mill...@mindlathe.com> writes:

> I am writing a book chapter on game scripting technologies. I want
> to mention Scheme, but I don't have any first-hand knowledge of
> using it in a real-time embedded context. I've heard it mentioned
> by other developers as a possible choice, but I can't find anyone
> who admits to actually doing it.

abuse (http://abuse2.com/) uses a lisp config language:

Engine has built-in Lisp Interpreter. You can add code into the
game, or create a whole new game which is instantly ported to many
platforms, has lighting, sound, mouse/joystick, network, hi-rez and
window support. You will be able to licence copies of the engine
to sell as your own.

--
Harvey Stein
Bloomberg LP
hjs...@bloomberg.com

Thant Tessman

unread,
Mar 14, 2003, 4:45:23 PM3/14/03
to
Ian Millington wrote:

> I am writing a book chapter on game scripting technologies. I want to
> mention Scheme, but I don't have any first-hand knowledge of using it in a
> real-time embedded context. I've heard it mentioned by other developers as a
> possible choice, but I can't find anyone who admits to actually doing it.

[...]

Disney's virtual reality implementation of Aladdin's Magic Carpet Ride
used Chez Scheme as a scripting language. Worked great.

-thant


0 new messages