Jump to content

  • Log In with Google      Sign In   
  • Create Account


Managed and sandboxed scripting engine for .Net


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 earlz   Members   -  Reputation: 105

Like
0Likes
Like

Posted 26 June 2012 - 03:20 AM

Hello there. I'm crossing my fingers this doesn't come across as spam...

Anyway, I was recently scouting for a managed and sandboxed scripting engine for .Net and came across a post here of a engine that didn't quite deliver what most people want. Hopefully I'm different.

I've built a scripting engine in C#. It is completely managed and is a true interpreter. I know that scripting engines are used extensively in games to allow for user modding(such as Gary's Mod and many others) as well as for other purposes.

I'm currently looking for beta testers and feedback on this scripting engine I've made(named Scripter2).

The scripting language used is similar to Lua, Javascript, and PHP.

Here is an example script:

var table=["foo" => "bar","baz" => 10];
return table.foo+(table.baz as string); //returns "bar10"

It's also very easy to use in your game/application and easy to extend. Here is a quick example of implementing a `print` function and executing a script using it:

public void RunScript(string script)
{
Engine=new ScriptingEngine(script);
//Now add our print function
var args=new VariableList();
args.Add(new VariableContainer("message"));
Engine.Global.Add(new VariableContainer("print", new FunctionVariable(new ExternalScriptFunction(PrintFunction), args)));
Engine.Execute();
}

BaseVariable PrintFunction(VariableList args, ScriptingEngine s){
string msg=args.Get<string>("message");
System.Console.WriteLine(msg);
}

And here is an example Hello World script for it:

print("Hello World!");
return;


Anyway, if this sounds interesting to you, I'd love to hear some feedback. In the next few days I should hopefully have a simple demo web application so that you can try out it's syntax more as well.

Also, for full disclosure, I plan to sell this scripting engine whenever it reaches 1.0. Beta testers of course will get a commercial license for free though.

If you want more information about it or want to contact me by email, you can check out the beta-testing post I put on my blog at http://lastyearswish...aa5d825b303f18b

Thanks

Edited by earlz, 26 June 2012 - 03:21 AM.


Sponsor:

#2 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 27 June 2012 - 03:01 AM

Tbh, I'm fine with lua interface.

#3 earlz   Members   -  Reputation: 105

Like
0Likes
Like

Posted 27 June 2012 - 03:04 AM

Tbh, I'm fine with lua interface.


I'm sure a lot of people are. What I bring to the table though is support for a Scripting Engine where P/Invoke isn't an option and neither are the many dynamic .Net languages out there(due to missing Reflection.Emit).

Though I haven't tested it just yet, I know my Scripting Engine at least compiles(and should work) on xbox 360, Windows 7 phones, and on Android phones via Mono For Android.

#4 Ashaman73   Crossbones+   -  Reputation: 6740

Like
0Likes
Like

Posted 27 June 2012 - 07:13 AM

Also, for full disclosure, I plan to sell this scripting engine whenever it reaches 1.0. Beta testers of course will get a commercial license for free though.

A .net only, commercial vm Posted Image , good luck.

What about advanced features like multithreaded, lockless inter VM communication, that is something I really miss in lua.

#5 phayer   Members   -  Reputation: 150

Like
0Likes
Like

Posted 27 June 2012 - 07:28 PM

Well, if you plan to use it on the XBox 360 and WinPhones you should really think about the GC first as thats the number one problem with scripting on the XBox it seems [?]

Just what I've picked up lurking @ AppHub forums.

#6 earlz   Members   -  Reputation: 105

Like
0Likes
Like

Posted 27 June 2012 - 07:36 PM

Well, if you plan to use it on the XBox 360 and WinPhones you should really think about the GC first as thats the number one problem with scripting on the XBox it seems [?]

Just what I've picked up lurking @ AppHub forums.


Yes, I have a lot of work to do in that area I assume. But, even though my scripting engine might waste a lot of memory right now, it will actually work at least. Reflection.Emit is flat out not supported on those platforms, but is what most of the scripting languages I've seen rely on.

I plan on trying to make my scripting engine as lean as possible and making sure that it works in such memory restricted environments. That's part of the reaosn why I need beta testers :)

#7 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 28 June 2012 - 04:34 AM

Have you given a name for the scripting language or have you implemented an existing one?

#8 earlz   Members   -  Reputation: 105

Like
0Likes
Like

Posted 28 June 2012 - 02:32 PM

Have you given a name for the scripting language or have you implemented an existing one?


I've made my own. I don't yet have a name for it though. It resembles javascript so closely though that if you have any experience with it, it should be very easy to learn.

I almost have a demo site done so that you can mess around with the language some. Hopefully that should be done sometime tomorrow

#9 earlz   Members   -  Reputation: 105

Like
0Likes
Like

Posted 28 June 2012 - 09:57 PM

I now have a demo web app online so you can play with the language some: http://scripter2.lastyearswishes.com/




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS