This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Enhanced Server Listing: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
m Just moving over information, need to re-write
Line 3: Line 3:
==Overview==
==Overview==


In it's current implementation, the BZFlag server listing provides a basic listing of playable servers, with a basic server name search feature. However, it is lacking many of the more powerful sorting and filtering features that most modern games include in their server browsers. The C++ code for the server listing is also lacking any real comments, making it hard to decipher, and is designed at the moment to be rather singularly functional, written for the current listing, without much room for expansion without some serious re-writing. As the number of BZFlag servers continues to grow, a user-friendly server listing, with sorting and filtering options, is quickly becoming a necessity. While BZFlag doesn't need the end all of server listings, the current server listing is pretty bare bones, and makes it difficult for players to find specific servers which match their tastes.
This design document is for the enhancement of BZFlag's current server listing. These enhancements will include refactoring the current C++ code to make it easier to read, and more modular so that new features can easily be integrated in the future. New features will be also be added, such as the ability to filter the server list, sort the server list, and switch between a favorites and recent server list in addition to the regular server list.
 
 
I propose revising the current server listing, using the current menu system. This revised server listing will include several new features, built upon a well commented code base, making future additions and renovations to the server listing quick and easy. The revised code will also be designed with future improvements in mind (such as a buddy list) and as such will be coded broadly, to allow for easy integration of add ons, instead of coded narrowly, like the current server listing, which is so specific to it's current form that it is hard to add onto without much re-writing. The new features I propose to implement will include: sorting options, filter options, a players on server list, and a recently played server view. The current server listing view will also be re-arranged and expanded upon in order to accommodate the new information. This new server listing view will best be discussed amongst the developers and the community, although I provide a mock-up of one possible solution (see appendix). The server sorting options will include: sort by domain name (alphabetically), sort by server name (alphabetically), sort by players (numerically), sort by map name (alphabetically), and sort by client to server ping (numerically). The filter options will allow server filtering by various server-specific settings, by server capacity status (show full servers, show empty servers), and will include a server name filter (including wild cards). If desirable, a domain name filter may also be implemented. The players on server list is fairly self-explanatory, displaying the name and team of players on the currently highlight server. The recently played server view will be an alternative server list, along with a favorites list. The user will be able to switch between the normal server list, the recent list, and the favorites list, and may set different filter and sorting options for each.
 
 
One major 'concern' that must be addressed during all of this re-configuring of the server listing is to not make it overly complex, since one requirement is that the entire menu be keyboard accessible. This is a unique challenge since most server browsers in mainstream games use many mouse activated features. However, I feel with clever design a user-friendly, keyboard accessible menu can be designed. My mock-up gives a basic keyboard interface, and my detailed explanation will expand on this further. In the end, the user should always know how to use the menu, without being overloaded in a sea of explanations.
 
 
This will all be implemented by expanding the current server listing code (and re-writing as necessary). As such it will be written in C++, and will work off of the current dependencies. All of the information needed for the enhanced server listing is already provided in the current code, it just needs to be tapped into. As mentioned earlier, the entire server listing code will also get generous commenting (but not too much), to ensure that in the future it is easily modified as new needs arise. I will also provide wiki documentation for the code, allowing me to be descriptive without overloading comments in the actual C++ code. The code will be written with re-usability in mind, and will be made as dynamic as possible, so that in the future it can be expanded upon, instead of re-written. Obviously no one can predict all future needs of specific code, but due to the fairly narrow scope of a server listing, I feel that most features can be written in a way that will lend themselves to future modifications.


==Design==
==Design==

Revision as of 05:20, 23 April 2008

This page contains the design document for an enhancement or feature. It is a work of collaborative development, and may not represent the final design. If you are not part of the development or design group, please post comments and suggestions on the talk page and not in the middle of the design.



Overview

This design document is for the enhancement of BZFlag's current server listing. These enhancements will include refactoring the current C++ code to make it easier to read, and more modular so that new features can easily be integrated in the future. New features will be also be added, such as the ability to filter the server list, sort the server list, and switch between a favorites and recent server list in addition to the regular server list.

Design

Proposed Changes

I'll begin by describing the basic layout of my proposed changes, the sorting/filtering options, and finally give a mock-up example and discuss keyboard accessibility of the entire menu. My proposed layout will be similar to the current server listing, with a few key changes. At the moment there is a server list, a server information area, and a search feature. I will keep the server list and the server information area, and fold the search feature into my proposed filtering options. So, in addition to the server list and server information area, I will add a filtering options area, which will allow the user to select several filtering options based on server settings, server capacity, and a server name filter. Another possible filter option includes a domain name filter, although I don't consider this a critical part of an enhanced server listing. However, it should be a trivial addition in the future since I will code the name filter to be able to be used across several different areas (server name, domain name, map name, etc). To compliment the server information area there will also be a players on server list, displaying the players on the currently highlighted server, as well as their team and score, and possibly their ping (from their client to the highlighted game server). The server list will be revamped to include headered columns for domain name, server name, players, map name, and ping (from client to game server). The server list view will be able to be easily switched to a favorites view, and a recently played view. Code-wise each of these server lists will be treated as separate lists, allowing the user to sort and filter each one separately, and switch between them while keeping everything intact from list to list.


