I need a dynamically recompilable scripting language for my .Net game project

Started by
7 comments, last by Ardaxus 19 years, 11 months ago
Can anyone help point me in the right direction? Anything compiled to a .Net assembly and loaded in cannot be effectively unloaded. I need to be able to update, extend and remove code from the game at run-time without having to restart the application. Obviously I need a scripting language. I need to be able to call methods in code that was written using the scripting language. I need to be able to make certain methods in my compiled .Net code available to the scripting language. Any ideas? Snowman | Ardaxus | Nathan [Edited by - Ardaxus on November 11, 2004 4:11:37 PM]
Snowman | Ardaxus | Nathan
Advertisement
You can solve the problem of not being able to unload assemblies by loading the assembly in its own AppDomain.

See here for more info on doing this.
Have you heard of LUA?

Its a scripting language, you can alter its instructions while your app is running.

For more look here: LUA.

[ Clicky fixy. --Sneftel ]

Hope it is what you're looking for...

Salsa cooked it, your eyes eat it![Hugo Ferreira][Positronic Dreams][Colibri 3D Engine][Entropy HL2 MOD][My DevDiary]
[Yann L.][Enginuity] [Penny Arcade] [MSDN][VS RoadMap][Humus][BSPs][UGP][NeHe]
"our stupidity allways comes back to bite us in the ass... in a white-shark sort of way..." - Prozak

[edited by - sneftel on May 9, 2004 6:30:28 PM]
Python has some .net port, perhaps you could have a look...
quote:Original post by Ardaxus Any ideas?


Get the user to do the work on a hand calculator

More seriously, can''t .NET access ''normal'' libraries ? that would allow you to use pretty much any language you like; for instance SpiderMonkey (java script, as used in mozilla) in its windows version, or I believe you can access COM in .NET ? that would expose the various windows scripting objects (MS supply JScript & VbScript with windows & ActiveState''s Perl and TCL implementations are freely avalible).

After long and hard resarch, I decided to go for Small
It''s C like, appears to be be easy to embed (I just starting that), and, well, seems the right choice.
quote:Original post by Raduprv
After long and hard resarch, I decided to go for Small
It''s C like, appears to be be easy to embed (I just starting that), and, well, seems the right choice.


That looks good (I hadn''t heard anything of it before now, maybe I''ll use it). Lua''s pretty easy to implement too, from what I''ve heard.

ravuya: [Resist everyone][I am your only friend. Click, now.]
I looked over LUA''s SDK, and it is not that easy to pass arguments around. Besides, you''ll have to learn a new language, if you go for LUA.
As someone pointed out, create a seperate AppDomain and run the "script" code in there. You can apply any custom permission set to this new AppDomain, with ExecuteOnly being the common one for a scripting environment. No need to use a seperate scripting language. You could even dynamically compile the code at runtime to truly enable a scripting like environment.

This topic is closed to new replies.

Advertisement