Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets
Home

[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andrew Sutton <ansutton@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Sun, 2 Dec 2001 10:51:38 +0100

> essentially, what's going to make freeciv2 fundamentally different than 
> freeciv1 is a) the programming language (c++)
I will stay happily with FreeCiv1 then.

>                                               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.
Have fun with implementing separate bit of AI control for each those capability.
Especially when we want to move AI to special client. Hmm?

> 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).
We have those capabilities already, haven't we?

> 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.
Why dynamical modules?

> 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?)
Why it would?

-- 

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC, FreeCiv hacking
.
  "A common mistake that people make, when trying to design
   something completely foolproof is to underestimate the
   ingenuity of complete fools."
     -- Douglas Adams in Mostly Harmless
.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/


[Prev in Thread] Current Thread [Next in Thread]