[crossfire] Moving server towards a modularized system?

Mark Wedel mwedel at sonic.net
Mon Jan 16 01:09:50 CST 2006


Nicolas Weeger wrote:
> Hello.
> 
> I'm wondering about moving some parts of the code to plugins.
> IMO things like weather system (excluding darkness-related things) could
> be moved to a plugin, and just hook to server core.
> Random maps generation too could imo be moved.
> (particularly weather, as it's really optional, setting for that).
> 
> Actually, shouldn't the server be just a "core" with basic rules, and
> everything else moved to plugins?

  The harder part is to define what are the core/basic rules and what are options.

  Taken to an extreme, you could say just write the entire thing in 
python/perl/whatever.  There isn't much a reason to do that (you're basically 
re-writing anything, so only point would be to try to remain some compatibility).

  I personally don't see much reason to rewrite existing code that is working 
fine as a plugin.  There are just enough things that could be/should be done 
than rewriting working code doesn't make sense.

  All that said, could probably make some general rules for a plugin/built in test:

1) Speed - I'm sure the plugin is slower to some extent - ignoring the actual 
plugin language, the fact that access of a lot of data is done through callback 
functions vs direct access has to hurt a bit.  This isn't an issue if a plugin 
isn't used very often, but probably would become an issue if the plugin is used 
multiple times every tick.

2) Complexity - I'd make the case that debugging very complex pieces is done if 
all is in native C - don't have to debug accross languages, etc.


> 
> Nicolas
> 
> _______________________________________________
> crossfire mailing list
> crossfire at metalforge.org
> http://mailman.metalforge.org/mailman/listinfo/crossfire




More information about the crossfire mailing list