Tuesday, January 29, 2008

The Embedded Script Language for XNA

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.

4 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

Hi,

Have you found any script language which does what you've mentioned?

I am looking for a script as well.

Cheers

minahito said...

Thanks for your comment, jfbaro.

I was developing this script based on GameMonkeyScript. At first time, I tried to port GMS to C#. But that was not easy. Now I can not touch XNA, because I have to work on my projects in my company. But I keep my thought that XNA needs a little script engine to develop interesting games. So I will restart this plan this new year.

mikhail said...

I'm sure that Lua will be in the future of the webdev, for many many many reasons. :-)

Fast notes (already wroted by myself in a Lua forum):

1) The module formally known as mod_wombat (World of Warcraft) was renamed mod_lua, and has pulled into the Apache HTTP Server trunk, and will be part of the future 2.4 stable release. In another words: Lua will be so popular like "htaccess" :-)

2) I did a xoopserver pack with Lua pre-installed: Apache 2.2.11, Lua 5.1.2, PHP 5.2.8 and mySQL 5.1.30.

- no messing with config files or services under any Win32 environment; works fine in pendrives; only 4.63MB;

Download:
http://www.esnips.com/nsdoc/7b4e0a78-1619-427d-96e8-0964b8f2dc42/?action=forceDL

[]'s,

Mikhail Miguel