=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 04 January 2003 13:12, Stefan B=F6ttner wrote:
> Hello,
> the rendered world looks very nice now, except for some missing graphics.
Yep :)
> So I thought it would be a good idea to have a look at the building and
> economy code, which seems to be fairly complex already although it is not
> possible yet to construct new buildings. Thus I wonder how construction
> of buildings is planned, especially from an OO point of view. Is a
> building that is being constructed still a building instance, or will a
> separate class be used and the object replaced when construction is
> finished?
It's probably best to use a separate class, as this should make the logic=20
simpler (we won't need dozens of if (isbuilding) branches).
We need a separate building_ui class for construction sites anyway, so this=
=20
makes sense.
> How is a construction site going to be initiated by the player? As far as
> I've seen there's nothing in the menus yet. Btw, how about some
> distinguishable menu icons here? No need for real graphics yet, but maybe
> some textual abbreviations...
The UI part of it goes into fieldaction.cc (first of all, it would be good=
=20
if FieldAction supported tabs like their S2 counterparts). The logic behind=
=20
it should be similar to the one for building a flag. This needs new player=
=20
commands for building and demolishing buildings (see cmd_queue.cc among=20
others) which is sent from the FieldAction code and handled by the Player=20
class. The cmd_queue indirection is there to (hopefully) simplify=20
networking once we're going to tackle it.
You're right about the icons obviously ;) We used to have simple text on=20
those buttons but changed it to gfx so that they could be replaced more=20
easily.
I'm not sure whether somebody has actually created proper icons. If so,=20
could they please speak up?
> Furthermore I see that ware transport is not yet implemented. Workers
> that are requested as carriers turn into fugitives right after their
> arrival. How is progress planned here?
I think the economy needs to be developed in the following (rough) steps:
1. Fully implement the Carrier so that they actually stay on a road and=20
don't turn into fugitives (watch out for events such as a road split when a=
=20
flag is placed in the middle of a road).
2. Implement building sites (so that we have an object that can actually=20
request wares).
3. Implement wares travel. Note that the request code should already be=20
almost up to the task (it's a matter of some additions to the Request class=
=20
=2D - basically duplicate what's there for Workers so that it works for War=
es).
However, it will be necessary to write all the code that makes the wares=20
actually move around, i.e. Flags must be able to hold wares, Carriers need=
=20
to pick them up and walk along the road etc...
Note: Workers can already carry a ware (kind of, it's not fully=20
implemented). Carriers mainly need the code to move along the Road, and the=
=20
Road needs code to trigger the Carrier movement.
cu,
Nicolai
> Thanks for your information,
> Stefan
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+FuR+sxPozBga0lwRAjxXAKDDAbHmEhLKBTVnj5bPdPiGZUWQIwCeKf1/
tkfprsmQNz3uIA0rf51mjFk=3D
=3DH90j
=2D----END PGP SIGNATURE-----
|