Deletion of Alpha 1.4 MudGame project from Solution
This commit is contained in:
parent
388f2cf1e5
commit
dc960abec1
5 changed files with 7 additions and 220 deletions
|
@ -5,15 +5,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudEngine", "MudEngine\MudE
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MUDCompiler", "MUDCompiler\MUDCompiler.csproj", "{98E974DA-C650-4B88-B2F8-57AC7AE6C34F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MUDCompiler", "MUDCompiler\MUDCompiler.csproj", "{98E974DA-C650-4B88-B2F8-57AC7AE6C34F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudGame", "MudGame\MudGame.csproj", "{0C47648F-8751-4A71-98ED-A3D0845627E2}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudClient", "MudClient\MudClient.csproj", "{970B3390-7485-41A5-8465-CFF2580501B6}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudClient", "MudClient\MudClient.csproj", "{970B3390-7485-41A5-8465-CFF2580501B6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudDesigner", "MudDesigner\MudDesigner.csproj", "{5B18E552-26D0-4491-8BAC-FF80046F0B0F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MudDesigner", "MudDesigner\MudDesigner.csproj", "{5B18E552-26D0-4491-8BAC-FF80046F0B0F}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(TeamFoundationVersionControl) = preSolution
|
GlobalSection(TeamFoundationVersionControl) = preSolution
|
||||||
SccNumberOfProjects = 6
|
SccNumberOfProjects = 5
|
||||||
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
||||||
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs03
|
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs03
|
||||||
SccLocalPath0 = .
|
SccLocalPath0 = .
|
||||||
|
@ -23,15 +21,12 @@ Global
|
||||||
SccProjectUniqueName2 = MUDCompiler\\MUDCompiler.csproj
|
SccProjectUniqueName2 = MUDCompiler\\MUDCompiler.csproj
|
||||||
SccProjectName2 = MUDCompiler
|
SccProjectName2 = MUDCompiler
|
||||||
SccLocalPath2 = MUDCompiler
|
SccLocalPath2 = MUDCompiler
|
||||||
SccProjectUniqueName3 = MudGame\\MudGame.csproj
|
SccProjectUniqueName3 = MudClient\\MudClient.csproj
|
||||||
SccProjectName3 = MudGame
|
SccProjectName3 = MudClient
|
||||||
SccLocalPath3 = MudGame
|
SccLocalPath3 = MudClient
|
||||||
SccProjectUniqueName4 = MudClient\\MudClient.csproj
|
SccProjectUniqueName4 = MudDesigner\\MudDesigner.csproj
|
||||||
SccProjectName4 = MudClient
|
SccProjectName4 = MudDesigner
|
||||||
SccLocalPath4 = MudClient
|
SccLocalPath4 = MudDesigner
|
||||||
SccProjectUniqueName5 = MudDesigner\\MudDesigner.csproj
|
|
||||||
SccProjectName5 = MudDesigner
|
|
||||||
SccLocalPath5 = MudDesigner
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -62,16 +57,6 @@ Global
|
||||||
{98E974DA-C650-4B88-B2F8-57AC7AE6C34F}.Release|Mixed Platforms.Build.0 = Release|x86
|
{98E974DA-C650-4B88-B2F8-57AC7AE6C34F}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{98E974DA-C650-4B88-B2F8-57AC7AE6C34F}.Release|x86.ActiveCfg = Release|x86
|
{98E974DA-C650-4B88-B2F8-57AC7AE6C34F}.Release|x86.ActiveCfg = Release|x86
|
||||||
{98E974DA-C650-4B88-B2F8-57AC7AE6C34F}.Release|x86.Build.0 = Release|x86
|
{98E974DA-C650-4B88-B2F8-57AC7AE6C34F}.Release|x86.Build.0 = Release|x86
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Debug|Any CPU.ActiveCfg = Debug|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Release|Any CPU.ActiveCfg = Release|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Release|Mixed Platforms.Build.0 = Release|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{0C47648F-8751-4A71-98ED-A3D0845627E2}.Release|x86.Build.0 = Release|x86
|
|
||||||
{970B3390-7485-41A5-8465-CFF2580501B6}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{970B3390-7485-41A5-8465-CFF2580501B6}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
{970B3390-7485-41A5-8465-CFF2580501B6}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
{970B3390-7485-41A5-8465-CFF2580501B6}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
{970B3390-7485-41A5-8465-CFF2580501B6}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
{970B3390-7485-41A5-8465-CFF2580501B6}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
using MudEngine.Core;
|
|
||||||
|
|
||||||
namespace MudGame.Characters
|
|
||||||
{
|
|
||||||
public class MudCharacter : BaseCharacter
|
|
||||||
{
|
|
||||||
private TcpClient client;
|
|
||||||
|
|
||||||
public MudCharacter(BaseGame game)
|
|
||||||
: base(game)
|
|
||||||
{
|
|
||||||
this.Role = CharacterRoles.NPC;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnConnect(TcpClient client)
|
|
||||||
{
|
|
||||||
this.client = client;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnTravel(MudEngine.World.AvailableTravelDirections travelDirection)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Send(string message)
|
|
||||||
{
|
|
||||||
NetworkStream ns = this.client.GetStream();
|
|
||||||
|
|
||||||
ASCIIEncoding encoder = new ASCIIEncoding();
|
|
||||||
|
|
||||||
byte[] buffer = encoder.GetBytes(message);
|
|
||||||
|
|
||||||
ns.Write(buffer, 0, buffer.Length);
|
|
||||||
ns.Flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnTalk(string message, ICharacter instigator)
|
|
||||||
{
|
|
||||||
if (instigator == this)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
using MudEngine.Core;
|
|
||||||
using MudEngine.Runtime;
|
|
||||||
|
|
||||||
namespace MudGame.Commands
|
|
||||||
{
|
|
||||||
public class CommandLogin : BaseCommand
|
|
||||||
{
|
|
||||||
public override void Execute(string command, ICharacter character)
|
|
||||||
{
|
|
||||||
character.Send("Welcome to " + character.ActiveGame.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,104 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
using MudEngine.Core;
|
|
||||||
using MudEngine.Runtime;
|
|
||||||
using MudEngine.Communication;
|
|
||||||
using MudGame.Characters;
|
|
||||||
|
|
||||||
namespace MudGame
|
|
||||||
{
|
|
||||||
public class MudGame : BaseGame
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a reference to the game scripting system
|
|
||||||
/// </summary>
|
|
||||||
protected ScriptSystem ScriptSystem { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a reference to the games command execution system
|
|
||||||
/// </summary>
|
|
||||||
protected CommandSystem CommandSystem { get; private set; }
|
|
||||||
|
|
||||||
public MudGame()
|
|
||||||
: base()
|
|
||||||
{
|
|
||||||
ScriptSystem = new ScriptSystem(".mud");
|
|
||||||
CommandSystem = new CommandSystem();
|
|
||||||
Server = new Server(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Initialize()
|
|
||||||
{
|
|
||||||
//Setup the example game.
|
|
||||||
this.Name = "Mud Example Game";
|
|
||||||
this.Description = "An simple Mud Game class that manages the basics";
|
|
||||||
this.AutoSaveInterval = 5;
|
|
||||||
this.EnableAutoSave = true;
|
|
||||||
this.PasswordMinimumSize = 8;
|
|
||||||
this.Version = "Alpha 2.0";
|
|
||||||
|
|
||||||
//Add the engine.dll.
|
|
||||||
string assembly = Assembly.GetExecutingAssembly().GetName().Name + ".dll";
|
|
||||||
this.ScriptSystem.AddAssemblyReference(assembly);
|
|
||||||
|
|
||||||
//If a scripts directory exists, compile them.
|
|
||||||
if (Directory.Exists("Scripts"))
|
|
||||||
{
|
|
||||||
this.ScriptSystem.Compile("Scripts");
|
|
||||||
// if (this.ScriptSystem.HasErrors)
|
|
||||||
//TODO: Output script system compile errors
|
|
||||||
//return; //temp. Shouldn't return.
|
|
||||||
}
|
|
||||||
|
|
||||||
//Scripts are compiled, now load all of the commands, if any script commands exist.
|
|
||||||
CommandSystem.LoadCommandLibrary(Assembly.GetExecutingAssembly());
|
|
||||||
CommandSystem.LoadCommandLibrary(ScriptSystem.CompiledAssembly);
|
|
||||||
|
|
||||||
//TODO: Initialize the game world.
|
|
||||||
|
|
||||||
//TODO: Load previously saved state.
|
|
||||||
|
|
||||||
//TODO: Enable server.
|
|
||||||
if (this.EnableServer)
|
|
||||||
this.Server.Initialize();
|
|
||||||
|
|
||||||
this.IsRunning = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Shutdown()
|
|
||||||
{
|
|
||||||
if (Server.IsRunning)
|
|
||||||
this.EnableServer = false;
|
|
||||||
|
|
||||||
this.Save();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Update()
|
|
||||||
{
|
|
||||||
if (this.Server.IsRunning)
|
|
||||||
this.Server.Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnConnect(System.Net.Sockets.TcpClient client)
|
|
||||||
{
|
|
||||||
MudCharacter character = new MudCharacter(this);
|
|
||||||
character.Role = CharacterRoles.Player;
|
|
||||||
character.OnConnect(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDisconnect(System.Net.Sockets.TcpClient client)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetAvailableID()
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.IO;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace MudGame
|
|
||||||
{
|
|
||||||
static class Program
|
|
||||||
{
|
|
||||||
static void Main(String[] args)
|
|
||||||
{
|
|
||||||
MudGame game = new MudGame();
|
|
||||||
game.Initialize();
|
|
||||||
|
|
||||||
while (game.IsRunning)
|
|
||||||
{
|
|
||||||
game.Update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue