Development Blog v0.20.15
Been a while since my last development blog, I did post a couple of blogs which was lost when we had a Server Hardware failure where one of our SSD Drives died, sadly we were running these SSD Drives in RAID 0 (Disk Striping) so we lost absolutely everything.
We did use to do backups, sadly the last one was done over a month ago, so anything we did within that time was lost, so all my main new code within that time for Blacknova Realms was lost. I do have different versions here locally, just not an up to date version due to I was editing and compiling code remotely.
Sooooo, I now need to see how old the local versions are and work from that, I know I left some sticky notes here in the change of direction on the code.
Well been looking into the server side of things so it will be written for a Linux Server.
I am aiming to have the server application as a console-based application so that the admin can run it via a remote terminal.
So, I really want it to display a title, body, footer and a section where you enter admin commands.
So, I had to create my own Screen Buffer code which allows me to create segments on the screen and display information on just that segment.
Sure, I could have looked for an already created one and hope for it to be free, but then I have to hope that developer maintains it, I have been burnt too may times "ADODB" etc.
Granted its not perfect, it might have some issues, but I haven't seen any yet.
Well the new version of the Network Library is starting to look rather promising so far, I have got it to a stage where it was when I was adding support for different METs (Message Event Type) like ConnectEvent, DisconnectEvent, DataEvent, ServerNoticeEvent etc.
So far, the very basic server network code is about 40KB in size and the client network code is also about 40KB in size.
So, I am currently working on the MessageManager which works out the type of message and sends it off to the required handler and queues it up.
Each handler processes their own queue on its own thread so that it doesn't slow anything game wise down, so all this is done Asynchronously.
Once this Message Manager is complete I will start on the following Stages:
That's it for now.
Well I seem to of hit a brick wall again to do with the Networking code that I have been creating.
It seems that the way that I have designed it makes it a tad bit difficult to do some lookup stuff.
And having to go through loads of code which needs to happen every threaded network loop, this is causing a CPU performance hit which is impacting the number of connected users that the game would be able to support.
So, I have once again stepped back to see what every part needs to do and I think I might have it this time.
I know the Threading side of the code is fine, so it just falls down to the actual networking side that is the issue.
It seems that I might have just over complicated things with my code an that simplifying it might end up being better.
But we will see.
I am sorry I have neglected this blog section for a while, TBH I had forgotten about it due to on and off ill days.
I had been working on Octree and Quadtree stuff last year, but where its going to be like the current BNT for this version there was no need to use those.
I will be using HashSet<...> to store the information which does take a little more memory than actual List<...> but the lookup is supposed to be faster when using HashSet<...> so I will try those.
At the moment the default storage size for a Universe consisting of 2,500 Sectors is currently taking about 36 MB of RAM and 35,000 Sectors takes about 53 MB of RAM.
Out of curiosity I tried 100,000 Sectors an it took about 94 MB of RAM, so not too bad.
I am also still working on the Database side of things, changing stuff here and there.
I will try to add more stuff here.