Sunday, May 31, 2015


We all know Instances from popular MMORPGs out there.

I have developed a way I can handle them by having each EntityManager have a unique ID.
Each Entity transmitted has a EntityManager ID assigned to it.
Think of it like it is a game world and it is telling those entities which world they belong to.
Entities can change worlds at will and has no performance impact since it is a simple variable change.
This will likely be restricted to player's entities or NPC entities that traverse into the instance with the player.  Best part about it is I can restrict network traffic to a client based on their player character entity's EntityManager ID so that they only get the traffic for that world and it requires no changes to my existing network design.
I plan to have instances be like what BYOND uses as Z layers which are used for different regions, like the abandoned station.
You launch a shuttle out into space than an instance is created for you and I could have random events happen to you in your little instance while out in space, pack a lunch.

Very fun stuff.

This was already in the engine, just never posted about it... lots of things I have yet to post about.

Monday, May 25, 2015

C# Version Update: Networking & Encryption

Got the networking side working (again) as well as encrypting whole or part of packets.  Also, made it so that the server can update the encryption at will and I will probably have it set up where if a player is AFK for a period it will renew the encryption.  Every player's encryption is unique, so, no possibility of having your important data messed with.  When a player disconnects and reconnects they also get their encryption changed.  I could even set it up for when a player transitions to a new map they get new encryption.

I have a few further changes I plan to make to maintain integrity since when the server and client are going through the encryption renewal process, encrypted packets are dropped because they were using old data.  I already have an idea of how I will go about it in a secure way.

Another task I am planning is seeing how my Entity system works over the net.  I have it setup where if a component's property is changed, property notifications are automatic and not programmed, then that component is flagged as changed and will be sent on the next pass.  This can cause bandwidth problems, however, I also thought of a solution to that. Right now it is sending all the properties of that component even if only one property changed.  This is bad bandwidth usage.  The solution would be to only send the property of that component that did change.  This will be surprisingly easy with my new framework setup.

Update: Sending Entities works, tested the amount of bytes sent with Zone, Data, Health, Translation (position containing Vector3).  Came out to 47 bytes total.  I even have the capability to GZIP compress packets (even encrypted packets) if they get big (like sending a file).  I am very impressed with this beast.

"The arrival of a good clown exercises a more beneficial influence upon the health of a town than of twenty asses laden with drugs." -Thomas Sydenham

Friday, May 8, 2015

XDocumentation Class

Wrote up a Microsoft XML comment documentation file parser for the purpose of linking to scripting API documentation.  If you aren't familiar with XML doc comments they are what programmers use to better document what a method, property, class, or even a variable does.  It improves code readability and anyone using your framework won't have to guess what a method does if it is documented correctly.

The file is downloadable; here

This will help me having to avoid manually creating something like a Wiki that lists all the scripting functions available.  Now I can generate a CHM (help file) that can reside on your local computer.

var docs = new XDocumentation ("(Project Doc File).XML");
docs.FindAll (m => m.MemberType == XMember.XMemberType.Class).ForEach (Logger.Info);
using (var testFile = File.Open ("test.XML", FileMode.Create, FileAccess.Write)) {
   docs.Save (testFile);