DataPaths now have values for the games Root directory and Script directory.
DataPath class is now completed and includes a new SetExtension() method for setting game object file extensions. Scripting support fully implemented. StandardGame now contains a Initialize() method for compiling scripts and searching for sub-classes of StandardGame Server app will now use a Scripted game class instead of the default StandardGame if one is present. StandardGame.Start() is now virtual so child classes can override it. Sample Game script created to show how to create a custom game script, including how to setup the game and create Rooms pragamatically. ScriptFactory has a new method for searching all scripts and scripts that inherit from a specified class. Renamed all of the Command scripts. They no longer start with 'Command'. Example: "CommandSay" has now become "Say". There is no need to preceed the command name with the word "Command" anymore.
This commit is contained in:
parent
c40d32e7ae
commit
8639403255
14 changed files with 323 additions and 69 deletions
|
@ -24,29 +24,17 @@ namespace WinPC_Server
|
|||
Logger.ConsoleOutPut = true;
|
||||
|
||||
//Instance and setup our game
|
||||
StandardGame game = new StandardGame("Sample Game");
|
||||
game.AutoSave = true;
|
||||
game.Debugging = true;
|
||||
game.Description = "This is a very simple game that was created to demonstrate MUD game creation with the Mud Designer Game Engine.";
|
||||
game.HiddenRoomNames = false;
|
||||
game.Multiplayer = true;
|
||||
game.Server.MOTD = "Welcome to the Sample Game demonstration server! This is the Servers MOTD!";
|
||||
game.Version = "1.0";
|
||||
game.Website = "http://muddesigner.codeplex.com";
|
||||
game.Server.ServerOwner = "Akiyuki";
|
||||
StandardGame game = new StandardGame("Sample Mud Game");
|
||||
StandardGame g = game.Initialize();
|
||||
|
||||
//Check if 'g' is null. If it's not, then we have a custom game
|
||||
//that was found and we will use that. Otherwise use the default.
|
||||
if (g != null)
|
||||
game = g;
|
||||
|
||||
//Start the game and server.
|
||||
game.Start(100, 20);
|
||||
|
||||
//Setup our Server console input class
|
||||
/*
|
||||
ConsoleInput input = new ConsoleInput();
|
||||
|
||||
//Run the console input on its own thread.
|
||||
Thread inputThread = new Thread(input.GetInput);
|
||||
inputThread.Start();
|
||||
*/
|
||||
|
||||
//Game loops until it is disabled.
|
||||
while (game.Enabled)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue