Good idea! We are also using pyScheme in our project Thousand Parsec, http://www.thousandparsec.net/tp/
We needed a way to transfer "calculation methods". When designing a new ship all the properties of the ship need to be calculated when components are added or removed. For example the mass property is defined to be a simple addition of all the components mass property. While more advanced properties like speed use more complex calculations. Each server can have there own set of properties and the client can still calculate them without asking the server after each click. We decided to us a subset of Scheme as the language to transfer calculations. The reason we choose scheme is because there is an implementation in almost every language under the sun. For example there are about 20 implementations in C, about 3 in Python, about 6 in Java, 1 in Visual Basic. It is also trivial to implement a basic Scheme interpreter. There are also pretty good scheme learning environments like DrScheme and MzScheme. The implementation was pretty painless and has worked really well. Hope this helps. Tim Ansell On Sat, 2006-07-15 at 22:15 -0700, andrew baker wrote: > Howdy, > > I've been pondering alternative methods to allowing unknown persons to > submit game code in my game engine, e.g. player created levels, > characters, monsters and items, but of course sandboxing Python code > is nontrivial. I've hit upon using a Scheme interpreter in Python to > potentially solve this problem, with a possible variation on parsing > to make the Scheme code appear more Pythonic. Has anyone had similar > success or failure or a better understanding of Scheme than me who > explain why this is A) awesome or B) teh suck. > > And, yes, I know how daft it may seem to embed another interpreted > language inside an interpreted language, but I'm expecting rather > small Scheme patterns, and Python in its current state simply cannot > be sandboxed, and I think I might actually hate C++. :D > > Thanks, > > -- > Andrew Ulysses Baker > "failrate"
