LongTurn Game 2 for Freeciv-web

Planning and discussing Freeciv Longturn gaming
User avatar
AndreasR
Elite
Posts: 655
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

LongTurn Game 2 for Freeciv-web

Postby AndreasR » Fri Apr 28, 2017 5:14 pm

LongTurn game number 2 of Freeciv-web has started and you can join it now!

- The game has a maximum of 250 human players, so this will be a very large LongTurn game.
- The map size is huge: 30 000 tiles.

Join LongTurn game 2 here!

cazfi
Elite
Posts: 1292
Joined: Tue Jan 29, 2013 6:54 pm

Re: LongTurn Game 2 for Freeciv-web

Postby cazfi » Fri Apr 28, 2017 5:45 pm

250 playermaps of 30000 tile map. That game is going to use A LOT of memory in the later phases when there's a lot of cities and units.

User avatar
AndreasR
Elite
Posts: 655
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: LongTurn Game 2 for Freeciv-web

Postby AndreasR » Fri Apr 28, 2017 6:13 pm

cazfi wrote:250 playermaps of 30000 tile map. That game is going to use A LOT of memory in the later phases when there's a lot of cities and units.


True. There is great interest from the players for this type of game: longturn with many players on a large map. I think Freeciv-web could easily have enough user-demand to fill a game with 1000 players and 10k tiles. I hope you see that this is interesting and innovative, and perhaps help optimize some things in the Freeciv server that we discover during this LongTurn game.

cazfi
Elite
Posts: 1292
Joined: Tue Jan 29, 2013 6:54 pm

Re: LongTurn Game 2 for Freeciv-web

Postby cazfi » Fri Apr 28, 2017 6:43 pm

Have you thought the memory requirements at all before starting this game? It would be rather annoying that after playing 200 days you suddenly find out that the server cannot handle the game any more.

The reason maximum number of players has not been increased from 150 in regular freeciv is that it should protect people from starting games that will take more memory in later turns than is feasible to assume any freeciv running server machine to have. I don't have figures handy, but I remember considering 64GB (worst case memory usage) absolute maximum anyone would want to use for a single server instance at this time.

cazfi
Elite
Posts: 1292
Joined: Tue Jan 29, 2013 6:54 pm

Re: LongTurn Game 2 for Freeciv-web

Postby cazfi » Fri Apr 28, 2017 6:49 pm

For some reference about CPU and memory requiremens in later game you can try Europe_1901 scenario of 21 players and 17700 tiles.

User avatar
AndreasR
Elite
Posts: 655
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: LongTurn Game 2 for Freeciv-web

Postby AndreasR » Fri Apr 28, 2017 7:46 pm

LongTurn games in Freeciv-web has been requested by end-users multiple times. MMO games are also very popular. This latest LongTurn server is also filling up very quickly. So this is something that the end-users wants, that is the starting-point.

I'm not worried about CPU or memory usage, and if any arise then I will deal with them in a very good and positive way. I am monitoring both CPU and memory usage on the server. I could for example introduce restrictions on the number of units and cities in this game, if required. Based on my experience this will be just fine.

Also, Freeciv-web already runs a large number of concurrent Freeciv games on the same server, where each Freeciv server has just one or a few human players. One could argue that it is more resource efficient to run one very large LongTurn server with multiple human players, instead of multiple single-player games with AI players. The LongTurn server has no AI players, and the AI typically uses a lot of CPU and memory.

User avatar
Corbeau
Elite
Posts: 508
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn Game 2 for Freeciv-web

Postby Corbeau » Fri Apr 28, 2017 9:02 pm

Andreas, I think you are overdoing it :)

AndreasR wrote:I think Freeciv-web could easily have enough user-demand to fill a game with 1000 players and 10k tiles

I'm not sure why you think so. I just re-checked the first test game, the one with 150 players. True, it seems today (Turn 6) the last AI was taken over by live plaers. However, out of those 150 people, 44 never logged in after they signed up and only 64 have been active on the last turn. I'd say that having a game with 250 players may be good for testing purposes, to see how many will persist, but not much more. I said it in another post, but it seems it has been ignored.

Also, I said some other things so I'll quote myself here.

