Bug 3013 - Add gametype to server browser
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC Linux
: P2 enhancement
Assignee: Tremulous Bugs
QA Contact:
URL:
Depends on:
Blocks: 3818
 
Reported: 2007-01-27 12:08 EST by Risujin
Modified: 2011-01-22 10:34:25 EST
1 user (show)

See Also:


Attachments
Adds "Game" tab to server browser. (4.14 KB, patch)
2007-01-27 14:21 EST, Risujin
*Compatible* game column patch (SVN 895) (3.46 KB, patch)
2007-01-27 14:50 EST, Risujin
Possible fix for SVN HEAD (4.11 KB, patch)
2009-02-24 19:45 EST, Jackmcbarn
demonstration of current text overflow (78.95 KB, image/png)
2009-02-26 20:07 EST, Chris "Lakitu7" Schwarz
Patch for svn1930 (7.92 KB, patch)
2009-11-19 00:44 EST, John 'Rezyn' Ellis

Description Risujin 2007-01-27 12:08:57 EST
I think vcxzet already has a patch for this but it would be nice to have a gametype field in the server browser now that we have a number of mod servers running so that players can "sort by gametype" if they want (or don't want) to play a modded server.
Comment 1 Risujin 2007-01-27 14:21:54 EST
Created attachment 1246 [details]
Adds "Game" tab to server browser.

With a bit of help from vcxzet, here is a small patch to add a "Game" column to the server browser. The "game" field displays the server's reported fs_game, information which is currently sent to the client but ignored.
Comment 2 Risujin 2007-01-27 14:50:43 EST
Created attachment 1247 [details]
*Compatible* game column patch (SVN 895)

vcxzet pointed out that if I rearrange the internal column numbers, the client won't sort correctly when it has the old menu files. This new patch preserves the old order for compatibility.
Comment 3 vcxzet 2007-03-14 11:50:40 EDT
I think it should use gamename which is the version in bg_public.h
currently this only gives the fs_game
Comment 4 Risujin 2007-03-14 12:06:12 EDT
(In reply to comment #3)
> I think it should use gamename which is the version in bg_public.h
> currently this only gives the fs_game

Is that transmitted from the master server?
Comment 5 vcxzet 2007-03-14 14:08:23 EDT
you can see it in server status info
Comment 6 Tim Angus 2007-09-20 10:36:54 EDT
Should probably re-add this before the next version. I never really expected mods to take off.
Comment 7 Risujin 2007-09-20 11:14:50 EDT
(In reply to comment #6)
> Should probably re-add this before the next version. I never really expected
> mods to take off.

It really shows. :)

Right now mods are practically limited to ugly-hack server side ones as generally you can't fill a client-modded server because most of the community is still running the 1.1.0 client or has cl_allowDownload 0 inherited from it. You would need a download prompt or a descriptive error message to resolve that.

Note that this patch will show the folder that the server is running the mod out of, not the actual mod name #define. Currently mods authors won't use the #define because players will drop with a client mismatch rather than be allowed to connected and get a chance to receive a descriptive error message. Server-side mods can't be differentiated either way.
Comment 8 Ben Millwood 2007-09-20 12:42:30 EDT
(In reply to comment #7)
> (In reply to comment #6)
> Note that this patch will show the folder that the server is running the mod
> out of, not the actual mod name #define. Currently mods authors won't use the
> #define because players will drop with a client mismatch rather than be allowed
> to connected and get a chance to receive a descriptive error message.
> Server-side mods can't be differentiated either way.
> 

I use the #define, and so too does tremx. It is a more reliable indicator of a mod, as the server settings cannot change it. However, fs_game would also be useful, especially in avoiding those servers that insist on making another autogen for me or dumping their pk3s in base/
Comment 9 Jackmcbarn 2009-02-24 19:45:11 EST
Created attachment 1979 [details]
Possible fix for SVN HEAD

This patch was made against SVN HEAD.  I can't fully test the sorting, though.
Comment 10 Chris "Lakitu7" Schwarz 2009-02-26 20:07:48 EST
Created attachment 1984 [details]
demonstration of current text overflow

Thank you very much for updating this patch, Jack. I definitely was not looking forward to doing so. I have two very minor nitpicks before I can merge this and I hope you will not mind fixing them as they are trivial:

1) The text in the new column can overflow into the scrollbar. See my attached screenshot for a demonstration. You are welcome to fix this by changing the column display order so that ping is at the end, since that won't go more than 3 digits. Alternate solutions are also likely fine.

2) The whitespace on the "*game2..." line in cl_ui.c should be changed to align "*game2" with "*game1" on the previous line.
Comment 11 John 'Rezyn' Ellis 2009-11-19 00:44:10 EST
Created attachment 2204 [details]
Patch for svn1930

New patch against svn 1930.

To avoid overlapping the scrollbar, the game type column is placed in a different position so that ping and it's semi-fixed width can stay as the right most column.

When a game is not set on the server, it defaults to "base" as defined by BASENAME
Comment 12 Chris "Lakitu7" Schwarz 2011-01-22 10:34:25 EST
In at r2112. To be honest I thought this had been committed ages ago.