News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Server listing shows Server Name text (server.example.com:13354)

Started by Ashley, March 04, 2012, 02:29:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ashley

This is a quick patch which changes the server listing dialog to show both the name of the server and its dns name/IP address connection info.

First of a few tweaks to this dialog I'm going to make patches for :)
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Ashley

Further work on this, I've changed the layout of the server list dialog. I think I'll try moving the minimap to the left of the text as well.

Edit: Patch attached, also a screenshot of the minimap at the left. I think with a few more layout tweaks this will look pretty good.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Ashley

Think I've perfected the layout...
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

What is your motivation for of a list instead of the combo box? Most similar actions (like create new lines) use boxes for this purpose. (Especially since almost nobody will add his/her own server here. It is easier just directly type "net:abc.com" in the load game dialoge or use commandline is such cases ...)

And the location of the month/year is strange: This is not changing per server, but is integral part of the map and may even change between queries. Imho this belong below the seperator.

Mainimap left was my initial design, but then text got longer and longer ... Maybe this dialog must be resizable too.

Finally, since the serverlist has an idea, which server are not online, could it color the entires in show_all with the color red for offline servers?

Ashley

Quote from: prissi on March 04, 2012, 09:52:54 PM
What is your motivation for of a list instead of the combo box? Most similar actions (like create new lines) use boxes for this purpose. (Especially since almost nobody will add his/her own server here. It is easier just directly type "net:abc.com" in the load game dialoge or use commandline is such cases ...)

I think it looks better, and I think it is a much more intuitive interface for the novice player. It also reduces the number of clicks one has to make in order to join a server (the drop-down requires one click to open, then another to select). It also shows off the available servers, and is IMO a less cluttered UI.

Quote from: prissi on March 04, 2012, 09:52:54 PM
And the location of the month/year is strange: This is not changing per server, but is integral part of the map and may even change between queries. Imho this belong below the seperator.

I think you're right, I'll move it.

Quote from: prissi on March 04, 2012, 09:52:54 PM
Finally, since the serverlist has an idea, which server are not online, could it color the entires in show_all with the color red for offline servers?

Easy to do, will need another parameter in the CSV data for online/offline and then set the colour to red automatically. I'll add this.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Ashley

Moved the date, also implemented colouring based on online/offline status.

I am considering having two checkboxes, "Show incompatible" and "Show offline", the default would be both unchecked, and you can check either one to display servers you can't connect to.

I've also made it so that when you enter a server in the "Add server" text entry box, and then either hit return or click on the "add server" button it will add the server to the list, but also immediately do a gameinfo query on it.

I think it might be better for it not to get added to the listing, and for the "add server" button to be "manual connect" or something similar. Then you have the option of either using the server listing, or entering a server address manually. The game can remember whatever you enter in the box to make reconnection easy. Entering the address, hitting enter/clicking the button, and then clicking on "play online" would connect you to your manually specified server.

(I think manual servers are definitely useful for players who want to play Simutrans on their local network with friends, and thus won't want to announce their server to the world. I also think that relying on the net: syntax in the load dialog is a horribly unintuitive UI, and so I feel this needs to be implemented in the main UI for network play).
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

Manual connect sounds better and probably is also rather what player intent

Dwachs

Imho, connecting to a server that is known to be offline should be disabled. Some of the addresses in the list took very long until connect() fails. Any user accidentally clicking on a such a server ends up with simutrans not responding for some time.
Parsley, sage, rosemary, and maggikraut.

Ashley

The long pause seems to come from servers which respond slowly with "Connection refused". I think not connecting to servers shown as offline by the listings server makes sense (and users can always enter the server manually).

More generally, avoiding these long pauses (where the game appears to hang) could be achieved by doing network operations asynchronously in another thread. This would be rather complex to implement though I'd imagine.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Ashley

Ok, with this patch I've moved the manual connection to be a separate control, labelled the two controls and provided a refresh button for the listing.

It will also not attempt to connect to a server which is marked as offline by the listings server. (Offline, but compatible servers are still shown without "Show all" being checked though - to let people see that the server may be available at some other time).

Any other suggestions? :)
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

The Refresh is not needed, imho.

If this dialog is really open for a long timte (like 5 minutes or so) it could get new data. Otherwise I do not see the need for this button. Otherwise I have no objections; but where is the show compatible ???

Dwachs

Quote from: prissi on March 05, 2012, 12:25:50 PM
but where is the show compatible ???
no button is missing when compared to the trunk version ???
Parsley, sage, rosemary, and maggikraut.

prissi

As Timothy said ...
QuoteI am considering having two checkboxes, "Show incompatible" and "Show offline", the default would be both unchecked, and you can check either one to display servers you can't connect to.

Thus instead of refresh two checkboxes, show all and one show compatible (tooltip say "including offline") Any click on those would anyway refresh the list.

Ashley

Here we go. I also refactored the code for refreshing the display of information in the window, it's much cleaner now.

I need to update this for the changes made by this patch, then I think it should be finished unless there are any more suggestions.


(As an aside, should the scrolled window panels not display a scrollbar even when they don't need one? In the screenshot below there's a big space on the right-hand side of the scrolled panel where the scrollbar would go... Either a greyed-out scrollbar should be shown, or the box should expand to fill the space the scrollbar would take up.)
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Ashley

Now incorporating the nickname entry field too.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

I am not sure if the nickname is more appropriate for the chat window or the financial dialogue ... But I think you added enough feature to get into the trunk .... Recently there are some symbolic constants for DImensions/distances fro edges and so on, but that could be added after cahnging rather.

Ashley

Financial dialog, IMO, deals with the Company (and Company name). Chat window IMO deals with the Player (and Player name). I think we should keep those two ideas distinct. Players join a server, and may play as one or more Companies. One or more Players may play a single Company as well.

Thus I'd say keep nickname settings and chat settings in one window (with the option to set the nickname on the join game dialog to help new players) and keep the company name settings as they are now in their own place.

I'm planning on making some more patches to improve this stuff. I think this is the right direction to go in though.


I'd suggest:

1. Change the current "Player List" to be "Company List"
2. Update the Company List so that in network mode it displays the Player currently playing as that Company
3. Move chat functions into a dedicated window (as per the other extension request)
4. Have a function in that chat window to permit setting your nickname, or viewing a list of active players etc.



Quote from: prissi on March 06, 2012, 09:58:51 AM
Recently there are some symbolic constants for DImensions/distances fro edges and so on, but that could be added after cahnging rather.

Where are these defined? Is there a dialog/window which uses them which I can use as a guide?
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Dwachs

Quote from: Timothy on March 06, 2012, 10:06:56 AM
Where are these defined? Is there a dialog/window which uses them which I can use as a guide?
They are in gui_frame.h
Parsley, sage, rosemary, and maggikraut.

prissi

Otherwise convoi_info_t and player color choosing dialog are already reworked.

Ashley

Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Dwachs

thanks, incorporated in r5533.

I am not satisfied with the 'Connect' button. Clicking the button fetches information about the server. 'Connect' sounds more like 'join the server'. Imho 'Check status' or 'Check server' better reflects the action of this button.

Other opinions?
Parsley, sage, rosemary, and maggikraut.