glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[glob2-devel] Ideas and rewrite


From: Stéphane Magnenat
Subject: [glob2-devel] Ideas and rewrite
Date: Fri, 11 Nov 2005 15:43:16 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Hi,

I'm very happy to see discussions about improvements in glob2's architecture, and I thank every participant to those discussions.

I would like to suggest that the generalisation/theming/scripting aspect should be taken more into account in the discussions. For instance, now that we have a nice streaming interface, we could probably, based on this interface, have a way to access glob2's GOM (Game Object Model) which would be an inline, C++ accessed version of the game structure text dump. Unfortunatly it is not that much trivial, because dumping the whole game state through a filter would be quite slow. We could neither simple store pointers to objects, because between two calls objects could have died.

But perhaps we can either add support for such features to streams or we can have helper that can returns properties of specific objects, such as globules and buildings. Imagine the following scripting features (Table is a property (name => value) table in the scripting language (C++ in this example ;-))):

unsigned getTeamsCount(void)
unsigned getUnitsCount(unsigned team)
Table getUnit(unsigned team, unsigned unit)
unsigned getBuildingCount(unsigned team)
Table getBuilding(unsigned team, unsigned building)

This is quite easy and straightforward to implement with a custom stream that create the property table from the save() method in units and buildings.

I'm really convinced that documenting, cleaning, adding generalisation and scripting all go in the same good direction. This was just a quick insight into this feeling ;-)

Have a nice week-end,

Steph




reply via email to

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