Commit graph

15 commits

Author SHA1 Message Date
Scionwest_cp
1f21892c36 MudEngine:
- EditRealm command can now set or remove InitialRealm status from a Realm. 
 - EditRealm command can now set default sense of smell, listen and feel.
 - Realms now assign its default Sense descriptions to Zones when adding a Zone to the Realm, provided the Zone does not already have a value assigned to it.
 - Zones now assign its default sense descriptions to Rooms when adding a Room to the Zone, provided the Room does not already have a value assigned to it.
2010-09-05 11:56:34 -07:00
Scionwest_cp
de38cbf272 MudEngine:
- 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.
2010-09-04 00:10:04 -07:00
Scionwest_cp
de82476525 MudEngine:
- 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.
2010-09-03 19:50:32 -07:00
Scionwest_cp
5aa5504171 MudEngine:
- 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.
2010-08-15 11:15:35 -07:00
Scionwest_cp
a52ccf8da9 MudEngine:
- 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.
2010-08-14 00:20:43 -07:00
Scionwest_cp
9585cede63 MudEngine:
- Added BaseCharacter.FlushConsole() method. Sends a hex sequence to the clients telnet terminal that clears the screen. If IsMultiplayer=false then it just clears the C# Console.
 - Added a 'Clear' command for users to use. It invokes the new FlushConsole command.
 - Removed the need for a full file path and filename when calling an objects save method. Now it just needs the path.
 - Adjusted the Exit command, Login command and Save command to reflect the objects save parameter changes.
 - Removed the Unique ID from objects. 
 - All objects now reference each other via their filenames rather than their object names. Allows for 3 objects with the name Bedroom to exist, but with different filenames such as Bedroom1, Bedroom2 etc.
 - Zone now has a GetRoomByName method that replace the removed GetRoomByID method. Returns a List<> collection of Rooms found with a matching filename.
 - BaseCharacter updated to work with the new Zone.GetRoomByName method.
 - Realm.GetZoneByID renamed to GetZoneByName()
2010-08-13 21:35:46 -07:00
Scionwest_cp
7a4c9211d4 MudEngine:
- Game World Auto-save property now fully implemented. However, the Game world saving mechanics are not fully implemented. As additional components are implemented, they will be auto-saved if the property is set to true. 
 - Game.AutoSaveInterval property added for setting how often the Game will save all objects in the world (incase run-time changes to environments/objects were made, they must be saved).
 - Player walk command now supports Game.AutoSave. Every-time the player changes location they will be saved.
 - ScriptEngine now supports Initializing both Assembly and Source based scripts at the same time via the new ScriptTypes.Both element.
 - ScriptEngine now auto-loads previously saved settings from Settings.ini
 - Game.ObjectIdentifierCollection renamed to Game.WorldObjects. Type collection changed from that of Int32 to BaseObject. 
 - Game.update now contains the code needed to update the World Time and Auto-Save the world if needed.
 - Game.AddObject method added for adding World Objects to the Game.WorldObjects collection
2010-08-12 17:05:07 -07:00
Scionwest_cp
d212f5b854 MudEngine:
- Player login now creates the directories needed if they don't exist.
 - Added Update method that serves as the game loop now.
 - Added additional save code to Game.Save() now saves all realms, zones, rooms and players. Called during server shutdown (Game.Shutdown())
 - Began work on implementing a Unique Identifier system for all game objects. 
 - Renamed GetRealm() and GetZone() to GetRealmByID() and GetZoneByID. Now accepts a Int32 instead of a string as the parameter, returning a reference to the object.
 - Added GetRealmByName() and GetZoneByName(). Similar to the old GetRealm and GetZone methods. Accepts a string as a parameter, however it returns a list<> collection of the found objects due to objects with duplicate names are allowed to co-exist in the game world.
 - Temp directory that was being generated during server startup within Game.Start() is now deleted once script compilation is completed.
 - Added GameTime.cs; contains all the properties and methods needed to have a working time system built into the engine for the game world. Not fully complete.
 - Added CommandGetTime.cs which prints the current date and time to the players console. Prints the GameTime.DayNames and GameTime.MonthNames to the player. Defaults to real-world names, however these can be configured and changed, along with the number of days per week, weeks per month, months per year, seconds per minute, minutes per hour and hours per day.

MudGame:
 - Now supports Game.AutoSave. If AutoSave is true, then the server loop will call Game.Save() automatically.
 - Server Game Loop now calls Game.Update() every loop cycle.
2010-08-10 15:10:25 -07:00
Scionwest_cp
26afd9a9e1 MudEngine:
- Re-organized property layout in Game.cs
 - Realm now automatically sets Zone.Realm when a Zone is added via Realm.AddZone()
 - Zone now automatically sets Room.Zone and Room.Realm when Room is added via Zone.AddRoom()

MudOfflineExample:
 - Updated to reflect the changes made to MudEngine.
2010-08-07 10:11:42 -07:00
Scionwest_cp
9b023a2092 MudCompiler:
- 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.
2010-07-29 17:39:38 -07:00
Scionwest_cp
c965d5e97a MudEngine:
- Fixed BaseCharacter not returning content to the game loop
 - Fixed Zone.LinkRooms linking rooms backwards.

MudGame:
 - Minor tweaks to the BuildRealms method
 - Minor tweaks to the Program.Main method.
2010-07-25 22:29:24 -07:00
Scionwest_cp
e145d57682 MudEngine:
- 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.
2010-07-25 20:50:39 -07:00
Scionwest_cp
486efa4fed MudEngine:
- 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().
2010-07-25 16:56:15 -07:00
Scionwest_cp
b8f6be12c0 Mud Designer:
- 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.
2010-07-18 13:52:16 -07:00
Scionwest_cp
dc311f5aa5 Added MudEngine Project to the Solution. I will slowly be moving the MudDesigner.MudEngine classes out of the Mud Designer Solution and into it's own.
Currently the Mud Designer still contains the old MudEngine classes until migration has been completed.
2010-07-15 18:53:38 -07:00