14 Aug, 2010, Scionwest wrote in the 21st comment:
Votes: 0
JohnnyStarr said:
A MUD project in C#? I've been working on a .net MudLib for the last 3 weeks. Quite fun. I also enjoy VS 2008 Class Diagrams.


I've really enjoyed working on this project, I have a script engine built into it so users won't ever need to access the source for their muds and they'll be able to edit Types during runtime with the changes be saved and restored during server restarts. I wish I had class diagrams but my VS 2008 express didn't have it and I just recently migrated the project to VS 2010 express and it doesn't include it either. Boo lol
14 Aug, 2010, JohnnyStarr wrote in the 22nd comment:
Votes: 0
BOO indeed. I was sad to discover this myself. There is an app out there called NClass which is a hack of the Class Diagram
designer. It purports to seamlessly convert to source, but interfaces don't exactly work right. What is the name of your project?
What kind of script engine? Lua? Rhino via Mono? Interesting… (strokes imaginary goatee)
14 Aug, 2010, jurdendurden wrote in the 23rd comment:
Votes: 0
JohnnyStarr said:
BOO indeed. I was sad to discover this myself. There is an app out there called NClass which is a hack of the Class Diagram
designer. It purports to seamlessly convert to source, but interfaces don't exactly work right. What is the name of your project?
What kind of script engine? Lua? Rhino via Mono? Interesting… (strokes imaginary goatee)


You and that goatee… Can Picard even grow a goatee? :P
14 Aug, 2010, JohnnyStarr wrote in the 24th comment:
Votes: 0
14 Aug, 2010, Scionwest wrote in the 25th comment:
Votes: 0
JohnnyStarr said:
BOO indeed. I was sad to discover this myself. There is an app out there called NClass which is a hack of the Class Diagram
designer. It purports to seamlessly convert to source, but interfaces don't exactly work right. What is the name of your project?
What kind of script engine? Lua? Rhino via Mono? Interesting… (strokes imaginary goatee)

Hmm I'll have to check out the NClass app and see how it works. My project is actually in my signature, it's called Mud Designer and it uses the .NET CodeDom and C# compiler. People build standard C# classes (without namespaces or using statements) and I wrap the classes inside of a namespace during runtime when the server starts up. The server builds an array of script files, passes them off to the CSharpCodeProvider, compiles them into an assembly and then instances the classes during runtime, invoking their methods and accessing their properties as need.

I can set or get a scripts C# property via my GetProperty method that my script engine has (in .NET 3.5)
//Assign a value to the scripts Name property
engine.GetObject("PlayerScript").SetProperty("Name", "Billy Bob");


and in .Net 4.0 I can use Dynamic Types support
//Assign a value to the scripts Name property
engine.GetObject("PlayerScript").SetProperty().Name = "Billy Bob";

//You can invoke a method using a Dynamic Type (.NET 4.0 only)
dynamic d = engine.GetObject("Player").InvokeMethod("IsColliding", null);
if (d)
Window.Title = "Object is colliding!!";

//Get the property value from the object and assign it to the window title.
this.Window.Title = engine.GetObject("PlayerScript").GetProperty().Name;


It works pretty good at the moment, but there's room for improvement.
P.S. I am actively seeking members :P
14 Aug, 2010, Scionwest wrote in the 26th comment:
Votes: 0
Oh, and Admins will be able to modify the game world how ever they want, creating rooms, npc's etc during runtime while players are connected. The objects will be saved to a physical file so that they can be restored during a server restart. The engine will re-generate the game world during the next server restart by loading those saved files, and applying them to the proper scripts. My goal was to let admins create their game worlds during runtime, and not loose any of it if the server crashes or restarts while at the same time letting the inherited scripts still be the object that runs the world, but with their modified settings and newly attached objects.

The script engine works for the most part, but the game engine itself isn't far enough along for me to fully test the scripts very heavily.

My end goal is to build the engine as Object Oriented as possible, using these saved files as blueprints for the scripts to use for my future GUI based world editor. I want to allow users to create scripts if they want to, but the end goal is to completely build the MUD in a GUI environment, connecting objects and generating scripts with a mouse and drag-drop/click operations. My original release of the toolkit contained a GUI, but it was since removed as I learned the hard way you can't build a GUI without a working engine lol.
14 Aug, 2010, Scandum wrote in the 27th comment:
Votes: 0
\x\x[1;1H might work better.
14 Aug, 2010, Scionwest wrote in the 28th comment:
Votes: 0
I'll try that thanks!
20.0/28