Development Blog v0.20.15
Ok, played about with some code and it now loads up the Dummy Services fine, and I can now unload them (sort of), but it works as I want it.
Going this route, I should be able to have the Auth Service as encrypted with SSL / TLS and the other Services as unencrypted connections.
I can either have all services in separate server applications or all in one server application.
The main thing was to allow for secure connections when needed and not be forced to encrypt everything.
Sure, there will be more connecting and disconnecting but it would be like that if I separated all the Services, so no issue there.
Well after cleaning up some classes it seems that a lot of code wasn’t being used, this was due to moving over to a new better way of doing stuff.
Like before I am using Reflection to load up all the required services and have them hook into the framework.
I have also setup SVN locally where I will be working on the code.
I should now be able to have all services in the same runtime assembly and just have the client connect to the server and tell it that it wants to login, the AuthService will respond with that it needs to enable encryption, they both enable encryption and client authenticates, server then responds with yeah ok along with a connection session id (i.e. UUID type structure) followed by the IP Address and Port of the Lobby System which handles all the list of running games, then the client drops connection.
The Client then connects to the Lobby Service via the supplied address and port (this is not encrypted) and asks for a list of all the game servers running. This connection remains connected for server news, ID Chat (global chat that goes through our network to anyone on your friends list etc, so each player can be on a completely different game server and chat), Friends / Clan members connecting Alerts etc.
The Client then selects what game server it wants to play on and then opens up a second connection for the game server.
The Game Server will handle all the game as normal along with Game Chat (only allows chat to players on that server only.
Anyhow the client sends its connection session to the Game Server and that Game Server then will ask our network for a reference id (UUID formatted structure) to refer to that client every time it connects to that game server.
Game Servers DO NOT store any account information, only we store that, Game Servers will ONLY store game information like (Character, Ship, Universe, Planets etc)
Anyhow more information to come.
Ok, I have had a few hours spare today so I have been playing about with how the new framework will be done.
The Server Runtime looks up the Different Services in the Runtime Assembly and then Invokes their Initialization Method which then setup its own Handler of Network Messages, starts up its own features (database loading, caching etc) and plugins etc.
Then the Server Runtime continues onto starting up its own Network Service and waits for a new connection.
The Network Connection can be Encrypted (RSA Key Exchange) using TLS1.2+ per Networking Service, so if all services (Auth, Chat and Game) are in a single Server Runtime all Network Traffic will be encrypted, however if all separate Server Runtimes then you can select to use Encryption per Service.
I am trying to design the code as a Framework, this will allow me to create multiple Projects (Auth Service, Game Service, Chat Service, Game Client, and Proxy Service) using the same parts of the code.
These Projects like Auth, Game, Chat and Proxy Services might end up as Modules, these Modules can also support Plugins (i.e. sub Modules) that are loaded up at runtime, so these Modules and Plugins can be switchable.
I am also aiming to use .NET 4.5 upwards; I have done test applications using .NET 4.7 and it worked fine on Ubuntu Server.
The reason to using Modules is so that if at any time we stop supporting this game we can easily release the Service Modules not normally supplied for Game Servers like Auth, Chat and Proxy Modules, and with a slight config change will allow an admin to host the game as a whole.
--- More to come later ---
I played some games last week and wondered how I could have some of these featured in this new game.
Features like bases on planets, a base is required to update the areas to allow for more stuff to be placed on.
So, assume we are allowing for players to own planets, they would have a default size of plot on the planet, now if they build a base on the planet it will allow for different structures / buildings etc to be placed, so we could have different types of bases, like Military and Research bases.
Each type of bases will unlock different types of buildings and will have levels to them, each level unlocks more areas to place those types of buildings.
But due to where I am wanting to have this game run as a persistent running game this wouldn’t work as intended the longer it was run.
But there shouldn’t be any issues in having bases on planets for resource harvesting, researching bases, and so on, like the higher the base level the larger the area of land to place stuff, assuming the Planet, Moon, Asteroid etc is large enough to support that base size.
Well not really done much for the last few weeks, had a few Hospital Appointments and also being ill on and off 😷.
While no coding has happened much as late 😢, I have been looking at some stuff, I did look at WebSockets, sadly I would have to use Apache as a Proxy Server and due to Apaches Limitation in its amount of opened connections this wouldn’t be the best route to take.
Sure, I could create our own Proxy Server that might work, but run the risk of security flaws due to not testing it in a secure safe manner.
As for the Client and Server Framework, I “think” I have a good idea on how to do this now so that I won’t have that Singleton / Static issue that I noticed last time.
I just need to spend some time coding a rough version of it and then split the generic code that’s used for the Client and Server and put that into a base class and derive / inherit from that.
I have currently been working with TCP Sockets, but might also add UDP Sockets to the framework.
So, anything that needs to be secure (via SSL/TLS) like Authentication etc will use TCP and the actual Game networking traffic could be UDP Sockets, this will speed up networking traffic due to its connectionless.
But this is just an idea.
You all probably already noticed the changes to the blog section, but I cleaned it up a little and added a more better static background image, I have also cleaned up and changed some files so it should load up faster.
The background image use to be a JPG but is now WebP format so it went from about ~2MB down to ~240KB and I couldn’t see any loss.
Oh Hum,
It seems that I really need to look ahead when developing stuff.
Ok, I was using Instances (a Singleton) with my code so that exact object was the same one all over my code.
This worked great for the Auth Server which was almost done and also ok for the Client Connections, sadly this was NOT the case when I started to work on the actual Game Server.
The Game Server will allow for thousands of Concurrent Connected Users (ccu) along with creating Client Connections itself to our services so that it can talk to us, some services might even be running multiple servers or multiple clients.
Like the Game Client will open a connection(s) to our Network Services (For Authentication, News, Global Chat, Friends / Social / Communities etc) as well as one for the Game Server that they will be playing on.
And where everything was using Instances (Singletons) it all started to clash with each other (i.e. I was only able to run one single service), so now I need to look into this once again.
This isn’t really a bad thing, I have found some better ways to do some stuff, its just a little setback that’s all.
I am able to allow for Plugins for the Game Servers which get loaded at start-up which would allow for new features like New Commodities, New AI and so on.
Sorry not done much as late (wow, has it been that long), RL Health issues all stacking up on me, not really Monitored the games we even run.
But on my down time I have been thinking how to do some stuff, I have also been looking into WebGL, so we "might" have a Browser based version along side a desktop version, but I really want to concentrate on the desktop version first. And if there was a demand for it later on, we could look into building a WebGL version.
I have also been looking into my Networking Library and have seen some parts that might become an issue.
Anyhow I just really wanted to say I have not given up just yet LOL