- Fixed FileManager.GetDataSpan Index out of bounds exception.
- Game.Save no long invokes the BaseCharacter.ExecuteCommand("Save"); rather it now just directly invokes BaseCharacter.Save(). This fixes the client typing bug where a new command line was printed to the screen everytime the game world saved.
- GameWorld now supports storing and saving dynamically created Realms.
- Renamed BaseCharacter.GetRoomByFilename() to just GetRoom() as all Get() named Methods require a filename.
- Optimized the loading and saving of Realms, Zones and Rooms some.
- Room now Loads and Saves the RoomLocation property instead of the Room's Zone and Realm properties individually.
- GameWorld.GetRealm(), Realm.GetZone() and Zone.GetRoom() now perform case-insensitive checking when scanning for content.
MudGame:
- Re-wrote the 'Create' command script from the ground up. 50% less code and much better approach to creating content. Now to create content you will use the same formatting as the Room.RoomLocation property.
Example: Creating a Realm is done with 'Create MyRealm'
Example: Creating a Zone is done with 'Create MyRealm>MyZone'
Example: Creating a Room is done with 'Create MyRealm>MyZone>MyRoom'
If the Realm or Zone does not exist when creating a Room or Zone, then the parent will be created automatically for you.
- Fixed a bug in the WorldCalifornia script were it was saving the Hallway Room with a Zone file extension, preventing it from working correctly during restoration.
- Added FileManager.GetDataSpan() method. This allows developers to start at a line and collect the next 'x' number of lines after that starting line.
Example: GetDataSpan("MyFile.txt", 5, "DoorwayArrivalRoom", true);
This seeks MyFile.txt until it finds "DoorwayArrivalRoom" and then it stores that line and the next 4 lines for a total of 5 lines and returns the collection.
The last argument 'true' means that the method will scan the rest of the file after the initial 5 lines and add any other lines that match the "DoorwayArrivalRoom" string as well.
- Deleted CommandResults class as it's no longer used by the script engine.
- Singleplayer and Multiplayer save data paths are now the same paths by default.
- Game.Update() method now checks for auto-saving (instead of MudGame performing this check)
- Saving and restoring of Realms, Zones, Rooms and Doorways now fully implemented.
- GameTime now supports auto-saving
- GameWorld.Update() now calls BaseCharacter.Update() and is ready for future update code.
- GameWorld.AddObject and GameWorld.RemoveObject() have been removed.
- GameWorld.AddRealm() re-added for adding Realms pre-populated with zones/rooms. Note that Zones and Rooms can be added to a Realm even after it has been added to the GameWorld.RealmCollection
- BaseObject now contains a OnStart() event method.
- BaseObject.Save() now saves BaseObject.DetailedDescription collection content.
- Updated BaseCharacter to retrieve Environments by Filename rather than Object name.
- BaseStats.Experience property added.
- Door.RoomTravelType enum added for determining if the room is Arrival or Departure
- Door.SetRoom() method added for restoring a Rooms Doorway link during world restoration.
- Renamed Room.InstallPath to Room.RoomLocation. Contains a MyRealm.Realm>MyZone.Zone>MyRoom.Room path
- Added Room.RoomLocationWithoutExtension property for returning the Rooms location without file extensions. Ex: MyRealm>MyZone>MyRoom
- Room now saves Doorways.
- The GameWorld now restores the link between Rooms once all Environment objects have been instanced and restored from their saved state.
MudGame:
- Minor clean-up with MudGame loop and shutdown.
- Updated scripts to reflect changes made to the engine.
- Added FileManager.GetDataCollection() Method for getting a collection of values that match the supplied parameter. This is used by environments for restoring saved object collections
- World Restoration is now fully implemented.
- Removed un-needed Log messages
- Added a pushMessage parameter to Log.Write() allowing messages to be sent directly to the console instead of stacking them in a cache. All log messages now push the message by default.
- World Environment now fully saves to disk; only works with a player that has Admin privileges (All new players currently default to Admin privileges for ease of testing. Use SaveWorld command to save.
- Adjusted how the Game class saved the players to be more efficient.
- Converted all Types from C# types to .NET Types (such as bool changed to Boolean, and int changed to Int32).
- Zone no longer gets saved from within GameWorld.Save, but rather in Realm.Save()
- Room no longer gets saved from within GameWorld.Save(), but rather in Zone.Save();
- Added new SaveWorld command that admins only can execute to force save the world. It's not fully implemented at this time.
MudGame:
- began work on command execution from within the server while it's running.
- Updated to work with ScriptingEngine changes.
MudEngine:
- Game.PlayerCollection changed to a List<>. Server obtains a array version of it within Server.initialize() via players = pbs.ToArray().
- All BaseObject classes now require a reference to the Game and contain a property called ActiveGame.
- Player.Game removed and now uses it's parent objects ActiveGame property.
- Player.Role property added. Uses the new SecurityRoles enum that specifies what level of access the player has.
- ScriptEngine now loads all libraries found within the specified ScriptsPath directory, instances the scripts and places them into a collection.
- Custom character script instancing is now supported, but not fully implemented throughout the engine. They can be loaded, but not used during runtime at this time.
- Rooms can now be linked automatically via the new Zone.LinkRooms method. Room linking can no longer be done manually as the Doorways property is now read-only.
- Door.Description has been removed. Doorway description will need to be included in Room.Description or Room.DetailedDescription properties.
- Added DetailedDescription to make creating multi-line descriptions easier. Not supported by the Look command yet.
- Game.IsRunning is now read-only. The Game will manage this property on its own.
- BaseCharacter.ExecuteCommand now will always return a string. Simplifying the game loop for users as they no longer need to check what Type was returned by the command.
- Doors now contain a DepartureRoom and a ArrivalRoom property allowing for easy access to Rooms that are linked together.
- Fixed a bug where Game, Realms and Zones always assigned IsInitial to Realms, Zones and Rooms when added to the collections. Collection would contain multiple IsInitial objects.
- Removed Room.InstalledDoorways property as that was used only by the old Designer
- Removed Room.Load() as that implementation of it is obsolete.
MudGame:
- Revised Zeroth to build it's Zone and Rooms using the new Zone.LinkRooms function.
- Greatly revised Program.cs and the Game loop to take advantage of many of the automations provided by the Engine now.
- Player movement command now fully implemented.
- Game.GetRealm() added to retrieve a Realm within the games RealmCollection property
- Game.End() added to perform game ending duties and shut down the Server
- Server now loses opened threads.
- Player.Move() added to move the player from Room to Room.
- Room.DoorwayExist() tweaked to work with the new way Environments are managed.
MudGame:
- Now executes the Look command on startup so the player can see where they are located at.
- Implements the new Game.End() method and fixes the game hanging upon exit.
- Re-worked the command system. All commands now only need 2 arguments rather than 4. The actual command string and the Player
- All commands updated to work with the new command system
- Look command now works in the example MudGame
- Realm now contains InitialZone for the starting Zone within that Realm.
- Zone now contains InitialRoom for the starting Room within that Zone.
- All Environment objects now contains a Initial property and Add() method for adding child objects.
- BaseCharacter now contains a copy of Game
- Revised Realm.GetZone()
- Revised Zone.GetRoom()
- Removed Zone.RebuildRoomCollection as content is currently no longer stored using physical files.
- Added GameManagement.Log for logging errors and warnings to file. Use Log.Write().
- Removed from solution
Mud Engine:
- Moved the CommandEngine, CommandResults and ICommand Interface out from the Commands namespace and into GameManagement since they manage the game commands.
- Added CommandExit class to provide the ability to exit a game once running. This is fully implemented.
- Realms, Zones and Rooms now have an IsInitial property for determining if this is an initial location for the Game.
- Renamed GameSetup to Game.
- Corrected GameObject being in the incorrect namespace.
- Corrected the ScriptEngine not
- CommandEngine no longer needs a Name argument. Arguments changed from 5 to 4 due to this change.
Mud Game:
- Added Example Game used for testing various MUDEngine features and testing constructability of games using the engine.
- Currently only contains 1 Realm, 1 Zone and Two Rooms. Only working command is Exit.
- Minor tweaks to Room.cs for checking file extension validity
- Scripting Engine and related classes added to Solution (Files existed but were not a part of solution)