Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Scripting Language for an XNA RPG

Name: Anonymous 2010-08-22 0:59

Yo. I'm working on an RPG engine in C# and XNA. We're planning on targeting Windows and Windows Phone 7, but are running into issues with AI interactions and controlling player actions during cutscenes. FOr the most part, everything is extracted using the MVC design pattern, but obviously would break separation of concerns. So the idea is to have an interface (IScriptEngine) that takes an IScriptObject and updates data in the map model accordingly.
I was thinking about putting the scripts in an XML sort of syntax:
<Script Name="MoveNPC_1">
<Action Command="MoveToTile" Target="NPC_1" Value="10,2"/>
</Script>

And have the engine parse it that way. My biggest fear is performance issues and scalability.

Name: 15 2010-08-24 4:32

>>1
Here's a micro lisp manual and related discussion that you might want to use. Some people implement this as a training exercise whenever they want to learn a new language.

http://news.ycombinator.com/item?id=1591112

With C# this will be especially easy because you can use the underlying platform's garbage collector. Just create a base class lisp object, and subclass it with a cons cell and an atom; then write a simple S-expression parser that takes a text file and builds a tree of cons cells; and then just translate the eval function you see in that paper into C#. Piece of cake. A hundred lines easy.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List