I am trying to create a game where the enemies walk around based on what is coded in a Lua script file. The game is currently created in C# with XNA. The reason I want to use scripting language for monsters is because if I want to add more enemies to the game I can use the same scriptfiles for both Android and WP7.
So for example:
function update(gameTime)
x = x - gameTime * 0.3;
return x, y
end;
Or something a little more advanced (scripts are more advanced then this, if you want to see something more advanced I can post that too):
function update(gameTime)
x = x - gameTime * 0.2;
y = math.sin(x / 30) * 20 + starty;
return x, y
end;
Now what I want to do is port this game to Android and Windows Phone 7. There are however a few problems with this:
Lua doesn’t seem to be able to work on Windows Phone 7 since it requires parts of the Reflection.Emit module in .net that isn’t available. This is why I chose to use Iron Ruby, this library does work on both WP7 and Android but on WP7 it runs too slow to be able to update more then 10 monsters (60x per second) at a time.
Does anyone have any good suggestions on this topic? (other ways to do this without scripting languages, or a better scripting language for this purpose???)
PS:
For the WP7 game I use the special version of XNA
For the Android version I use the android SDK plugin within eclipse (So java).
Did you try JINT?
I have no clue as for the perf you will get from it.. But you may want to try it.
https://github.com/joelmartinez/Jint.Phone
S