Re: A few questions about scripting
Will Vale <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Organization | Second Intention Limited |
| Message-ID | <op.vbulwcsj6q9wgg@pimmetje> |
On Wed, 28 Apr 2010 07:43:36 +1200, Mickael Pointier <[email protected]> wrote: <snip excellent argument for concise domain-specific languages> I think this > - you get as many different scripts as you get people (too many ways to > do the same thing) and this > - programmers will write scripts that non programmers will not be able > to understand are really important. As a programmer I find it far to easy to get excited about scripting languages at a language/implementation level. At Particle the team developed a domain specific language for scripting missions in I-War - it sounds similar to what you describe, with syntax like asm (mnemonics and arguments, one line to a construct) but with each instruction doing a whole lot of game relevant stuff. For I-War 2, we knew we were making a much more complex game (free form vs. mission based) and we wanted to let the designers script some gameplay systems as well as missions. We developed a C-like script language with the usual extra bits (serialisation, calling native code or script code, dynamic loading, mild concurrency, etc.) to achieve this. All well and good, but while we achieved our objective of scripting the game systems quite well, the mission scripting got really difficult. The more powerful language was more verbose and there were lots of ways to do things. Note that this wasn't because the language core was very big, it wasn't, but because all the game-specific functionality was in packages of script or native code. So everything required wordy function calls. Great for extensibility, terrible for brevity. For coders it was great, fun to write, fast turnaround with dynamic loading, and easy to prototype with. Some designers got it, and re-used code and created packages of useful stuff - they could script a mission in ~20K of source code. Some didn't, and there was lots of duplication, and it took 100KB+ to do a similar thing. Given that we had a lot of mission content to create, this was clearly the wrong balance. If I'd been smarter we would have kept the old script language, or something similar, as a third layer and used it for what it was clearly good at. If I'd been really smart we could have compiled it to the same bytecode so we'd only have had to maintain one runtime system. In my defence I was a lot younger at the time... Will _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com