OpenPerpetuum / PerpetuumServer

The Open Perpetuum Project's fork of the Perpetuum Standalone Server
https://openperpetuum.com
Other
44 stars 21 forks source link

Planthandler: make plant regeneration speed independent of zone size #304

Closed MikeJeffers closed 3 years ago

MikeJeffers commented 3 years ago

As it stands, the planthandler runs a process that updates a 32x32 grid one at a time with a 7-second delay. For a 2048x2048 island this works out to be about 8-hours for a full pass (as alluded to on the game guide).

However, smaller zones then update at a faster rate because the grid (NatureCube) is the same size with the same delay.

Important note, the size of the NatureCube is important not to change because it checks certain parameters that are not normalized (ie. dependent on number of tiles considered).

An easy fix would be to compute a delay that would achieve a full zone pass at roughly the same rate as larger zones. But might be worth also thinking about having an adjustable parameter per zone to allow this to be customizable per zone.

MikeJeffers commented 3 years ago

link to the static 7-second delay https://github.com/OpenPerpetuum/PerpetuumServer/blob/Development/src/Perpetuum/Zones/Terrains/Materials/Plants/PlantHandler.cs#L26

MikeJeffers commented 3 years ago

Closed by @jeffmaley on https://github.com/OpenPerpetuum/PerpetuumServer/pull/400