I’ve been developing an Embedded Script Language for XNA these days. XNA provides easy video game development environment for our freetime projects, but there are few libraries for C# game development. Especially, I wanted an embeded script language like Lua and other improved languages. If we are in .NET framework, many script languages are available for C#, but I need ’embedded’ script language in .NET ‘compact’ framework of XNA. The language has to be executable on the Xbox360 edition of XNA. In a word, I had to develop it myself.
The VM of the embedded script language executes byte-code compiled on Contents-Pipeline and delegates a garbage collection feature to the .NET compact framework. The following is the specs that I think the language should implement:
- Calls the script functions from C#.
- Calls the C# methods from the script.
- Uses virtual threads.
- Supports STATE for FSM.
- Compiles source to BYTE-CODE on CONTETNT-PIPELINE.
I’ve finished the basic part of my script language as the prototype. And, I sent the prototype to my friend. At the beginning, I didn’t wish to delegate the garbage collection feature of my VM to .NET, but I decided that it’s nonsense to develop independent memory allocator for independent garbage collection on .NET, because all of collected garbages is not deleted immediately. That’s just double action.