Postęp game

Various topics about the game, the website, or anything else Freeciv related that doesn't fit elsewhere.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

I will update the wiki on sourceforge.net. You can play it, but only with human and you must start server by hand.
There's no completed ruleset, rather rulesets to test a game.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

To run server & client the same time:

Code: Select all

flatpak run --command=/bin/bash pl.art.lach.slawek.apps.progress
cd /app/bin/
( ./freeciv-gtk-3.22 & ./freeciv-server -r <selected_ruleset> )
In place of <selected_ruleset> put progressCiv5, progress1 or civ2civ3
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

I have small amount of time and decided to implement new feature, allowing to make game more compatible with Civilization 3. If I found more time, the game could reborn!

I partially implemented improvement count restrictions, so you can define improvement class and sign improvement to it. In next step, you can define (for example) that any kind of building bellowing to small wonder could exist only once per player and any great/world wonder could exist only three times on map, but only once per player. In future I will add builtin counters, like max player count, max player count played, current player count, default player count, so you could define equation, thanks to restrictions, like:

Max world count: Default player count / 3
Max player count: 1

I will also add other things to described feature. Source are available now, but for flatpak package you should wait.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

I must repair last error I know to work on other things.

Where AI is initialized after ruleset is loaded? I see server_player_init is called before ruleset is loaded both for AI and human player, but after ruleset is loaded, this function is called only for humans.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

I correct bugs and made one workaround, which allowing to start from freeciv-gtk3.22 game with civ2civ3, progress1 and progressCiv5 rulesets. I push sources, but don't made flatpak yet.

Please test and tell, which features from Civ3 and Civ5 are missing. progressCiv5 implements golden era and civics. Civ2civ3 implement possibility to build Great Wonder up to three players. Each of this mechanism are configurable by ruleset, for example golden era and selecting a new civic after gather some culture points is implemented in ruleset. The same about restrictions allowing to build small wonder infinity count on world, but only once per player. The same about build up three time great wonder, but only once per player.

EDIT: Newest (prealpha-19) version uploaded.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

I change maxumum count of world wonder on map in civ2civ3 ruleset. Formula is: 0 ... Players_at_start / 2 , so each world wonder must exist in range from 0 to number of players at beginning divided by 2. This could made new ruleset to be better fit with multiplayer game.

I must check similar feature is implemented in Civ3. Somebody suggested me it's not implemented. If there's no such feature, I'm still happy, because feature could be useful for other use cases. I will change way how effects works. Instead offering constant value, it will have a restrictor and a probability function. Restrictor could define warrior took hp in range 1 .. 5 and use some prob function.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

I have one question. I don't know much about programming pattern's and don't look deep inside Freeciv source code.

I need to create function detects restrictor should been calculated on server. Once this function returns ture, we send message to server and must wait for response, but I need also don't block other messages (not only network, but gui too) on client-side. Can I send request to calculate data on server and call main loop of client in next step? When client obtain response, it simple ends main loop created to obtain that message.

EDIT: I see that it isn't provided by gtk-3.22 client. There's call to gtk_main inside some client initialization function and two call to gtk_main_iteration inside some co-routines, but I cannot order to enter main loop and exit on some flag/event without do other stuff, so I will add new client API.
zeko
Posts: 12
Joined: Wed Oct 03, 2018 6:36 pm

Re: Postęp game

Post by zeko »

Could you clarify what you want to calculate?
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

Restriction (I called it restrictor, sorry) is progress mechanism of restrict multiplier or other. It can be used to tell game engine that (for example) tax + science + luxury must be equal 100 in democracy, but in all government it must be in range 40 ... 110. You could activate additional restrictions, so you can told in communism it must be in range 30 ... 70, so game will calculate it must be between 40 ... 70 .

Sometimes client don't known everything needed to perform calculation, so it need to send request to server. Server sets global counters (variables) like player amount on the map, etc. Client don't known how many player exist on the map. Player amount are needed to calculate maximum count of each building, which is great wonder. I divide players_at_start by 2. If game starts with 7 players, first three players could build Pyramids, but only once.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Postęp game

Post by Lachu »

Because Progress have a memory troubles, I decided to rewrite code to some higher languages. Yes - I'm bad and I suggested you to do the same, because I thought I will have less work ;-) .

I have first problem. Where DEFAULT_SOCK_PORT, MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION definitions are placed?

Ok. It's in gen_header/fc_config.h
Post Reply