- 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.
- Fixed a bug within MudScriptCompiler that prevented it from using standard .NET Types (would only support C# keywords).
- Fixed a bug within MudScriptCompiler that prevented it from accessing Engine Type's from within Scripts.
Mud Game:
- Changed all of the C# keywords (string, bool) back to .NET, cross-language keywords (String, Boolean).
Example Scripts will compile regardless of what compiler is used to within the MudScriptCompiler.
- 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.
- Began support work on the networking side of the designer UI. Attempts to connect to the server or run stand-alone.
- Began implementing object creation.
Mud Engine:
- Added the [Browsable(false)] attribute to several Game properties so they are not visible within the new 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.
- Realm, Room and Zone editing no longer closes the menu once a task is finished. Use the Exit menu option to close the editing menu
- Revised how the Game checks for existing InitialLocations. If a InitialLocation does not exist, but is created during server runtime, new players will automatically be placed there without the need to restart the server.
- Improved the List command.
- 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.
- 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.
- 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.
- Say command no longer invokes the player.executecommand() method as having the server force player execution of a command messes up their Command Input on the terminal client.
Now the command instances a new working copy of what ever command it needs to execute and will execute the command directly from within itself.
Note: All scripted commands and engine Types need to be updated to do this in the future.
- 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.
- 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.
- Fixed the login command not creating new players.
- Fixed the login command allowing players to log into accounts even if passwords weren't correct.
MudGame:
- Deleted the debug and release folders. These are not needed.
- 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.
- Set the Game.PlayerCollection property to Protected. You can no longer modify this list unless the class inherits from Game. Only 1 script is allowed to inherit from Game.
- Created Game.GetPlayerCollection() method for retrieving a read-only reference to the playerCollection so scripts can access player data it might needs.
- Updated various classes and scripts due to no longer being able to access the PlayerCollection property.
- 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 Game constructor setting default values for GameTime properties as the GameTime constructor does this already.
- Finished the GameTime class. Now fully supports custom Day/Time lengths and keeps track of time in sync with the server time.
- Script Engine now compiles scripts as C# 4.0 Types instead of 3.5. Scripts can now use Dynamic Types.
MudGame:
- CommandCreate script added. Provides Admins the ability to create Realms and Zones from within the game during runtime. At the moment Realm creation and Zone creation (and placement within Realms) is implemented.
- Fixed the ScriptEngine and CommandEngine not loading Custom game commands from scripts.
- BaseCharacter's Create, Initialize, Send and FlushConsole are now overridable via scripts.
- Invalid commands are now printed to the player "Invalid Command."
MudGame:
- Added CommandSay script that adds primitive chatting support. Only players within the same Room can see the messages.
- Renamed California script to WorldCalifornia
- Renamed MyGame script to EarthGame.
- Added Clear command script for and Say command script for showing how to build custom commands for use with the game. The commands can only be added server-side, but used client-side.
- 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.
- Bug fixes with object saving and restoration
- Game Deconstructor removed.
- Player Password saving, restoring and varification implemented fully.
MudGame:
- Revised scripts to demonstrate the latest environment creation updates.
- 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.
- 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.
- 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
- 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 supports Offline games. Skips various things that are server related only.
- Added a constructor to SaveDataPaths for quickly being able to assign paths.
- Game.Start is now Virtual so that scripts may override it.
- Game.Start now supports single player games and initializes players within it.
- Log now provides a Verbose mode so that Singleplayer games no longer gets flooded with Game startup messages.
- BaseCharacter.Initialize() Initialize no longer crashes when called with IsMultiplayer set to false.
- BaseCharacter.ReadInput() now supports IsMultiplayer being false.
MudServer:
- Now supports singleplayer and multiplayer games within a single application.
- MudServer is now ready to be re-named to MudGame and will be used for both Offline and Online games.