MMO Journey: Week 10 (binary message hell)

I managed to get the client into the world, and in the process ended up re-writing basically all of the game message classes.  I was doing some horrible things previously, storing the message data as binary byte(C#)/char(C++) arrays and reading/writing directly from those arrays when accessing pieces of the message data.

It slowly became obvious that this was a horribly wrong thing to do, and after some research I realized this problem could be solved perfectly by using structs for the message data.  Once I added a struct in each message class to represent the raw data, that data became was very well defined and could be loaded in/out of the struct as needed using memcpy (C++) or marshaling (C#).  This also had a nice side effect of causing all the message data to be properly aligned, which wasn't happening previously (using raw byte/char arrays).

This was a short update, but since I settled on that solution and am moving on to getting two clients connected and rendering each othe…

MMO Journey: Weeks 7-9 (logging in)

I needed to get more than one player connected and identified.  For some reason I decided to approach this by creating an entire Registration / Login / World Select / Character Select system.  I'm sure there are around a million better ways to prototype this, but you know what they say about hindsight.

I got re-familiar with Unity's UI elements and in about 15 minutes created a basic login screen that asks for your email and password.  The problem then became what to do with that information.  Database!  I spun up a PostgreSQL database and added tables for Account, Reality (this project's name for a "Realm") and Character.  I have some experience building web apps, so I also spun up a basic website using Ruby and Sinatra for account creation that creates rows in the Account table when someone submits their deets.

Now I had to decide how the login screen was going to authenticate.  I had no desire to try to figure out HTTPS and authentication in C++ and also reali…

MMO Journey: Weeks 5-6 (network's hard yo)

OK, so I had decided I was making an MMORPG.  I'm not entirely sure how M of an MORPG I'll be able to make, but I'm going to keep using the term MMO regardless because MO or MORPG just sounds weird to me.

The first thing I did was set up a sandbox in Unity using free assets, where I could run around in first-person on some terrain.  From there, I needed to get the game talking to some sort of server, right?  I decided to use C++ for the server for a few reasons:

Performance.  I honesty do want to attempt an MMO, and I know I won't come close with a run-time language like Ruby/Perl/Python.Linux compatibility.  I have access to Linux servers and am very comfortable working with Linux.  I don't like the idea of running a C# server on Linux, even though that would make life easier (I'm using C# for Unity scripting), and just the idea of trying to operate/manage a game server environment on Windows machines makes me want to cry.Relevance.  C++ has been used to ma…

MMO Journey: Weeks 0-4 (inspiration)

I've been working on a passion project super-part-time for just over two months now, and decided to start writing about it on a regular basis for my future self to reflect on.

The project was born of out a brief Skyrim binge (I hadn't played it yet and lots of people seem to love it).  My son had just been born and I was on paternity leave, so I had some time to kill during his naps.  Playing Skyrim on the PC was a UX nightmare for me.  The gameplay itself was great, but every time I needed to do something other than run around killing things I wanted to toss my keyboard out the window.  Every menu in the game seemed unintuitive and clunky.  Maybe it was developed for consoles and ported to PC later? No idea.  I wasn't able to play more than 10 hours before losing interest solely due to the horrendous interface.

After uninstalling Skyrim my first (upset) thought was "Man, I don't know anything about game development but I bet I could make a better experience than …