The big Freeciv-web feedback and suggestions thread

Web version of freeciv. Please mention the site you're using, if speaking things other than general freeciv-web codebase.
cazfi
Elite
Posts: 3095
Joined: Tue Jan 29, 2013 6:54 pm

Re: The big Freeciv-web feedback and suggestions thread

Post by cazfi »

uruiamme wrote:[*]In other words, without the server connection, there appears to be no way to save a game. Can you remove this server dependency, which will also move the game toward being able to do autosaves?[/list]
Well, it's the freeciv server that saves its state, not the client that knows only one player's view of the entire game.
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: The big Freeciv-web feedback and suggestions thread

Post by AndreasR »

cazfi wrote:
uruiamme wrote:[*]In other words, without the server connection, there appears to be no way to save a game. Can you remove this server dependency, which will also move the game toward being able to do autosaves?[/list]
Well, it's the freeciv server that saves its state, not the client that knows only one player's view of the entire game.
In Freeciv-web, savegames are stored in the client's web-browser using HTML5 local storage. The savegame is created by the Freeciv C server as normal, then transferred to the client using HTTP, and stored using HTML5 local storage in the client's web-browser using Javascript. Loading games is done by transferring the savegame from the client's web-browser to the server using HTTP, and then loaded by the Freeciv C server.
This way, savegames can be stored at each user, and not require any disk-space on the server. Storing the savegames in the client's web-browser allows saving a lot more savegames, since the server's disk-space is limited. Security is kept by storing a hash of the savegame in a database.

Anyway, the new savegame system is now in production, please give it a try and report any bugs!

Andreas
uruiamme
Posts: 32
Joined: Sun Mar 01, 2015 6:05 am

Re: The big Freeciv-web feedback and suggestions thread

Post by uruiamme »

So when a disconnected player comes back online, is there a way to inform the server that the client wishes to reconnect and continue the game, or save it? Like a save-me mode where the client connects to the server with a special request based on its knowledge of a secure token for a game that was recently lost?
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: The big Freeciv-web feedback and suggestions thread

Post by AndreasR »

