Feature Requests

May 24, 2009 at 4:31 AM

Hi!  this is an awesome project, and i'm really looking forward to it's release!

However, I'd like to chime in on what I think is actually "IMPORTANT", at least from my perspective, and then also the "not important".  You don't have to agree with these, but from a consumer's perspective, I think it's useful for you to get this feedback :)

Important:

  1. C# to LUA invocation
    • be able to invoke lua methods/scripts conditionally from c#
  2. LUA to C# invocation
    • be able to invoke any C# method from lua.
    • for security purposes, I think some "registeration" system would be good (so can only invoke methods that have been registered)
  3. Runtime script parse and execution
    • be able to create a lua script (string form), parse it, and then execute it from runtime on the CF.NET
  4. Debugger / Compiler errors
    • some way of diagnosing script compiler errors and hopefully debugging through a script's execution.

Not Important

  1. lua libraries
    1. using #2 from the "important" section, you'd have access to the entire .net SDK.  save the lua-friendly libraries for v1.1 !

 

Okay, hope that helps :)

Coordinator
May 24, 2009 at 5:24 AM

Thanks for the feedback! I'm definitely interested in hearing what everyone would like to see in SilverLua.

Important:

  1. C# to LUA invocation
    • v1.0 might only be limited to running a full script file, rather than invoking a single function from a script. We'll see.
  2. LUA to C# invocation
    • I think you'll be pleased to see what I have planned for this. :) It will be pretty seamless to expose C# methods to Lua.
  3. Runtime script parse and execution
    • Yes, definitely! This was the primary motivation for SilverLua, since this was a feature that XNua lacked.
  4. Debugger / Compiler errors
    • I've got some plans for debugging support in the future, but I'm trying to keep v1.0 slim at the moment. Similarly, compiler errors will unfortunately be pretty dumb. But this will all change in future versions.

Not Important

  1. lua libraries
    1. Agreed, though I will be exposing some XNA Framework APIs in a "standard library". This won't be difficult to do, and it's a nice-to-have

Please feel free to continue submitting your feature requests.

May 29, 2009 at 4:50 PM

looking forward to this!  keep fighting the good fight, i know it's tough making a compiler :)

Jun 23, 2009 at 3:57 PM

There are two things that would be interesting. For both I'm not sure whether they are already possible or planned for the 1.0 release, so I'll just put them here as a feature request:

 

  1. Parallel Execution:
  • be able to load one script and then run two threads, that both call functions from this script and use variables from the same context. As an example consider a script thats sets a variable to 42 and then calls the function moveTo(x,y) (which makes a character move to the position x,y and returns only after he has reached his goal). While the character is moving some other trigger tries to execute a script function that outputs the current value of the variable (i.e. 42).
  1. Possibility to remove scripts:
  • be able to remove any function definitions, objects and variables introduced by one script. As a kind of stupid example consider the following implementation of a text adventure: If the user inputs a command ("kick_vase") the engine searches for a function of the corresponing name and executes it. Each location is described in one script which is "unloaded" whenever the location changes.
Coordinator
Jun 24, 2009 at 2:50 AM

Thanks for your feedback! Here are my comments on your feature requests.

1. Parallel execution

No problem here; script execution will be running under an asynchronous model, though you can certainly call scripts synchronously if you prefer that, too. Scripts won't explicitly be running in separate threads, but you can certainly create your own threads and call scripts from there. I'll have to remember to note which SilverLua methods are thread-safe.

2. Possibility to remove scripts

This is something that you can do yourself in Lua. You can have a script create a table that has the functions and variables you need for the room, then simply dispose of the table when you don't need it any more.