Script language implementation in C#

Started by
3 comments, last by dilyan_rusev 9 years, 6 months ago

Any one had any luck doing something similar ? In the future i'd like to outsource some of my code to some runtime script stored in text format in the game directories and interpret it with my application. This would be very useful in a game engine context in witch you would be able do distribute the engine with large modding capabilities without distributing the source code.

Advertisement
What's the problem you're having trying it?

There's as billion different scripting languages for C# that work just fine and plenty of games use them.

You can even use C# as a scripting language with some of the sandboxing APIs and compiler-as-a-service APIs.

Sean Middleditch – Game Systems Engineer – Join my team!

If you're on a platform where this is available, I highly recommend using it:

http://msdn.microsoft.com/en-us/library/microsoft.csharp.csharpcodeprovider(v=vs.90).ASPX

It allows your own program/game to compile C# DLLs from source code, which you can then load and use immediately. It pretty much removes the need to implement your own scripting system. The main downside is that it may not be available on some platforms (such as iOS).

http://msdn.microsoft.com/en-us/library/hbxc2t98(v=vs.84).aspx

I remember playing with LuaIntefcace a few years ago. I didn't do anything serious with it, as it had problems with 64-bit windows. I haven't had the need to use scripting language since then.

If the need arises today, I'd probably do it with Mono.

This topic is closed to new replies.

Advertisement