uruiamme wrote:So when a disconnected player comes back online, is there a way to inform the server that the client wishes to reconnect and continue the game, or save it? Like a save-me mode where the client connects to the server with a special request based on its knowledge of a secure token for a game that was recently lost?
I understand the need for this, however, it is quite complex to implement. Currently, once the connection between the client and server is lost, then the server will restart.
(I'm not sure the server has resources (disk-space, CPU, bandwidth) to autosave each turn. Perhaps an auto-save when the server quits would be a possibility.)
Anyone got any suggestions for this?

Anyway, uruiamme, what do you think of the new savegame implementation?
What is the most important thing you think I should improve in the game now? Still savegame-related, or something else?

Andreas
uruiamme
Posts: 32
Joined: Sun Mar 01, 2015 6:05 am

Re: The big Freeciv-web feedback and suggestions thread

Post by uruiamme »

AndreasR wrote:
uruiamme wrote:So when a disconnected player comes back online, is there a way to inform the server that the client wishes to reconnect and continue the game, or save it? Like a save-me mode where the client connects to the server with a special request based on its knowledge of a secure token for a game that was recently lost?
I understand the need for this, however, it is quite complex to implement. Currently, once the connection between the client and server is lost, then the server will restart.
(I'm not sure the server has resources (disk-space, CPU, bandwidth) to autosave each turn. Perhaps an auto-save when the server quits would be a possibility.)
Anyone got any suggestions for this?
While on this topic, I just wanted to say that the same situation still arises... I got disconnected from the server somehow and lost a few moves. But I was still able to "save" the game... with the wrong date... the same old version of the game that I had saved an hour before. And it still appears that the game was saved because it says it did. It's a bit embarrassing to have the wrong date on the savefile and to not throw some kind of error. Perhaps the error message itself can spell out the doom:

LOST CONNECTION TO SERVER. YOUR GAME STATE IS LOST, so you will need to End Game, browse to https://play.freeciv.org/ and then click refresh to bring up your previous saved games.

And as you said, there is a possibility to do this autosave when the server closes its connection. The token will have been previously sent to all clients when the most recent autosave was produced. As a side note, is there a way to just store the changes since a previous state, sort of like a diff file? Would that use less space or resources?

My workaround would be for the gamestate to be held in a small file that gets rewritten every turn. If there is a server disconnection, the above message could instead say this:

LOST CONNECTION TO SERVER. A RECENT VERSION OF YOUR GAME STATE MAY BE FOUND BY VISITING THIS LINK, https://play.freeciv.org/tempoary-saveg ... 5m4F178.xf and then save file to disk. THIS FILE WILL ONLY BE AVAILABLE FOR A LIMITED TIME (less than 24 hours). You will need to End Game before saving this file. Visit https://play.freeciv.org/ to play again!
uruiamme
Posts: 32
Joined: Sun Mar 01, 2015 6:05 am

Suggested fixes!

Post by uruiamme »

Same numbering, probably in my order of the most needed improvements (See other posts for minor ones):

#4 I see no command for No Orders like on Android. I keep trying to type "N" to do this. Ideally, a unit told "No orders" will be active on the NEXT TURN. The question is what happens to units on a City Tile, for example helicopters. Helicopters won't "Fortify" so I usually try "S" for Sentry inside a city or airbase. This needs to be fixed.

#3 The (W)ait command seems to be broken. When I type W, the unit focus will never return to the unit that is waiting. It is essentially the same as the No Orders command that I used on the Android version of Freeciv. This means that I will often forget to move a boat that is full of units, for example, since I will normally wait the unit until land units have loaded or unloaded. (This problem and #2 combine to make the game difficult to keep track of where the action is.)

#2 The focus on the active unit doesn't follow a reasonable order. Can we make the unit selected move around in some predictable, geographic way, like north-to-south, west-to-east, or maybe have a configuration setting? Perhaps there could be an order like Settlers, Workers, Caravans, Military Land units, followed by Boats and Airplanes last. Another possibility is to use the geographic distance from the home city. Any of these will hopefully alleviate the problem in which a battling military unit will be followed by a Worker unit on a different land mass.

There is also a bug I need to report along with #2. When a Settler Builds a city or a Caravan/Freight delivers goods, this unit disappears. The next active unit is not selected. The settler/caravan is still listed in the Units window. Same when a unit has traveled a long way and ends up with 0 Movement, but for some reason the unit remains highlighted instead of the next unit. There are many times in which this bug stops the automatic selection of the next unit who has movement points, and so I end my turn and forget to move some.

To work around the bug, I will select a random unit with 0 movement left and type "W" to wait. (Which should be "No Orders") The next unit that needs to move will now cycle to active status.

A similar bug happens when an Engineer is told to "Auto improve" on top of a city square. The unit will stay inside the city and I think do nothing.

#15 When a transport ship is focused, or whenever multiple units are on the same square, can all units be listed in the Units window? I constantly have to check this out. And when I do, the focus is lost either by going to the next active unit or to centered on the Home City like I mentioned above. The stack of units interface is hard to figure out because of the way the second half of the selection happens in the Units window. I sort of wish the "master" unit would be listed first (transport,carrier) if it is there, followed by its subordinate units.

#10 City title. Can we make the City title more or less transparent? I can't see the tiles behind the city name box. Maybe something like the Caps Lock key or "C" key can make the city name box transparent.

#1 Savegames are a lot better. I would now put the "network crash" issue here and ask for autosave functions. (See previous discussion).

Bug report 1a: The mouseover bubble for "Download" actually says "Delete the oldest Savegame". (Ooops!) This is in the Save Game menu while a game is active.

Bug report 1b: The "Upload" did not work with the file I downloaded. I think you may have a MIME type mismatch for the "Download" command. I think it is because the file was saved as a "xxxx.js.txt" file by my browser and the server expects a MIME type of Javascripy and not text. Here is the error:

Code: Select all

Savegame file freecivweb-xxxxxxxx_ 3150BCE (T17).js.txt not supported: text/plain
But I did save some things to local disk. Yea!!! THANKS!!! :D And by renaming the file to xxxxxx.js (without .txt) the upload kind of works. ;) Also, I sort of expected a button to say "Delete savegame" and for it to just delete the one I selected to delete. (So if I selected #43, it would delete just that one.) But great progress!!! :geek: :!:

Bug report 1c: The "Load savegame" menu item should not be on the screen if there is an active game. It does not work. I am pretty sure I have to end the game first and go back to the beginning. You may need to remove this menu item from the "savegame" menu.

#13 Ship "Goto" is erratic. I noticed that the Goto code for a Frigate looked like the code for a Trireme. It was trying to skirt around the deep water instead of using a direct path. There are other cases where not all of the roads are used properly. The "number of turns" is not always correct. Sometimes it will miscalculate with railroads and say 15 turns for 0. Other times it says 0 turns and it will take 2 or 3.

Another thing about Goto: There are a lot of times a unit will be accidentally told to "goto" and the player needs to escape out of this. Please make the "Esc" key cancel an attempt to "Goto." Currently, the only way to cancel this is to find the unit (which may not be on the map being shown but very far away) and click in the center of the unit. You could even have a small notice at the bottom to "Hit Escape to cancel Goto Command"

Also, the Goto command gets very erratic with a lot of units on the screen. If I type "G" to goto, then I right-click around the map to scroll sideways or down, I often accidentally activate a random unit. Can this potential be eliminated by not permitting a new unit to be activated until GOTO command is complete? Thanks!

#16 Can the Change Production screen be changed? I would like to see this menu accessible on the City tab directly rather than a sub menu. Also, the list of possible units/buildings to be built is very unwieldy, especially after a lot of things are available you have to scroll a lot. How about using a smaller font size, too, and instead of items to click a "add to list" can we have a Checkbox or numerical field? See previous discussion on P1 of this thread.

17.The UPGRADE command has no interface box to ask me to confirm an upgrade. If I have enough money, the upgrade is immediate and without being able to undo it.

#9 The quick "Undo command" or the "confirmation" command for when a person moves a unit in error. (See previous discussion) There could be a "confirmation" option in which units are moved with two keystrokes or the intended attack target or landing target is flashed or circled in red.

#14 Automatic workers seem to be a bit unruly. There needs to be some kind of tweaking ability to help concentrate their efforts, whether I want lots of irrigating or roads/railroads. They need to understand how close to a city to work, also. Can there be a master setting for all Automatic workers as to what percentage cleans/waters/roads things? I'd ask that they be given a target geographic area also, but I think that would involve a lot of coding.

#21 (NEW). Bug Report. I attacked a city owned by an AI who used a lot of AEGIS cruisers for defense. I sent in a spy and she sabotaged the one that was being produced. She then investigated the city and I got to see that a Cruiser was there. I later conquered that city with some howitzers on the same turn probably. I entered the city, and it was a mixture for a little while. First off, the single "star" representing a defended city got mixed up. It displayed a small one like a Home city. Then, after conquering it, it became almost impossible to select the city because when I did, an ENEMY AEGIS CRUISER would be shown instead of the city screen. When I did finally enter the city screen from another city by clicking "Next City"... there was the opponent's cruiser next to two of my guys!!

#22 (NEW). Unit Window problems: There are numerous times in which this window has stale information, and isn't the correct unit that is active. I am thinking that when more than two transport ships or two carriers are on the same tile, there is probably no way to see whose units belong to which ship. And with more than 9 units on a square, I don't think I could select the ones I want because the Unit window seems to be maxed out. So if I need Unit 7 from the second Transport, I think it would appear off the screen and that window can't be enlarged to display more than 9.

#23 (NEW). The Paradrop is hard to make work. Can you highlight the distance possible when Paradrop is attempted? Counting squares is not fun. The same routine used for GOTO should be able to count squares, by the way and maybe show a green line instead of red. And can the "Escape key" method work like it should for GOTO if you wanted to just test the Paradrop distance?

#24 (NEW). Why is it when I am at the beginning of a new turn, and I start looking at city tabs, very often there is a newly produced unit in the city, or one that landed there with 0 turns. I am constantly activating this unit instead of looking at the city's production screen. So now I have to right click this city to bring up another menu, and left click View City. This happens a half dozen times per turn in a big empire!
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: The big Freeciv-web feedback and suggestions thread

Post by AndreasR »

Thanks for the huge list of improvement suggestions, uruiamme.
I'll start with item #4. I hope that some of the other Freeciv developers
would like to help with these improvements.
uruiamme
Posts: 32
Joined: Sun Mar 01, 2015 6:05 am

Re: The big Freeciv-web feedback and suggestions thread

Post by uruiamme »

#25. This was Tassilo's number 24 from last year. See: http://forum.freeciv.org/f/viewtopic.ph ... t=10#p1704
There's no list of units supported in the city dialog. I have no way of knowing how much the city is spending in shields and food in support of its units. This is very true and extremely difficult to figure out for a large empire... who the units are and where they are. A new user will likely not know to change a unit's Homecity unless he understands this aspect of the calculation of a city's health and economy and happiness. The tutorial could cover this aspect at some point, too. A lot of users wouldn't understand what difference it makes where a unit comes from.
cazfi
Elite
Posts: 3095
Joined: Tue Jan 29, 2013 6:54 pm

Re: The big Freeciv-web feedback and suggestions thread

Post by cazfi »

uruiamme wrote:I thought bzip2 used to be one of the best compression routines.. or maybe 10 years ago it was.
Now bzip2 is getting obsolete. Xz provides superior compression ratio with same or even slightly faster execution.
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Suggested fixes!

Post by AndreasR »

uruiamme wrote:Same numbering, probably in my order of the most needed improvements (See other posts for minor ones):

#4 I see no command for No Orders like on Android. I keep trying to type "N" to do this. Ideally, a unit told "No orders" will be active on the NEXT TURN. The question is what happens to units on a City Tile, for example helicopters. Helicopters won't "Fortify" so I usually try "S" for Sentry inside a city or airbase. This needs to be fixed.

#3 The (W)ait command seems to be broken. When I type W, the unit focus will never return to the unit that is waiting. It is essentially the same as the No Orders command that I used on the Android version of Freeciv. This means that I will often forget to move a boat that is full of units, for example, since I will normally wait the unit until land units have loaded or unloaded. (This problem and #2 combine to make the game difficult to keep track of where the action is.)

#2 The focus on the active unit doesn't follow a reasonable order. Can we make the unit selected move around in some predictable, geographic way, like north-to-south, west-to-east, or maybe have a configuration setting? Perhaps there could be an order like Settlers, Workers, Caravans, Military Land units, followed by Boats and Airplanes last. Another possibility is to use the geographic distance from the home city. Any of these will hopefully alleviate the problem in which a battling military unit will be followed by a Worker unit on a different land mass.

There is also a bug I need to report along with #2. When a Settler Builds a city or a Caravan/Freight delivers goods, this unit disappears. The next active unit is not selected.

[...]

Bug report 1c: The "Load savegame" menu item should not be on the screen if there is an active game. It does not work. I am pretty sure I have to end the game first and go back to the beginning. You may need to remove this menu item from the "savegame" menu.


I have now fixed these bugs and pushed the changes to the production server. Can you please test it, and confirm that they have been fixed?
Post Reply