Commit graph

20 commits

Author SHA1 Message Date
Scionwest_cp
7e31a78f72 MudEngine:
- 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.
2010-08-22 11:20:22 -07:00
Scionwest_cp
386d90df19 MudEngine:
- 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.
2010-08-19 19:09:45 -07:00
Scionwest_cp
3110b74b58 MudEngine:
- 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.
2010-08-15 14:57:41 -07:00
Scionwest_cp
93a27ca75f MudEngine:
- 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.
2010-08-15 14:11:21 -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
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
8b1be3d1eb MudEngine:
- CommandLogin no longer invokes the Look Command
 - Fixed CommandWalk no longer telling the player an invalid direction message when trying to walk to someplace that does not exist.
 - Moved PlayerCollection array referencing from Game.Start() to the Game's constructor so that scripts may change the player class during its startup.
 - BaseCharacter now invokes the Look command after Login command is completed.
 - ScriptEngine no longer sets the output path for a compiled script if the script is designated as compile to memory.
 - Fixed custom players not being able to access their own Methods and Properties during runtime.

MudServer:
 - Additional Console Log Messages added.
2010-08-06 23:37:52 -07:00
Scionwest_cp
88378584ac MudEngine:
- Game now checks to see if there is a initial environment setup, if not an Abyss is created to store players in.
 - Game now compiles scripts prior to loading libary assemblies to ensure the latest assembly is loaded.
 - BaseCharacter now supports the Abyss room if no initial Game realm is set.
 - BaseCharacter will no longer load the player into a room that does not exist (was deleted or something), they are defaulted into the Abyss.
 - ScriptEngine checks for errors in the script prior to trying to reference the compiled assembly (was causing errors if scripts failed to compile; no assembly generated to reference)
 - Assembly libraries are now only loaded once.

MudServer:
 - Example MyGame.cs script now constructs a realm and sets default properties.
 - MyPlayer script added to show how to write your own player script.
 - Server loop restored and now working correctly.
 - Server now outputs additional info regarding startup.
 - Server now forces TCP protocol.
2010-08-05 19:07:12 -07:00
Scionwest_cp
c3c2d22ec7 MudEngine:
- 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).
2010-08-05 17:46:30 -07:00
Scionwest_cp
0f45ecec53 MudEngine:
- Updated all game commands to support the new Player.Send() method. Returning CommandResults is no longer supported.
 - Login command now executes the Look command upon completing login.
 - Look command now supports Rooms DetailDescription property. Use this for multi-line descriptions.
 - Several changes to the Restart command. Still not working fully however, it no longer calls duplicate methods.
 - Fixed Walk command not moving players around.
 - Loading engine commands no longer happens more than once.
 - Added additional Server Console log output
 - BaseCharacter.Send() now correctly displays content to the user and prints the "Command:" message to the player after every command completed.
 - The Server now sets Player.IsControlled to true when a player connects.
 - BaseCharacter.Send() checks if the game is multi-player or not. If it is, it prints to Console, if not then prints to telnet clients.

Mud Offline Example:
 - Updated Zeroth Realm creation to use Room.DetailDescription now that the Look command supports it.
 - Updated the Game loop. No longer needs to print to the console due to the player.Execute() command automatically printing content to the console.

Mud Server:
 - Removed player from server as it was not being used any longer.
2010-08-03 20:20:24 -07:00
Scionwest_cp
29cdae3b1a MudEngine:
- Corrected CommandLogin to support the Player.Send/Receive methods.
 - Re-organized the Game class source code and added additional commenting.
 - Began adding code to remove un-wanted characters in the received byte stream in Player.Receive()
2010-08-01 17:34:59 -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
793c3cf1e9 MudEngine:
- FileManager.GetDataPath now returns the actual Root directory when Root is requested rather than Root/Projects. That was considered Root for the older Designer.
 - CommandEngine.GetCommands is now a method rather than a property.
 - CommandEngine.LoadAllCommands replaced with CommandEngine.LoadBaseCommands for loading Engine specific Game commands. This is called from within Game.Start. A possible property for disabling default commands could be looked at in the future.
 - CommandEngine.LoadCommandLibrary method added for loading custom user commands. This is fully implemented.
 - CommandEngine.ClearCommands method added for clearing all currently loaded commands.
 - Game.IsDebug static property added.
 - Added additional logging for testing purposes throughout the project. Changing Game.IsDebug to false will remove the majority of the logged messages.
 - Game.IsMultiplayer property added for enabling or disabling the server for Online/Offline support. Fully implemented.
 - Game no longer loads user script libraries as this was being handled already by ScriptEngine.Initialize()
 - Log now caches messages so consoles can print only content that was logged since the last loop. Using Log.FlushMessages() will clear the cached messages allowing each loop to show only the new logged messages.
 - BaseCharacter IsAdmin argument in the constructor has been removed. No longer needed for testing.
 - ScriptEngine can now compile more than 1 script without error.
 - ScriptEngine.Assembly property added for accessing the currently loaded script library. This should be a List<Assembly> in the future for multiple libraries.
 - Removed the last of my BlitScript engine code from ScriptEngine.cs as it was XNA specific. Need to look at StartupObject.cs as I believe that is XNA specific as well and not needed.

MudGame:
 - Renamed MudGame to MudOfflineExample as it will be used for testing the game with Game.IsMultiplayer disabled. Makes testing easier then needing to stop/restart the server and connect via telnet constantly.

MudServer:
 - Added MudServer project. This is a dedicated server that runs with Game.IsMultiplayer enabled. Developers can connect to it via telnet clients. All engine game commands are implemented.
 - MudServer includes bin/Debug/Scripts.dll, which is a compiled library of scripts generated via MudCompiler. MudEngine.Game handles loading the library and there is no additional code required by the developers to implement their libraries into their games provided the name is 'Scripts.dll'
2010-07-27 16:31:50 -07:00
Scionwest_cp
0587b4a475 MudEngine:
- 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).
2010-07-25 11:04:32 -07:00
Scionwest_cp
dbe1e693e5 MudEngine:
- Changed Player[] array to a List<> Collection of PlayerBasics. This change is reflected across all Types.
 - Game now contains a Start() function. StartServer is now called from within here.
 - Game now has partial support for the Script Engine

MudGame:
 - Game.StartServer has changed to Game.Start(). StartServer is called within Start().
2010-07-24 10:33:27 -07:00
Scionwest_cp
0f87ac233a MUDCompiler:
- Now compiles scripts contained under a MUDCompiler/bin/debug/Scripts folder.

MudEngine:
 - ScriptEngine now wraps scripts inside a default namespace. MUDScripts MUST not be placed within a namespace inside the script. The Engine handles it automatically.
2010-07-23 17:22:25 -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
35c10eed68 MudEngine:
- Implemented Scripting Engine; Not fully completed
 - Migrated PlayerBasic from MudDesigner to MudEngine.
2010-07-16 15:35:10 -07:00