First, the map is (still) too small. That's 120 tiles per player, including water. One city occupies 21 tiles. Is 6 cities per player (or less) an interesting game? (Unless you really want to stimulate all-out carnage?) Keep in mind that this is LongTurn, players have a whole day to make their move, if an empire remains small, it doesn't really get more interesting, you do your moves in half a minute and you're done for the day. No or very little sense of growth.

It is also irrelevant whether there are 50 or 500 players with this kind of map. You are limited to, say, six immediate neighbours and the world further away has no significance. With so little water the map is monotonous and may as well be all land. You are confined to your small area and have no way of discovering what is happening outside of your event horizon; you could send explorers over other people's territory, if they let you, but little else.

Yes, I understand you increased water from 15% to 21%, but that is still way too small to utilise sea travel; with this ratio, the "oceans" are still just a bunch of lakes. No real exploration. You can't send a ship on a voyage of discovery and make contact with someone who is not your immediate neighbour.

Keep in mind that a human being can't really grasp too large groups of people Like I said, six, maximum ten immediate neighbours, and after that the stuff gets overwhelming. The last GreatTurn game had 50 players and nobody CARED what is happening outside of his 10 closest and next-to-closest neighbours. Don't get me wrong, I'm not saying that games should have 10-20 players. It's good to have a feeling that *something* is happening beyond your event horizon. But I think that anything beyond 100 players is an unnecessary overkill.

...

All that said, I have one variant about how this may come out good. If there are 250 nations, judging by the current numbers, only 40% or less of them remain active and swallow the rest without resistance. That would mean an increase from 120 tiles per player to at least 300 before any serious conflict, which is a bit more acceptable. But this is why it would be good to hear from you where you are going with all this. Do you really want to run games with hundreds of players or is this just some testing to check server limits.

But still, there must me much more seas. I repeated many times, 50% would be a minimum, 35% preferable. Simply, if Civ is a historic simulation, unless there is an experimental setting with specific stuff, the map should mimic historic circumstances. Also, more water and continental map setup gives more diversity to the game; fractals and low water make everything look the same.

About memory load, I may have an idea for a solution. Since this is LongTurn and not a fast-paced game, not everything needs to be loaded into memory at the same time. Only those people who are currently online need direct access. Everything else can be saved on disk and called when particular players get online (and saved to disk and wiped form memory when they get offilne). Yes, this may mean a slightly bigger load at Turn Change, but still far from 100%.

cazfi
Elite
Posts: 1292
Joined: Tue Jan 29, 2013 6:54 pm

Re: LongTurn Game 2 for Freeciv-web

Postby cazfi » Fri Apr 28, 2017 9:43 pm

AndreasR wrote:One could argue that it is more resource efficient to run one very large LongTurn server with multiple human players, instead of multiple single-player games with AI players.

I wouldn't be so sure about that. Some things are n*n (player vs player relations)
AndreasR wrote:The LongTurn server has no AI players, and the AI typically uses a lot of CPU and memory.

True for CPU, but AI adds very little memory usage to what is needed for player of any kind.

cazfi
Elite
Posts: 1292
Joined: Tue Jan 29, 2013 6:54 pm

Re: LongTurn Game 2 for Freeciv-web

Postby cazfi » Fri Apr 28, 2017 10:23 pm

For the record, I took out some structure sizes from freeciv trunk:

Tile: 96 bytes -> 30000 tiles take 2.9 MB
Plrtile: 72 bytes -> 30000 tiles on plrmap of 250 players take 540 MB
City: 2392 bytes -> 30000 / 20 cities on plrmap of 250 players + on 1 real map take 900.6 MB
Unit: 328 bytes -> 30000 * 1 units take 9.8 MB
Diplstate: 28 bytes -> 250 * 250 players take 1.8 MB

So, yeah, server shouldn't take more than a couple of gigabytes at worst.

User avatar
AndreasR
Elite
Posts: 655
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: LongTurn Game 2 for Freeciv-web

Postby AndreasR » Wed May 10, 2017 4:31 pm

The current LongTurn game with 250 players currently uses only 1260MB of memory (RES in htop), after the memory leaks have been fixed, thanks to Sveinung. This is with a map size 30 in turn 13. This is very good news, and probably means that we could increase the map size a little more in the next LongTurn game.