[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Dec 01, 2001 at 06:24:00PM -0500, Andrew Sutton wrote:
> all,
>
> here's a basic overview of the framework. i'd like some feedback on
> feasability of implementation and some other basic information from the group.
>
> essentially, what's going to make freeciv2 fundamentally different than
> freeciv1 is a) the programming language (c++) and b) the server architecture.
> in freeciv1, the server is implemented as a monolithic system where all
> capabilites are hardcoded. in freeciv2, the server is going to use a
> microkernel pattern, providing api's to major gaming elements and letting
> modules implement the actual behaviors of game elements. rulesets are going
> to be used to configure the modules and set the rules for a specific game.
>
> here's a "simple" example. the kernel maintains generic information about
> units. specifically it provides a framework for attributing units with
> capabilities and properties. a core module (lets call it core :) provides
> some default unit capabilities such as move, sentry and fortify. a civ3
> ruleset then specifies what units have what capabilities and the various
> parameters of those capabilities have (e.g. a settler can move and has the
> ability to move 1 square per turn over land).
>
> now, here's where it gets a little complicated: the actual module
> implementation. the kernel needs some way of loading modules. in linux, we
> can use dl_open() on windows... i forget what it's called. using ACE, all
> that's taken care of, we just have to call into ACE to do it. when a module
> is loaded, it registers all of its information with the kernel. so the core
> module would register the move, sentry and fortify capabilities.
>
> does this sound like an appropriate behavior for the freeciv kernel? are
> there any other alternatives besides static linking (which would defeat the
> entire microkernel architecture?)
>
> anyways, there are two ways for modules to be loaded. a) we load all modules
> at the runtime of the server from, say, a configuration file or b) the
> ruleset specifies which modules will be used. i think i'd prefer b simply
> because loading all modules might introduce some weird data into a game where
> it shouldn't be.
>
> thoughts?
Why? Why do you want dynamic loading of modules? You have the source
and can recompile. In general I think that the flexibility you want to
achieve isn't needed. If a new property (a flag now) is introduced
(you may use the unit as external resource collector for example) you
need to write a new module. Changes of about the same size has to be
incorporated in the current implementation to achieve this. I don't
see why your scheme is better.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Premature optimization is the root of all evil."
-- D. E. Knuth in "Structured Programming with go to Statements"
- [Freeciv-Dev] freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/01
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, vze2zq63, 2001/12/01
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets,
Raimar Falke <=
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Gregor Zeitlinger, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Stepan Roh, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Stepan Roh, 2001/12/02
|
|