Page 9 of 9

Re: Postęp game

Posted: Wed Nov 07, 2018 2:11 pm
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.

Re: Postęp game

Posted: Wed Nov 07, 2018 5:04 pm
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

Re: Postęp game

Posted: Wed May 01, 2019 12:07 pm
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.

Re: Postęp game

Posted: Thu May 02, 2019 6:18 pm
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.

Re: Postęp game

Posted: Fri May 03, 2019 1:14 pm
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.

Re: Postęp game

Posted: Thu Jul 18, 2019 6:44 pm
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.

Re: Postęp game

Posted: Fri Jul 19, 2019 11:06 am
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.

Re: Postęp game

Posted: Fri Jul 19, 2019 6:47 pm
by zeko
Could you clarify what you want to calculate?

Re: Postęp game

Posted: Sat Jul 20, 2019 9:12 am
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.

Re: Postęp game

Posted: Sat Oct 05, 2019 5:46 pm
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