This project is read-only.

Custom NPC Scripting

Oct 14, 2011 at 5:20 AM
Edited Oct 16, 2011 at 11: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)