Commit graph

14 commits

Author SHA1 Message Date
Scionwest_cp
a347607337 Mud Designer:
- Added new Project. Mud Designer project will include the GUI elements needed for graphically building a MUD. Due to Environment creation being finalized, work on a GUI based Environment creation can start.

Mud Engine:
 - Objects no longer require a path to be supplied when calling Object.Save()
 - EditRealm command now edits senses.
 - EditRoom now fully supports creating doorways, however editing existing doorways and linking to existing rooms is not implemented. This command only supports creating new doorways for non-existing Rooms (Rooms are generated as needed)
 - EditZone Now fully supports senses and implemented.
 - Game now supports loading of .ini files when calling Game.Load()
 - All objects now include a SavePath properties. Override this to supply a path for where the object needs to be saved. All Environment and BaseCharacter objects override the BaseObject.SavePath to save into ActiveGame.DataPaths.Environemnts and Players respectively.
 - ObjectCollection now instanced during ScriptEngine initialization to prevent exceptions during runtime.
 - Create command no longer converts all names to lower case.
 - Updated the Walk command to execute the Look command in a safe manor without injecting a command into the player Telnet console.
2010-09-26 08:00:34 -07:00
Scionwest_cp
9313611784 MudEngine:
- FileManager.GetData() method now checks to ensure that the supplied filename exists prior to attempting to reading data.
 - Adjusted Game.AutoSaveInterval to 60 minutes instead of 1 minute.
 - Placed all of the File reading code within Game.Load() into a Try/Catch to prevent exceptions if there was an error restoring the game from saved state.
 - GameWorld.Load() now places saved Realms that were created at runtime into the Games Realm Collection. This allows for hard-coded and dynamically created Realms to co-exist.
 - BaseObject.Filename now appends a file extension to the filename if a filename is set but the user forgets to add the file extension. This affects all classes inheriting from BaseObject
 - BaseCharacter updated to invoke commands by instancing a copy of the command and executing it, instead of injecting commands from the player.
 - Added EditRealm command. Allows for editing existing Realms properties. Currently has editing of Simple Descriptions, Detailed Descriptions, name and filename fully implemented.
     Example: EditRealm MyRealmName

MudGame:
 - Removed Cali.Create() call. The MudGame no longer creates a hard-coded world. I want to get away from hard-coded environments all together. They should be built dynamically by admins.
2010-09-05 00:49:37 -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
717034f9ed MudEngine:
- All Objects now dynamically create their Filenames after the BaseObject.Name has been set. You can re-specify a custom filename, but do so after setting BaseObject.Name's value.
 - Added GameWorld.cs. This will manage the game world itself. 
 - Moved Realm Initialization from Game.Start() into GameWorld.Start()
 - Moved Environment saving from Game.Save() to GameWorld.Save(). However, GameWorld.Save gets invoked from Game.Save()
 - GameWorld is now responsible for adding Realms to the Game. 
 - Fixed ScriptEngine not using Both Scripts and Assemblies at the same time.
 - Added BaseAI which inherits from baseCharacter. All AI objects will inherit from this object.

MudGame:
 - Modified MyGame.cs script for demonstrating the new way to create environments with the implementation of GameWorld.
 - Updated Program.cs to compile both Scripts and Assemblies at once.
2010-08-12 18:55:11 -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
4be5a831b1 MudEngine:
- BaseObject Saving and Loading fully implemented.
 - BaseCharacter Saving and Loading fully implemented.
 - Game.cs now contains SaveDataPaths property for allowing users to define where their data will be saved.
 -
2010-07-30 19:02:05 -07:00
Scionwest_cp
e822537128 MudEngine:
- BaseObject save code re-wrote
 - Added Inventory property to BaseCharacter 
 - BaseCharacter Save() now called when players are being disconnected.
 - Adjusted how objects Filenames are generated.
2010-07-30 15:50:53 -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
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
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