MudEngine:

- Game now checks to see if there is a initial environment setup, if not an Abyss is created to store players in.
 - Game now compiles scripts prior to loading libary assemblies to ensure the latest assembly is loaded.
 - BaseCharacter now supports the Abyss room if no initial Game realm is set.
 - BaseCharacter will no longer load the player into a room that does not exist (was deleted or something), they are defaulted into the Abyss.
 - ScriptEngine checks for errors in the script prior to trying to reference the compiled assembly (was causing errors if scripts failed to compile; no assembly generated to reference)
 - Assembly libraries are now only loaded once.

MudServer:
 - Example MyGame.cs script now constructs a realm and sets default properties.
 - MyPlayer script added to show how to write your own player script.
 - Server loop restored and now working correctly.
 - Server now outputs additional info regarding startup.
 - Server now forces TCP protocol.
This commit is contained in:
Scionwest_cp 2010-08-05 19:07:12 -07:00
parent c3c2d22ec7
commit 88378584ac
11 changed files with 199 additions and 30 deletions

View file

@ -2,6 +2,67 @@ public class MyGame : Game
{
public MyGame() :base()
{
GameTitle = "Mud Designer Demo Game";
AutoSave = true;
BaseCurrencyName = "Copper";
BaseCurrencyAmount = 1;
CompanyName = "Mud Designer";
DayLength = 60 * 8;
GameTitle = "Test Mud Project";
HideRoomNames = false;
PreCacheObjects = true;
ProjectPath = FileManager.GetDataPath(SaveDataTypes.Root);
TimeOfDay = TimeOfDayOptions.Transition;
TimeOfDayTransition = 30;
Version = "0.1";
Website = "http://MudDesigner.Codeplex.com";
ServerPort = 555;
MaximumPlayers = 1000;
ConstructRealm();
PlayerCollection = new MyPlayer[MaximumPlayers];
}
void ConstructRealm()
{
//Instace our Realm
Realm realm = new Realm(this);
//Set it up.
realm.Name = "Zeroth";
realm.Description = "The land of " + realm.Name + " is fully of large forests and dangerous creatures.";
realm.IsInitialRealm = true;
//Add it to the Base Games Realm Collection
this.AddRealm(realm);
//Build Zones
Zone zone = new Zone(this);
zone.Name = "Home";
zone.Description = "Your home is small and does not contain many items, but it's still your home and someplace you can relax after your battles.";
zone.IsSafe = true;
zone.StatDrain = false;
zone.IsInitialZone = true;
zone.Realm = realm.Name;
realm.AddZone(zone);
Room bedroom = new Room(this);
bedroom.Name = "Bedroom";
bedroom.DetailedDescription.Add("This is your bedroom, it's small but comfortable. You have a bed, a book shelf and a rug on the floor.");
bedroom.DetailedDescription.Add("You may walk to the WEST to find you Closet.");
bedroom.Zone = zone.Name;
bedroom.Realm = realm.Name;
bedroom.IsInitialRoom = true;
zone.AddRoom(bedroom);
Room closet = new Room(this);
closet.Name = "Closet";
closet.DetailedDescription.Add("Your closet contains clothing and some shoes.");
closet.DetailedDescription.Add("You may walk to your EAST to find your Room.");
closet.Zone = zone.Name;
closet.Realm = realm.Name;
zone.AddRoom(closet);
zone.LinkRooms(AvailableTravelDirections.West, closet, bedroom);
}
}