Search Unity

Scripter2: A Scripting Engine that will run "everywhere"

Discussion in 'Works In Progress - Archive' started by earlz, Jun 27, 2012.

  1. earlz

    earlz

    Joined:
    Jun 27, 2012
    Posts:
    5
    Hello, hopefully this is the correct forum for posting this. Anyway, I've created a true Scripting Engine for .Net that makes no use of Reflection.Emit. This means, unlike most, it will run on Android, iPhone, XBox360(for indie games), and hopefully just about everywhere else that .Net exists.

    I'm currently evaluating markets and Unity seems like one that would greatly appreciate this. I know that scripting languages are very commonly used in games, be it for modding, or just so that updating some behaviors are easier and such.

    Anyway, I'm currently looking for beta testers and feedback for Scripter2.

    Here is a quick overview of Scripter2:

    1. A simple dynamic language akin to Lua, PHP, and Javascript
    2. Easy to extend with your own functions and "classes" (using table facilities similar to Lua)
    3. Completely managed and static code. No P/Invoke. No Reflection.Emit.
    4. Runs nearly everywhere there is a .Net framework.

    You can find more information and some example code from this blog post: http://lastyearswishes.com/blog/view/4fe97af34aa5d825b303f18b

    After beta testing is over, I plan on packing it into a Unity Asset and selling it on their market. I also plan on selling it at Binpress. Beta testers of course get a free commercial license though.

    Anyway, I'd love some feedback so tell me what you think :) Is this something the community would appreciate?
     
    Last edited: Jun 28, 2012
  2. pivotraze

    pivotraze

    Joined:
    Feb 4, 2012
    Posts:
    593
    It would certainly be very interesting to check it out. I just don't see what it really adds to Unity. It's syntax is similar to C#/JS, but they both already run on every platform platform, practically...


    I would love to beta test it though.
     
  3. earlz

    earlz

    Joined:
    Jun 27, 2012
    Posts:
    5
    What it adds is that you can change a script and not have to recompile.

    What you can do with it is basically something like

    string script=LoadFromConfig(...);
    RunScript(script);

    and that way you can ship one script with your game to, say, control a game character. And one of your users can then easily mod your game without having the source code or anything so that a game character behaves differently for example.

    Basically, it lets you change behaviors in your game without having to recompile your game
     
  4. kablammyman

    kablammyman

    Joined:
    Nov 22, 2010
    Posts:
    507
    now your players can modify the game, not just you. (well, the parts you allow to be modified by a script)
     
  5. earlz

    earlz

    Joined:
    Jun 27, 2012
    Posts:
    5
  6. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Whats the speed on this compared to e.g Lua?
     
  7. earlz

    earlz

    Joined:
    Jun 27, 2012
    Posts:
    5
    I know it will be slower than Lua because it's interpreted(rather than native/JIT). But really, I'm not quite sure. I haven't done a whole lot of speed testing quite yet. You probably don't want to implement an expensive algorithm with this regardless
     
  8. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    I believe that iOS is going to be a problem for you. Unless they changed it, the developer rules don't allow interpreted scripts (that's why Unity pre compiles it's scripts for iOS.

    Cheers
     
  9. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Just curious : )
    Modding scripts and stuff usually are very simple
     
  10. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Would it be possible to make some stuff not possible to users? or add in other stuff?
     
  11. earlz

    earlz

    Joined:
    Jun 27, 2012
    Posts:
    5
    I believe you're referring to the clause that put MonoTouch in "questionable" territory. That clause I believe was completely removed sometime in 2010 or 2011. Either way, they also made exceptions. I'm not completely for sure, but I do know they at least revised it to allow something like this.

    I believe this portion of the license was completely removed still though.

    I don't have a "standard library" or anything built(yet?), but it comes preconfigured so that users are stuck in a sandbox. This means they can't really do anything but calculate things and return a result. It's easily extended though so that you can add an interface to a C# function(and therefore, break out of the sandbox).