Custom NPC Scripting

Developer
Oct 14, 2011 at 4:20 AM
Edited Oct 16, 2011 at 10:18 PM

Scripting NPCs could be done with a high level language, using the System.Reflection namespace (Specifically Reflection.Emit).
A simple scripting language (like JavaScript) could be parsed into C#, and then added to the program with reflection.
The base classes for NPCs would have to be well made (e.g. throwing events for things like collision) to limit the amount of coding needed for the parser (or whatever loads the NPC into the assembly)

(See here for an example of Reflection)