Commit graph

22 commits

Author SHA1 Message Date
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
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
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
607bd673a5 MudEngine:
- 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.
2010-07-30 19:31:49 -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
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
u8sand_cp
281fe4b320 - Complete networking aspect
- 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)
2010-07-26 18:45:21 -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
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
e9e3bb8033 MudEngine:
- 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
2010-07-22 16:18:53 -07:00
u8sand_cp
1baa067044 - Added player array in game
- 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.
2010-07-21 09:32:27 -07:00
u8sand_cp
a26280b711 - Much work on the networking
- ServerSocket done.
- ClientSocket done.
- Few fixes required:
   - Warning in ServerSocket
   - Friends possible in C#?
2010-07-19 07:09:34 -07:00
Scionwest_cp
6987d8178f MudEngine:
- 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.
2010-07-18 21:25:12 -07:00
u8sand_cp
ce94e8d3f8 Sigh, I'm probably spamming the board now. Who woulda known commit wouldn't commit something up_one_level. 2010-07-18 20:32:46 -07:00
u8sand_cp
3227210590 Networking Finally starting to be added :D 2010-07-18 19:53:05 -07:00
Scionwest_cp
6282478c9f Migrated entire project to Visual C# Express 2010 and .NET Framework 4.0
Any users using the source code will need to use the aforementioned products from now on.
2010-07-18 14:36:26 -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
06266b7245 MudEngine:
- 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)
2010-07-17 09:55:43 -07:00
Scionwest_cp
d40b8690d5 - Migrated additional content from MudDesigner solution to MudEngine.
- 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.
2010-07-15 20:21:56 -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