So, my holiday break is almost over and I figured I would finally drop a status update here.
I'm not going to lie, I wanted to be much farther along by now but it is what it is... and we picked up a few extra foundational things on the way.
I wanted to be "coding networking" by the start of my vacation a week and a half ago but it just wasn't in the stars. I went into the break having to resolve some architectural issues that I'd left festering for some time. Then Saturday through Christmas almost no work was done as I was decorating and doing family related things on through Christmas. By Thursday, I was deep in design work and getting things accomplished.
The new engine had a pretty decent start of a plugin framework but once I got to the server I knew I really needed to start thinking about how plugins would be packaged. Plugins/mods are really just code until you have to start dealing with server startup, client-server synching, etc. so a lot of open design questions needed to get worked out and it turns out that the only way to work most of them out was a nearly full implementation of plug-in packaging.
This whole question reared it's ugly head because login and account management needs to inherently be pluggable. Even in my own servers, I may want to enable and disable certain login protocols. These things are not so hard to imagine on the server but the client is another story. So far all of the plugins had been related to the "application" or the "world"... and I had a pretty clear picture and partial implementation for how all of that works. In fact, world plugins have been no problem since the second or third week of the new engine. All new code has been built in this framework. App plugins configure the app itself at the base level while world plugins control everything about the world life cycle. 100% of the game code is world plugins basically and this is where 99% of the mods will live.
But here you have this login service thing. It is not part of the base application because it needs to be setup based on the server plugins... which would be "world" plugins (since that's where the user DB generally lives, with the world). On the other hand, you don't really have a full "world" until you are logged into the server with an account. So this made me worry that there was some other class of plugin that was neight application nor world. It turns out, no... but it took a lot of design work and use-case documentation to get to that point.
In the mean time, I've worked out most of the plugin packaging. I could even document how plugins will be packaged in the new engine (and I might) and it's much more "real" this time around... with proper bundling, plugin info, etc... all set for the day when we can download plugins automatically because some server wants us to have it. So far only scripts work in plugins but the design is there for Java classes, etc... the plugin architecture itself is Java classes anyway but setting up classloaders, blah blah blah is not something I wanted to code right now. Those are essentially solved problems but I don't need them yet.
After all of that, the basic "doesn't really accept connections" server went together pretty quickly as far as instantiating a world and initializing the plugins. I entered into Sunday working on the actual account management and login servers. This turned out to be another pretty huge task.
The old server was pretty dumb. You connected and it immediately started streaming data to you. There was some hacked in modality but for the most part, no.
The new server has specific 'states' that the connection is in. When you first connect, the only thing the connection knows is how to log you in or create accounts. (It is also setup to contact the mythruna.com server to verify 'central' users but I haven't written that part yet on the server.) Once logged in then you are only in the character creation and selection mode until a character is selected and then you are finally "playing".
The delineations are much cleaner and much less prone to error. The server is wired up dynamically as it should be. (The more I go the more it starts to resemble an app server but that's another story.)
So that's what I've gotten accomplished in the past week. Tonight I was finally able to create accounts, login, reset my password, etc... it even handles the new more secure user login protocol with a natural fallback to the old 'legacy' one. And if you login with the legacy one it forces you to do a password reset. I've been testing that with a simple command-line client. Tomorrow I will do the UI side and integrate it with the real client. I may reorganize the client's plugin initialization at the same time because it got a little sloppy without a networking model to keep it in check. (It's generally really hard to turn single player games into networked games but Mythruna has always been written as a networked game... it doesn't mean I didn't let some temporary short cuts slip in, though, while I was lacking multiplayer. So I'll get to find all of those tomorrow.)
That's where we are now:
-proper plugin packaging implemented
-some more robust plugin features
-a server that can load and 'run' a world but not actually allow any game data to go out yet, and
-the server half of the login/account management services
Not bad for a week, I guess. I still wish there was some cool screen shots to show.