Mythruna
March 28, 2024, 11:23:59 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: New years update January 2014...  (Read 12102 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« on: December 31, 2013, 11:12:28 PM »

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. Smiley
Logged
BenKenobiWan
Friendly Moderator
Donators
Hero Member
***
Posts: 674


Jesus loves you!


View Profile
« Reply #1 on: January 01, 2014, 12:32:12 AM »

Thanks for taking the effort to clearly explain what you're doing! Glad to see progress continuing.
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #2 on: January 01, 2014, 01:53:33 AM »

Thank you for your hard work that you have put through, especially this week, Paul. Keep up the astonishing work. Smiley
Oh! And Happy New Years!
Logged
nh_99
Donators
Jr. Member
***
Posts: 71



View Profile
« Reply #3 on: January 01, 2014, 09:42:32 AM »

Thanks for the update Paul! Sounds like things are progressing pretty good! I can't wait to hear about the new plugin API so that I can make some plugins for the new version!
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #4 on: January 01, 2014, 10:06:58 AM »

Thanks, guys.

Thanks for the update Paul! Sounds like things are progressing pretty good! I can't wait to hear about the new plugin API so that I can make some plugins for the new version!

A lot of the API itself is actually the same.  Some things are simplified and the object API is more powerful (and can be done from Java or Groovy now, not just groovy.)

What I speak of above is the packaging.  It used to be that you just threw a bunch of files into a directory and the game auto-ran whatever it found there.  This made it hard to install and uninstall plugins, or upgrade them sensibly, and so on.  The new version allows them to be packaged as jar/zip files are just popped into raw directories of the same structure as would be a in a jar/zip (an expanded version, easier for development).

I won't go into too many details and some things are still in flux but basically each such bundle will have a plugin.manifest file in it that describes what it is and provides some "where it's deployed" information.  Some of this is subject to change but a manifest looks like this:

Code:
Name: Foo PlugIn
Id: foo
CreatorId: pspeed
Version: 1.2
Author: Paul Speed
WebSite: http://foo
Deploy: All

Description:
    This is a test of a description that has multiple lines.
    See how that works?
    How do we know when to stop, though?
    Indent is required for the description to continue.

    But line breaks are supported.

MinMythrunaVersion: 20120627
TestedMythrunaVersion: 20120627

dependencies:
    pspeed:bar
    pspeed:baz:1.3
    pspeed:bing:1.3+
 
plugins:
    com.pspeed.FooPlugIn.class
    somescript.groovy

server.plugins:
    ban-handler.groovy
    
world.scripts:
    foo-objects.groovy

The "world.scripts" are currently the only thing supported but that covers 99% of my use-cases so far and is essentially the way the old engine always worked.

Edit: Oh, and the other thing is that you have an API to get at resources local to your plugin.  (The plugins are called "modules" at this level because they may in fact include more than one 'plugin class', really.)  So if you have blueprints or data files or whatever then there is a convenient way to get at them.  It also works for getting at the resources of other plugins if needed.  In groovy, resource("foo/myblueprint.bp") would access a blueprint in the 'foo' module's root.
« Last Edit: January 01, 2014, 10:09:49 AM by pspeed » Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #5 on: January 01, 2014, 05:18:43 PM »

Thanks for the update Paul! Sounds like things are progressing pretty good! I can't wait to hear about the new plugin API so that I can make some plugins for the new version!
Same..

I am curious to ask questions about how it currently works, but let's just wait for when you have everything set up and you don't have to explain it more than once. Smiley
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: January 01, 2014, 07:26:32 PM »

Thanks for the update Paul! Sounds like things are progressing pretty good! I can't wait to hear about the new plugin API so that I can make some plugins for the new version!
Same..

I am curious to ask questions about how it currently works, but let's just wait for when you have everything set up and you don't have to explain it more than once. Smiley

Yeah, plus I think I've said all I can without getting too much into things that are still influx.
Logged
ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #7 on: January 02, 2014, 05:40:11 PM »

good work Paul I'm still hoping for another release of the game fixing inventory coming by this summer  Tongue
Logged

belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #8 on: January 02, 2014, 08:43:28 PM »

wanted to let you know im still here ^_^ glad to see progress as always
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #9 on: January 03, 2014, 05:55:12 AM »

good work Paul I'm still hoping for another release of the game fixing inventory coming by this summer  Tongue

You've mentioned this before but inventory is not broken in the current version... I'm not sure what needs to be "fixed".
Logged
ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #10 on: January 03, 2014, 10:00:26 PM »

good work Paul I'm still hoping for another release of the game fixing inventory coming by this summer  Tongue

You've mentioned this before but inventory is not broken in the current version... I'm not sure what needs to be "fixed".
well you could make it so we can place stuff in our inventories like in your mock up threads.....
(sorry if I'm completely wrong)
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!