Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] server feedback loop (was: [PATCH] Unit movement)
Home

[Freeciv-Dev] server feedback loop (was: [PATCH] Unit movement)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Development List <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] server feedback loop (was: [PATCH] Unit movement)
From: Brian Olson <locke@xxxxxxx>
Date: Wed, 17 Jan 2001 01:18:41 -0500

Perhaps something like the C library select() call would work well.

Treat units as files or sockets with tiny buffers. when unit_select() returns a 
list of units ready to receive a command, the AI gives each unit one command 
(move by one position, or whatever else including larger goto's) and then calls 
unit_select() again. A unit is returned as commandable when it has movement 
points left and the server has gotten back with an update about it. I suppose 
all units not engaged at the time are select()able at the beginning of a turn.

This may require that for every action, the server has a corresponding 
reaction. ACK!

How unlike the current focus code is this? Could unit_select() or the current 
focus code benefit from each other?

[insert clever signoff here]
Brian Olson http://bolson.org/


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