Some general technical questions and maybe suggestions

Web version of freeciv at play.freeciv.org
User avatar
Corbeau
Elite
Posts: 1073
Joined: Mon Jan 13, 2014 11:13 pm

Some general technical questions and maybe suggestions

Postby Corbeau » Fri Apr 07, 2017 2:27 pm

Hello. I haven't looked into the Freeciv Web until recently and haven't been following its progress. But now it caught my eye and I have a few questions that I didn't find answers to elsewhere.

1. Would it be possible to utilize this to serve as a LongTurn server, meaning, simply allow extending Timeout to 23 hours? I don't know if it would mean a bigger load for the server, it would basically be only one game at a time (maybe two, I find it highly unlikely to be three or more) and definitely not too many people present at the same time.

2. Is it possible to load custom-made rulesets like for "standard" server-client FreeCiv games?

3. Is the isometric tileset the only one available here? I am a fan of oldstyle-square-Civ1 view and I'd go with this one only if I really, really, really have to.

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

Re: Some general technical questions and maybe suggestions

Postby AndreasR » Fri Apr 07, 2017 4:45 pm

Hi Corbeau,

> 1. Would it be possible to utilize this to serve as a LongTurn server, meaning, simply allow extending Timeout to 23 hours?

Freeciv-web supports Play-by-Email, which is also a way to play the game over a longer period of time. New Play-by-Email games can be easily set up by end-users. At the moment there are 24 ongoing play-by-email games. LongTurn games are setup manually by the server-admin. I much prefer when such games can be started automatically by end-users. Do you have any suggestions about how to improve the Play-by-Email support so that it will appeal more to LongTurn players? Alternatively, you could extend the timeout to 23 hours on a regular Freeciv-web multiplayer game also, but remember to save the game regularly.

> 2. Is it possible to load custom-made rulesets like for "standard" server-client FreeCiv games?

If you know of any good rulesets which you would like to be added, then please let me know and I will add it. At the moment 3 rulesets are supported.

> 3. Is the isometric tileset the only one available here? I am a fan of oldstyle-square-Civ1 view and I'd go with this one only if I really, really, really have to.

Freeciv-web supports the 2D isometric Amplio2 tileset and the 3D WebGL version. The source code is on GitHub, so anyone is welcome to contribute a oldstyle-square-Civ1 view.

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

Re: Some general technical questions and maybe suggestions

Postby Corbeau » Sat Apr 08, 2017 12:02 am

Hello and thanks for the really quick answers.

To continue bothering you :)

AndreasR wrote:> 1. Would it be possible to utilize this to serve as a LongTurn server, meaning, simply allow extending Timeout to 23 hours?

Freeciv-web supports Play-by-Email, which is also a way to play the game over a longer period of time. New Play-by-Email games can be easily set up by end-users. At the moment there are 24 ongoing play-by-email games. LongTurn games are setup manually by the server-admin. I much prefer when such games can be started automatically by end-users. Do you have any suggestions about how to improve the Play-by-Email support so that it will appeal more to LongTurn players? Alternatively, you could extend the timeout to 23 hours on a regular Freeciv-web multiplayer game also, but remember to save the game regularly.


Oh, I believe an apology is in order. I was meddling with starting the game, put in "80000" for the timeout and the entry frame turned red so assumed that such large numbers are not supported. Now I realised it is perfectly possible to have 23 hours turn. This is all I needed to know.

(Just one more thing regarding this: is it possible to prevent players to individually change this during the game?)

But another thing I'd be curious about is will the game shut down if there is a multi-hour period with no players being connected and, if yes, is there a way to prevent this?

> 2. Is it possible to load custom-made rulesets like for "standard" server-client FreeCiv games?

If you know of any good rulesets which you would like to be added, then please let me know and I will add it. At the moment 3 rulesets are supported.


Well, people who play LongTurn (and, previously, GreatTurn) used to experiment with rulesets a lot so it happened that each of the few dozen games actually had an individual ruleset. But due to the fact that there were only a few games per year starting, it wasn't a problem. If this happens, I assume it wouldn't be a problem if we make a ruleset, call it GreatTurn001, 002 etc. and send it to you to install it?

> 3. Is the isometric tileset the only one available here? I am a fan of oldstyle-square-Civ1 view and I'd go with this one only if I really, really, really have to.

Freeciv-web supports the 2D isometric Amplio2 tileset and the 3D WebGL version. The source code is on GitHub, so anyone is welcome to contribute a oldstyle-square-Civ1 view.

Ok, this is the least important thing of all and is just my personal preference. Would it be possible simply to grab the non-isometric tileset from the standard FreeCiv and utilize it for the Freeciv-web? Or is this a completely different thing from standard FreeCiv and graphics for this would have to be made from the start?

Also, another question: I see that additional server options can be entered through the command line. Is this the same thing as it is with Civserver? Are all sever starting options available as they are in standard Freeciv? (like setting research speed, restrictinfra, all units dying with defender, starting units etc.)?

In the end, thank you for your time, both for creating this and answering my questions patiently :)

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

Re: Some general technical questions and maybe suggestions

Postby AndreasR » Sat Apr 08, 2017 7:21 am

