Mythruna

Development => Blog => Topic started by: pspeed on January 26, 2015, 12:20:21 AM



Title: A little progress in early 2015...
Post by: pspeed on January 26, 2015, 12:20:21 AM
I was able to push things along a little this weekend finally.  Life has been pretty crazy lately and I just can't seem to catch up and/or have motivation at the same time.

I've been struggling with how to handle the actual "what avatar to use at runtime?" problem for a player entity.  Right now the Avatar is fairly well hard-coded.  It would have been possible to hack something in based on gender just for the short term but really I would then have a ton of problems handling the visibility of other players and so on.

I've been thinking about how to break up the 'attributes' (for lack of a better word) for a player, what to call them, etc. in the back of my mind for several weeks now but I finally made some headway on Saturday.  Just me, my notebook (paper, not computer), a green pen, and an hour to kill waiting for my daughter.  I had this idea that much of a player-character's (PC's) attributes (gender, race, etc.) would be shared by non-player-characters (NPCs) also.  From that I began to sketch out what was PC specific and what was shared.

I started to see the separation between what the game logic thinks of as a model and what the game client thinks of as a model, and working out how a particular entity gets associated with a specific model type.

I also struggled with internal names a little bit.  It occurred to me that this system should apply to all mobs, so not just NPCs but creatures, too.  So I chose to use Species instead of race.  Mostly this fits fairly well for the 'races' but not always technically (One biological definition of 'species' is the largest group that can still interbreed... and while most of the races can't cross-breed this is not true for all of them, e.g.: elves and humans.)  At any rate, it fits way better than Race would have fit for mice, dragons, and gru-lizards.

To the player, race will still be race but internally it now maps to one of seven species when the 7 races are finally implemented.

I guess the bottom line is that a lot of design logjam was cleared this weekend.  Even though it will be a long time before I get to creatures and non-human races, it's nice to know that some of the code is in place to handle it.

As far as implementation, I've gotten the mob type service and mapping implemented.  It even properly plugs into the other services so that it is moddable/scriptable like any other plug-in.  That went relatively easily and I even documented it so I don't have to learn it again next time.

At the end of tonight, I have the basics in place to create the base player characters and even migrate our existing player characters over to the new approach.  Next will be implementing the visual side.  There is some work to do there too since even the two models that I use get heavily configured at runtime and that will all move to CharacterModel scripts.  Still, I think the design there is pretty sound and so it's all just details now.  The only wildcard in my mind is reteaching myself where the plug-in points for client-side scriptable services live... but it's another opportunity to expand my documentation, also.

So, a little progress... and some future foundations that will pay off dividends later.


Title: Re: A little progress in early 2015...
Post by: Rayblon on January 26, 2015, 02:29:33 AM
Great to hear that you made some progress on that. I ponder alot about how you may end up tailoring the avatar building. There's just something about customization that brings a game to life.


Title: Re: A little progress in early 2015...
Post by: ebag51 on January 26, 2015, 02:09:50 PM
Great job Paul. I hope this will speed up development process. :P


Title: Re: A little progress in early 2015...
Post by: Michael on February 05, 2015, 08:58:48 PM
I'm proud of you, glad to know you're having fun with this. :) I hate it when I don't know what to call a specific thing.