Game scripting continues
13 Aug 1998 22:08:01 -0400

          From comp.compilers

Related articles
Game scripting continues (1998-08-13)
Re: Game scripting continues Martin.Ward@SMLtd.Com (1998-08-16)
Re: Game scripting continues (1998-08-17)
Re: Game scripting continues (1998-08-19)
Re: Game scripting continues (Olivier Lefevre) (1998-08-19)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 13 Aug 1998 22:08:01 -0400
Organization: Pacific Bell Internet Services
Keywords: interpreter


I got some very nice responses from people wrt my first post. Thank
you everyone who gave me great pointers to documents and tutorials, as
well as alternative solutions to my problem that I was not aware of.

As of today, I'm still unsure what to suggest as the course of action
to my boss. In the past, my boss was against maintaining any in-house
tools in order to ship our game - he likes off-the-shelf software.
However, the situation we're in now has him showing increasing
interest in getting a scripting language to write a lot of our game
code. We talked about it, and he stated a couple of requirements that
seemed to me to be a bit out of this world, but here they are:

1.) C++ compatible - we should be able to compile our complete source
in the scripting language and have it run the same (albeit unoptimized
and interpreted) as if we had compiled with VC. (I said, "And how
many years do I get to write this thing??")

2.) Extremely lightweight or non-existant virtual machine backend -
the only thing stopping us from using a language like Java as our
scripting language is that it's so bulky. Plus, we're already hitting
the upper boundaries of RAM utilization in our target configuration
(32MB). Any serious VM will take up another couple MB of ram we
cannot spare.. We need something speedy, that executes near the speed
of compiled code.. not a lot of fluff. Because we'd probably go with
an interpreted bytecode system like Java has, a VM will probably be

The script language, while being C++ compatible, would be a superset
of C++ that would contain useful scripting features for us.

The idea of us crafting a C++ compiler seems crazy .. I haven't seen
too many C++ variants on the internet, so it must be a daunting task.
The grammar alone must be scary! I'm thinking that we can't do it. I
will do more research on alternatives.

Thanks again,
Dave Woldrich
[Writing a C++ compiler is indeed nuts. Writing a preprocessor that lets
you embed scripts in your C++ and massages them into calls to the script
processor is doable and sometimes not a bad idea. But if he wants to have
a compatible compiler and interpreter, that pretty much limits you to
Common Lisp which is a wonderful language but hardly lightweight. I'd
point out that the scripts are supposed to be fast enough that you don't
need to compile them. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.