Scripting language for Android and Windows Phone 7

I am trying to create a game where enemies walk on what is encoded in a Lua script file. The game is currently built in C # with XNA. The reason I want to use the monster scripting language is that if I want to add more enemies to the game, I can use the same scripts for Android and WP7.

So for example:

function update(gameTime)
x = x - gameTime * 0.3;
return x, y


Or something a little more advanced (scripts are more advanced, then this, if you want to see something more advanced, I'll post this too):

function update(gameTime)
x = x - gameTime * 0.2;
y = math.sin(x / 30) * 20 + starty;
return x, y


Now what I want to do is port this game to Android and Windows Phone 7. However, there are a couple of problems with this: Lua does not seem to work on Windows Phone 7 as it requires parts of the Reflection.Emit module in .net which is not available. This is why I decided to use Iron Ruby, this library works on both WP7 and Android, but on WP7 it is too slow to update more than 10 monsters (60 times 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 WP7 game I am using special XNA version For android version I am using android SDK plugin in eclipse (So java).


source to share

1 answer

Have you tried JINT?

I have no idea as to the puncher you will get from it. But you can try.




All Articles