Some thoughts on scripting

Mar 16, 2009 at 7:45 PM
Hello,

Please keep in mind that i do not wish this to come through as unthankful, but what you have here is definitely not scripting.
Some scripts never compile at all, rather they are interpreted. Some scripts DO compile, but never in advance, always at runtime only.
What you have here is just having a piece of code in a different assembly. Sure that enables the user to recompile the assembly that contains the scripts only as opposed to re-compile the entire engine, but still the fact remains that you have to compile the assembly containing the scripts manually before run-time.
My idea of c# based scripting is having a bunch of .cs extension files that change the behavior of the application without ever having to even open Visual Studio or any other compiler at all.
Basically the application should compile them itself (msbuild!) when it starts up - keeping them in memory and releasing them when unloading.
There exists a library that does just that, its incredibly useful, and very easy to integrate, i have done it in the past myself. Maybe you want to take a look at it: http://csscript.net/

Sorry if i sounded rude.

Regards,

Peter

Coordinator
Mar 16, 2009 at 8:26 PM
Edited Mar 16, 2009 at 8:29 PM
Hi Peter!

Ox's "scripting" system does precisely what a game scripting system is supposed to do in the abstract - that is give the developer a way to define game logic outside of the engine. It allows the developer to define behavior for data-driven game entities that were put together in the editors. When and where the code is actually compiled is an irrelevant technical detail, in my view.

When first developing Ox's scripting system I looked into using csscript and its alternatives, but they just will not work on the Xbox. Since Ox is cross-platform, a different tact had to be taken, thus you have what you have today :)

If you can find a more pure scripting system that will work on the Xbox in practice, though, please bring it to my attention :D

Thanks!
Mar 16, 2009 at 9:14 PM
You are absolutely right, i forgot that the compact .Net framework on the Xbox doesnt support MsBuild at all.
Feb 14, 2010 at 1:40 PM

You can take a look at the following scripting framework: http://www.orbifold.net/ssharp