Jump to content

Common model for whole server

Guest laise

Recommended Posts

Well currently I don't think mangos has it and maybe its time to decide if we need one?

I think there should be some pattern by which all functions/classes/etc. are written so we won't just throw things where we see fit(yea it works fine but requires more time to understand whats going on)

In general this new model should follow few rules like :

can't contradict any in-game feature and ways it works and possibly have ability to live with threads..

One of the examples for this is http://github.com/cipherCOM/mangos/tree/eventsystem-0.12 (for 0.12, only in basic stage of headers and debug functions -files Event***.h/cpp) which treats any in-game action

as an event so every part of server code regardless if its bg code or deal damage part go by format of having event(EventInfo) and passing it to listener for this specific type of event..

This way allows easier code understanding and developing new features can be faster(won't have to think how it will look like in some parts).

On the other hand switching is going to be hard because all server code needs to be changed to work with new way - this can be done on main branch as series of commits or having different branch and keeping it in sync, merging when finished.

Ofc either way we gonna loose support for most of the patches that are now on forums, even if smaller ones can be modified relatively easy, the larger ones can be a problem. Another problem

is that even if we only move existing code without fully rewriting it, we still may loose its functionality resulting in having more bugs/crashes/etc.

Would like to hear team opinion on that matter (if this change even needed and maybe there are better fitting model than event-like)..

Link to comment
Share on other sites

If my understanding is correct this is some kind of messaging system

Idea is good as for me.. but i think manager shouldn't be instanced (one manager per map probably?)

few months time ago i had written this - http://github.com/SilverIce/mangos/commits/singals_code_usage

idea is same - few objects-listeners receives messages from object-observer and handle messages in own way

( it could be used to inform auras about interrupt/trigger events, inform AI etc)

Link to comment
Share on other sites

i really like that idea (and also we worked a bit together on that branch and discussed things in the early stage), so i can only support this.

and i also think that we can do this switch smoothly, you don't need to rewrite everything at once but just go through it and update it step by step with single commits.

Link to comment
Share on other sites


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use