Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Ruleset Development Was: Development Strategies
Home

[Freeciv-Dev] Re: Ruleset Development Was: Development Strategies

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Cc: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Ruleset Development Was: Development Strategies
From: Andrew Sutton <ansutton@xxxxxxx>
Date: Tue, 4 Dec 2001 12:26:57 -0500

On Tuesday 04 December 2001 12:21 pm, Ben Webb wrote:
>       In Sid Meier's Alpha Centauri (SMAC) you can design your own units
> by combining a Chassis, Weapon, Armor, Reactor and one (or two, if you
> have discovered Neural Grafting, IIRC) "special" abilities. For example, a
> basic "Scout Patrol" unit combines the "Infantry" chassis with "Hand
> Weapons", "No Armor" and "Fission Plant", and has no special abilities,
> while a "Colony Pod" is the same, but replaces the scout's weapon with a
> colony module. We "AC people" call these "compound" units, and implement
> them by essentially just summing together the attack/defense/moverate
> (etc.) of the various component unit types to give the final unit.
> Governments can be customised in exactly the same way, by combining
> "Economics", "Future Society", "Politics" and "Values", so you could have
> a Planned Cybernetic Fundamendalist Power government if you so wanted.
>
>       It's a nasty hack to the Freeciv code, but it (almost) works.
> _Maybe_ it would benefit from a more modular Freeciv2 rewrite, but I'm a
> diehard C programmer, so couldn't possibly comment on the C++/Java/etc
> debate!

my current design chunk units apart into containers of capability interfaces. 
it's perfectly possible and acceptable to start adding capabilities to a 
unit...

maybe i need to extend that design to allow the addition of arbitrary 
properties like "no armor" where each property can affect a capability. see, 
now this is actually getting interesting :)

a unit is a web of associated capabilties and properties. where capabilities 
have associated parameters and provide interfaces to functionality (e.g. 
build city) and properties define modifiers for or grant capabilities. e.g. 
"Infantry Chassis" gives the capability to move over land. i imagine "Hand 
Weapons" gives some combat/defense modifiers.

question: is there still a fundamental unit type in SMAC?

>       I'm not sure if you really need to do that. When building new
> units, you'd need to iterate through all unit types anyway (to present the
> user with the choice) and all unit instances contain a unit type pointer
> anyway. Looks pretty neat though. ;)

i thought it was pretty neat too. i've been wanting to do something like that 
for a while, but just never thought about it. it can't hurt if you're doing 
an explicity lookup on type information though - and it eliminates the need 
for a global unit type registry :)

andy


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