From: Artūras Šlajus on
Another idea my friend suggested was to only calculate actual values
when requested.

So instead of recalculating all the resource entries each minute only
recalc those, which are requested (and that is not very often).

It sounds pretty reasonable for me.

The only thing being on_complete callbacks for units, technologies and
buildings.
--
Posted via http://www.ruby-forum.com/.

From: Eleanor McHugh on
On 3 Feb 2010, at 17:18, Artūras Šlajus wrote:
> Another idea my friend suggested was to only calculate actual values
> when requested.
>
> So instead of recalculating all the resource entries each minute only
> recalc those, which are requested (and that is not very often).
>
> It sounds pretty reasonable for me.
>
> The only thing being on_complete callbacks for units, technologies and
> buildings.

You can calculate when actions start the ETA for completion and then have a timed queue which check their completion at that point in time and then reschedule if necessary. These kinds of scheduling systems have all kinds of applicability elsewhere as well.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
http://www.linkedin.com/in/eleanormchugh