longturn / freeciv21

Develop your civilization from humble roots to a global empire
GNU General Public License v3.0
223 stars 42 forks source link

Make client use server-side city governor #1863

Open daavko opened 1 year ago

daavko commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, the client doesn't use the server-side city governor at all. This should be changed so it does. The server-side governor appears to do the exact same thing as the client-side one (both use shared features from common/aicore/cm.cpp). Additionally the server-side one runs even if the client isn't connected, and can run during TC in cases where the city changes size instead of the default one, which would open up more possibilities in city management (for example, not making the city uselessly take +16 food when it needs 20 to grow, wasting most of it).

Describe the solution you'd like Make the client use the server-side governor everywhere where it currently uses the client-side one.

Describe alternatives you've considered Leaving it as-is

Additional context Looks like mainline Freeciv recently had some changes regarding how the server-side governor is activated, maybe those should be ported as well? I don't really understand why they removed one way of toggling it and added another one, since both seem to do the same thing. https://osdn.net/projects/freeciv/ticket/43752 https://osdn.net/projects/freeciv/ticket/45485

jwrober commented 1 year ago

@lmoureaux Does this require a change to the network protocol?

lmoureaux commented 1 year ago

I don't know yet

lmoureaux commented 1 year ago

This would have serious performance implications since the governor can be extremely slow with Longturn rulesets