Now 3rd party users can see how restarting the server takes place, saving the world and logging into the game world.
CommandEditRealm, EditRoom and EditZone was deleted. They will be re-built at a later date. For the time being, use the pre-built example scripts within the MudGame project.
Moved rScript source files into the Mud Engine.Scripting files. Planning on removing the reference to rScript.dll and keep everything within the MudEngine.
Deleted ParseProperty Attribute. A different approach will be used for dynamic Type saving.
Removed BaseObject.NewSave(). The re-write on save code will be done at a later date.
Deleted the Attributes folder as it is no longer used.
Moved Server.cs from Networking to Communication folder.
Classes all still reside within their original namespaces, just migrating files into their new folders. Namespace migration will take place afterwards.
- Added a new Type called DialogChat which will be used to hold branched dialogs for characters.
- Added initial support for Dialog chatting in BaseCharacter. This will primarily be for AI, as Users already have the Say command and don't use branched dialog.
- Added primitive checking during BaseCharacter.Load() to find the correct Room for the character in the event that two Zones with the same name exist.
- Removed External Script compilation support for now. I'll add it back once I provide SourceFile and SourceCode compiling support to the MudScriptCompiler. At the moment only Whole Directory compiling is supported.
MudDesigner:
- Removed all of the source code, with the exception of the designer generated source, from frmProjectManager. It will need to be re-wrote due to the removal of the MudScriptEngine.
MudEngine:
- Deleted Scripting.GameObject
- Deleted Scripting.GameObjectCollection
- Deleted Scripting.ScriptEngine
- Deleted classes were replaced by the rScript engine. Only class needed now is the MudScriptCompiler, which handles all of the custom MudEngine script compiling, using the rScript Engine.
- Removed old Scripting.ScriptEngine references from within GameManagement.Game
- GameManagement.Game no longer checks to see if MudEngine.dll exists. If it didn't exist, the engine wouldn't be running to perform that check in the first place.
- GameManagement.Game no longer adds MudEngine.dll as a referenced assembly. The MudScriptCompiler handles that during compilation.
- MudScriptCompiler.Compile() always returns false when SourceFile or SourceCode is passed as an argument. Only Script Directories can be compiled at this time.
MudGame:
- Removed references to Scripting.ScriptEngine from MudGame.Program
- Re-wrote how scripted Type's that inherit and replace MudEngine.GameManagement.Game.
Scripts are compiled prior to Game.Start() being invoked, allowing GameManagement.Game to be replaced with an inherited class from a compiled script.
TODO: Look at a way to prevent Game.Start() from compiling the scripts again, as they have already been compiled once. It's not a big hit on startup time, but it needs to be wrote the proper way.
- Added support for the rScript engine to Game. It still contains code with MudEngine.Scripting.ScriptEngine, however it is not used by anything.
- Added MudScriptCompiler. Custom Compiler created using ICompiler, included with the rScript engine.
* At this time, ScriptEngine is no longer used, and has been fully replaced by the rScript Engine and MudScriptCompiler.
* Take note that the MudScriptCompiler only supports C# Keywords, and not some of the standard .NET Types. For a string, you'll need to use 'string' and not 'String'.
I'm looking into why this is the case. Until the issue is fixed, none of the example game scripts will run.
rScripting can be found on Codeplex at http://rScript.Codeplex.com which is a complete script engine.
Mud Designer will make use of it, and will allow me to just work on the Mud Designer engine, as my rScript is complete. I still had quiet a bit of work to do with the Mud Designers Script System.
- Improvements to the EditRealm command. Bug fixes and tweaks
- EditRealm command now updates All Zones and Rooms within other Realms when its Realm.name is changed instead of only child Zones/Rooms.
- Realms, Zones and Rooms will now append a file extension if no file extension is supplied during GetRealm(), GetZone() and GetRoom() method invokes.
- Realm.InitialZone is no longer read-only
- Zone.InitialRoom is no longer read-only.
- Added EditZone command. Allows for editing pre-existing Zones. Zones can be created via the Create command.
- Added EditRoom command. Allows for editing pre-existing Rooms. Rooms can be created via the Create command.
MudGame:
- Re-organized the Scripts directory. All Admin commands are now placed within a 'AdminCommands' folder while the player based commands are in a 'PlayerCommands' folder. All remaining scripts reside within the Scripts root folder.
- 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.
- Moved List command out of the engine and into the MudGame as a script.
MudGame:
- Migrated List command from engine to game script.
- List command now supports 'List Commands'. It will now print all commands for admins, and only non-admin commands for non-admin players.
- Added CreateRoom scripted command for instantly creating Rooms without needing to fully qualify a path. The Room will be created in the Admin's current Realm>Zone.
In order to create a Room outside of their current Zone they will need to use the standard 'Create' command and supply a fully qualified name such as 'MyRealm>MyZone>MyRoom'
- Create command script now writes to the Log file everytime a Admin creates an environment object.
- Added a List command script that now lists all environment objects created.
* Example: List Realms
This will list all of the Realms in the game world.
* Example: List MyRealm>Zones
This will list all of the Zones within the MyRealm Realm object.
* Example: List MyRealm>Rooms
This will list all of the Rooms from every Zone within the MyRealm object.
* Example: List MyRealm>MyZone>Rooms
This will list all of the Rooms that are within the MyZone object contained within the MyRealm object.
* Example: List Players
This will list all created players, regardless if they are logged into the server or not.
- 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.
- Deleted the following commands from the engine:
Exit, GetTime, LinkRoom, Load, Look, Save and Walk.
These are now part of the MudGame script library.
- Revised all of the Commands prior to moving them to the Script Library. They are now very well commented.
- Optimized the player login code.
- All commands now support the Help command.
- Game now has a MinimumPasswordSize property for setting the required minimum characters for a players password.
- System.Linq and System.Text using statements added to scripts when they are compiled. Script writers no longer need to type out the fully qualified name of a Type within those namespaces.
MudGame:
- Added the following commands to the script library:
Exit, GetTime, LinkRoom, Load, Look, Save, Walk.
- Added 76 lines of comments to WorldCalifornia to better help new users understand how to create their game worlds via script.
- The Clear, Help, Say and Create commands have been given better commenting.
- Existing scripts have been given some better optimizations.
- Deleted BaseAI as AI will be built into BaseCharacter and enabled/disabled via the already existing IsControlled property.
- Added BaseStats class which will manage all of the stats used by characters. It was decided this should be a separate class that players can extend off of and change how stats are handled in their games without having to re-write large chunks of player code.
- Began adding better commenting through-out the project. CommandExit.cs, CommandGetTime.cs have been given much better commenting. These will ultimately be converted to Scripts for developers to modify.
- GameWorld.AddRealm() method replaced with GameWorld.AddObject(). It accepts any Type passed to it. You can now supply a Zone to it (provided the Zone.Realm property is set first) and the method will add the Zone into the appropriate Realm for you.
- Began converting certain enumerated items to LINQ
MudGame:
- Updated scripts to reflect the GameWorld changes.
- All commands are now required to have a Help property.
MudGame:
- Finished the Create command. Now allows for creating Realms, Zones and Rooms
- Added LinkRoom command for linking Rooms. Not finished.
- Added Help command. Typing Help prints all of the currently available commands. Typing Help 'CommandName' prints that Commands help property. Default commands print a help document.
- Removed the need for the old CommandResult Type to be a returned value on all commands. Command.Execute() is now just void.
- All commands updated to now return a value. They use player.Send() to direct messages to the player instead.
- Removed CommandClear from the project and made it a script so that developers can see how to write custom command scripts.
- 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.
- 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()
- 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.
- 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.
- Login command now automatically disconnects a user if they are currently logged into the server when another user attempts to login with the same credentials.
- Login command now loads saved players when a character name is entered that has previously been saved.
- FileManager.GetData() now supports ignoring simi-colons in data files. These can be used as comments if needed.
- MudEngine.GameManagement.Game.TimeOfDayOptions has been removed from the Game Type. It is now just MudEngine.GameManagement.TimeOfDayOptions.
- BaseCharacter will no longer try to save the character if the supplied filename is blank
- BaseCharacter will now send a disconnect message of 'Goodbye!' upon the player being disconnected from the server.
- ScriptEngine.ScriptPath now returns a absolute path.
- Script File compilation within ScriptEngine.Initialization is now supported. This allows developers to write their MUD's using Scripts and letting the server compile them during server startup rather than use the ScriptCompiler.exe to pre-compile scripts now.
- Custom Game Types are now supported. Only 1 Type may inherit from MudEngine.GameManagement.Game at a time. To use, create a file, write a script that inherits from Game and run the server.
- ScriptEngine.GetObjectOf(string) method adding. Returns a object that inherits from the Type supplied in the parameter.
- Deleted StartupObject.cs
- Deleted Startup.dat
MudOfflineExample:
- Updated to reflect the TimeOfDayOptions change in MudEngine.csproj
MudServer:
- Added MyGame.cs inside Debug/bin/scripts. This is a example script showing how to inherit from Game and write a custom Game Type. This Type is used when the Server runs rather than the Engine Game Type.
- Server startup re-wrote to compile scripts during startup, scan them via the script engine for any custom Types that inherit from Game, and use the if needed instead of the default Engine Type.
- Server now uses a Settings.ini file to allow configuration of the Script Engine by users. Provides them the ability to now customize where scripts are stored and their file extension.
- Deleted Scripts.dll, as the Server now generates one at runtime each time it is ran.
As of this commit, users will not need to use C# to compile their MUD's any longer. Compile the Server and run it. Scripts are now fully implemented (however not fully tested).
- Sending messages to the client from the server is now an added feature. Use Game.SendMessage()
- Added Load and Save commands for players.
- Added Missing SaveDataPaths struct file.
- 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.
-
- 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.
- only TCP, works has been tested
- Commented out Lists and replaced with arrays, the way the list was working it wouldn't have worked, if you can figure out how to make it work feel free to fix it up.
- TODO: When user types exit, the game object becomes useless, I need a Reset function of some kind to reset it for when a new player comes in to reuse that player object.
- TODO: Encryption
- TODO: Fix main person so they have admin commands like list, restart instead of a game with the main server. (ATM Just like that for testing, but now you can test with telnet client)
- 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().
- Deleted GameObjects.Characters.Controlled and GameObjects.Characters.NPC namespaces.
- Deleted PlayerBasic & PlayerAdmin classes.
- BaseCharacter now contains IsAdmin property for providing admin privileges to users.
- BaseCharacter now contains IsControlled property for setting user control or AI controlled
- Added startup.dat - This will supply information to the engine as to what Types will be used during runtime. Allowing for custom Types via scripts to be instanced and used (such as a custom player class rather than the default one).
- Created PlayerAdmin class. All admins will be instances of this class; allows for segregating admin code into a different class for easier management and maintenance.
- CommandRestart now checks to make sure the player is of Type PlayerAdmin instead of player.admin
- Added ExecuteCommand to BaseCharacter. All Characters (NPC & Players) can execute commands now. Allows for AI to roam the world at some point in the future by invoking the available move commands.
MUDGame:
- Updated the command execution from CommandEngine.Execute to user.ExecuteCommand to use the BaseCharacter version.
- Changed PlayerBasic to PlayerAdmin for testing purposes.
TODO: Remove command execution from game loop, server should sit and wait for telnet data to be transmitted to it within the loop. That will be the command and passed off to the BaseCharacter/Player/NPC ect ExecuteCommand
- put server in Game
- created start server function in Game
- created CommandRestart
There are two different 'player classes' which do I use? PlayerBasic and BasePlayer.
- Added Look and Walk Commands, however they are not fully implemented.
- Corrected Networking classes having a public de-constructor. These must be private or the compiler fails.
- Corrected Networking classes using an incorrect 'using' statement. You cannot reference classes in the statement, must only reference the namespace itself (i.e. using MUDEngine.Networking).
- Removed using statement for Networking in the Networking classes as all classes created within that namespace automatically are within the same scope.
- 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)
- Updated MudDesigner to reference the new MudEngine solution.
- MudDesigner currently references engine classes within it's own solution and the MudEngine solution. This will be addressed soon. All classes related to the engine will be moved to the MudEngine project.
- Began prepping for the removal of all UITypeEditor classes and the namespace from the MudDesigner project.
Please note that while this version will compile, it is currently broken. Projects do not get created correctly due to the migration I'm performing. The designer is given less priority at the moment as the engine is the primary focus. Projects will need to be hard-coded using the MudEngine library until the designer is fixed.