Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: RFC (was curiosity)
Home

[Freeciv-Dev] Re: RFC (was curiosity)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Adammgregory@xxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: RFC (was curiosity)
From: Andrew Sutton <ansutton@xxxxxxx>
Date: Sat, 1 Dec 2001 14:32:48 -0500

On Saturday 01 December 2001 01:40 pm, Adam Gregory wrote:
> How about going for an object oriented approach for version 2? It
> might be easier to create custom units if a modular approach was used with
> their abilities, and multiple inheritence. Kind of like how units are
> designed in the workshop in AC, it'd be nice to be able to inherit a sea
> settler from a settler class and a ship class. That could make it easier
> for people to modify the code for their own branches of the the game, and
> would make the units less hardcoded into the game, which was a complaint
> that's been brought up recently, I think.
>       Of course using an object oriented design would have many other
> implications, the units are just what springs to mind for me. Are there
> enough C++ hackers in the regular contributors to make it worthwhile? I
> know I'd like to help however I can. I'm new to freeciv-dev so please
> don't flame too hard if my ideas are stupid!

flame flame flame. just kidding :) actually i've been doing alot of thinking 
about the unit class and capabilities. i thought that would be an excellent 
place to use inheritance for specialized units, but its not. remember that 
the capabilities of a unit vary per ruleset, not per unit. i've come up with 
an OO mechanism for handling this adaptation where the unit is just a 
container of capabilities (sort of). the capabilities define what the unit 
can do and other various properties.

good thoughts though...

when i finish up the document, i'll post it back to the list. it's kind of a 
requirements/design document for the units, and it should be pretty complete. 
i eventually hope to have something similar for all game aspects that can be 
combined into a master design doc. it should be pretty useful for an 
internals guide.

andy


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