The columns in the server list will be able to be sorted by the user. The user will select one of the columns, and choose to sort in either direction. Columns which have text entries (domain name, server name, map name) will be sorted alphabetically, while columns with numerical entries (players, ping) will be sorted numerically. Only one column will have sort preference at a time, meaning that users can either sort by domain name, server name, players, map name, or ping. As mentioned previously, each separate server list (normal, favorites, recent) will be able to be sorted separately, and will retain their sorting even when the lists are switched between.


The filtering options will work alongside the sorting done on the server lists, allowing users to narrow down the server list through filters, and then sort as they please. Just as with the sorting of columns, the filter options will be list specific, and will retain their settings even when the user switches between the lists. The filter options will range from different server settings, to server capacity, to server name. A basic check box style filter option will be used to allow the user to specify whether they would like to see empty servers or not, and another option to specify whether or not they would like to see full servers. For the filter options relating to server settings, the user will chose to show only servers with that specific setting on, off, or they can choose to see servers with that server setting either on or off (in other words, no preference on that setting). The server name filter will basically be the relocation of the current server search function into the filter options area, allowing the user to show only servers that match the server name filter they specify (which will allow wild cards for the most flexibility). As a thought that just occurred to me, perhaps an overall on/off switch should be given to the filter options, that way the user can easily turn off filtering options without having to manually reset each option.


Mock-up of the enhanced server listing

I've put together a mock-up of how my proposed server list enhancements could be neatly integrated into a clean and simple UI for the end user. This mock-up can be found in the appendix, as well as a 'bastardized' version, which combines an in-game screenshot with the mock-up, to give a better idea of what the finished product would like. You have to use your imagination for that one. Also in the appendix you will find screenshots of server browsers from a few mainstream video games. I used these as references when creating my mock-up, giving me ideas for what I considered the best of all worlds. My mock-up is in no way set in stone, and since the actual coding cares little about where on the screen it is placed, I consider this part to be quite flexible, and would love to illicit input from other developers and the community. I expect the overall layout to be tweaked several times throughout the completion of the proposal before a perfect balance is struck.

Keyboard Accessibility

The introduction of my mock-up leads me into the next part of the proposal, and one I consider to be quite important, which is the keyboard accessibility of the enhanced server listing. This is obviously a unique constraint that the referenced server browsers didn't have to deal with, although I don't think it will be much of an issue during development. However, it is very important, in my opinion, that it come out simplistic and smooth, because no matter how pretty the new server listing menu may look it means nothing if users can not easily find their way around it. In the mock-up I provide some keyboard commands along the bottom, like the current server listing does. Although it seems like quite a few commands, I think most of them are fairly intuitive, and really it would be hard to implement with any less commands.


I'll explain the significance behind each command in the mock-up. Users can use the '+' key to add a server to their favorites list. This command only works on the normal server list, and the recently played server list. When the user is viewing their favorites list, this command will be exchanged with '-', which will remove the selected server from their favorites list. The 'f' key can be used to switch to the favorites list, and the 't' key can be used to switch to the recently played list. As with the add/remove favorites command, these commands would change depending on which list you were viewing, allowing for an 'n' command which would switch the user back to the normal server list. The 'i' key would change the keyboard control to the server information area. This would allow the user to use the left and right arrows to switch between the server information and the server player list, and the user could use the up and down arrows on both areas to view the different pages for each area. The 's' key would allow the user to modify the sort options for the server list. Once keyboard focus is given to the sort options the user can use the left and right arrows to switch between different column headers, and would use the up and down arrows to sort, or reverse-sort the servers based on that column. The 'o' key would give keyboard focus to the filter options area, where the user could use the up and down arrows to scroll through the options, setting them with the left and right arrows, or typing where necessary. The last command, 'r', would refresh the information in the server list, such as player counts, pings, etc.


The key to making all of this keyboard accessibility work is to have the command list at the bottom of the screen change depending on which area/server list has focus at the time. This is important because the usable commands change with the focused area/server list, and the user will always need an accurate command list that shows them how to change back to the normal server list, etc. I think the system I've laid out is pretty intuitive, but as with my mock-up, I plan to illicit input from other developers and the community, and overall tweaking the keyboard access to the menu should be a fairly trivial task. I will be making every effort possible while coding the enhanced server listing to ensure that keyboard accessibility changes are easy and painless to implement.

Links

Mock-ups

References