It could be possible to add support for LongTurn to Freeciv-web. This seems like what you would like? If I add support for LongTurn, then I would fix the issues with users changing timeout and the game ending if there are no players connecting. Do you think I should add support for LongTurn to Freeciv-web? (It already has support for Play-By-Email, which is similar. Looking at the games statistics, it seems that most people want to play single-player games, by a very large majority.

> (Just one more thing regarding this: is it possible to prevent players to individually change this during the game?)

At the moment, timeout can be changed during the game.

> But another thing I'd be curious about is will the game shut down if there is a multi-hour period with no players being connected and, if yes, is there a way to prevent this?

At the monent the game shuts down if there are no connected players for 20 seconds.

> If this happens, I assume it wouldn't be a problem if we make a ruleset, call it GreatTurn001, 002 etc. and send it to you to install it?

Yes, I can add custom rulesets.

> Ok, this is the least important thing of all and is just my personal preference. Would it be possible simply to grab the non-isometric tileset from the standard FreeCiv and utilize it for the Freeciv-web? Or is this a completely different thing from standard FreeCiv and graphics for this would have to be made from the start?

The main job would be to change the JavaScript code to add support for rendering the game in oldstyle-square-Civ1 view. This would mean changing the rendering code of the game.

In my opinion on graphics, the WebGL 3D version is what I would like to focus on improving, as I think it has the most future potential. It is still in early stages.

> Also, another question: I see that additional server options can be entered through the command line. Is this the same thing as it is with Civserver? Are all sever starting options available as they are in standard Freeciv? (like setting research speed, restrictinfra, all units dying with defender, starting units etc.)?

Yes, the command line gives access to the same things as with Civserver. Yes, all the normal server starting options are available there.


Andreas

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

Re: Some general technical questions and maybe suggestions

Postby Corbeau » Sat Apr 08, 2017 8:53 am

Hello.

Basically, there is no "support for LongTurn". There are only few things different from regular games:

1. 23-hour turn (done)
2. Option that only one (or selected few) can change Timeout (for emergencies such as server downtime and possibly holidays)
3. Server lives while nobody is online (including a very long multi-week pre-game while people gather)
4. Customised "rulesets-on-demand"

Absolutely nothing else would be needed.

The non-isometric tileset is my personal preference and, to be perfectly honest, I'm not sure what is it that you actually said there because I'm not a programmer :) If you believe it would be worth doing for causes other than indulging me personally (that is, if it would attract some more people), maybe you could put it on the roster of future features, but if there is no general interest, I'd put a low priority on it.

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

Re: Some general technical questions and maybe suggestions

Postby AndreasR » Sat Apr 08, 2017 10:37 am

I have added support for LongTurn to Freeciv-web. You can find the servers here always running on port 6003. It has all the 4 changes that you requested.

Could you perhaps please organize and start a small LongTurn game on Freeciv-web, so we know if this works?
Let me know if you need further changes!

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

Re: Some general technical questions and maybe suggestions

Postby Corbeau » Sun Apr 09, 2017 4:35 pm

Wow, that was quick! Thank you!

Today I connected, but the server keeps disconecting, but I'm currently on an iPad so it's probably a Safari issue, I'll recheck when I get to a real computer.

Also, one very important thing occured to me yesterday is the start itself. As it is unreasonable to assume that all players will be online at the same time, ANY time, what needs to be done is that all players who selected a nation should be kept in the game, even if they log out (which they definitelly will do) between selecting a nation and the game starting. As it is now, after disconnecting, a player is removed from the game.

One more thing that may be important, but not organic (if not solved, may cause trouble, but the game will still be able to run), is reliability of players. Original Longturn gas a feature that, before the game starts, all players who signed in neet to confirm participation AT LEAST three days AFTER They signed in. This proves a basic level of dedication and filters out those who just stumbled by and are probably not going to return.

Maybe both those things can get solved by using some mechanisms that are in action for PBEM version?

Also, some sidenotes. Please make emphasis in the game info (that people see when they enter) that this is a test game.

Also, a standard Longturn lasts months, not weeks ;)

Maybe I'll have some more comments and requests when I sit at a real computer and get the thing running :)

User avatar
XYZ
Elite
Posts: 369
Joined: Fri Jan 31, 2014 12:00 pm

Re: Some general technical questions and maybe suggestions

Postby XYZ » Sun Apr 09, 2017 5:47 pm

I can only agree with Corbeau. He was rejected every time he tried to connect to my game. Besides that, many thanks for implementing this so quick!

Another question: Is it possible to integrate an "animated" sceario into freecivweb longturn?

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

Re: Some general technical questions and maybe suggestions

Postby AndreasR » Sun Apr 09, 2017 6:15 pm

I have added three changes based on the comments from Corbeau:

- Players who have selected a nation are not removed from the game when they disconnect.
- Joining the LongTurn game requires creating an account on play.freeciv.org. I hope this proves a basic level of dedication.
- Updated the introduction text in pregame.

Please let me know if further changes are required.

> Another question: Is it possible to integrate an "animated" sceario into freecivweb longturn?

Perhaps. Where can I find out more information about this scenario? Does it require a custom tileset also?

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

Re: Some general technical questions and maybe suggestions

Postby Corbeau » Sun Apr 09, 2017 7:39 pm

Thanks! And that's a good point about dedication!

And I'm working on solving the connection problem,


Maybe we should create a thread called LongTurn-Web (LWT). Only question is, which subforum, Longturn of FreeCiv web :)