Thank you Aren for the good explanation.
I tried to modify the TNServer, i added the TNGameClient.cs to the project and tried to connect and create a Channel.
Connecting works, but only for 10 seconds. (The standard of your timeout kicker).
But creating a Channel doesnt work.
That's how i try to connect and create a channel:
static void CreateChannel(int port, string name, string level, int maxPlayer, string password)
{
try
{
GameClient client
= new GameClient
();
IPEndPoint ip = Tools.ResolveEndPoint("127.0.0.1", port);
client.Connect(ip, null);
client.SetTimeout(60);
client.JoinChannel(-1, level, false, maxPlayer, password);
//client.BeginSend(Packet.RequestSetChannelData).Write(name);
//client.EndSend();
}
catch (System.Exception ex)
{
Console.WriteLine(ex.Message);
}
}
Why i plan to do this is, i want to give away the "server logic" to other people.
And if they start the gameserver, it would create a gameserver and automatically a channel with the specific user inputs, and connect to my lobby server.
And the gameserver must be possible to run under Linux (Console) or Windows without a high end graphic card.
And i want to builtin some features like a weather system(send all players only the current ingame time and the current weather) and later a AntiCheat system.
I hope you can help me Aren, or maybe an another guy/women here with some experience with it.