Odamex 'votemap' System
Design Document
[What is the votemap system?]The purpose of the vote map system is to allow server administrators the option to grant clients flexibility to play outside of the normal map list order.
[Research]Multiple modern game designs, as well as the other two major multiplayer Doom source ports, were considered when attempting to find the most viable solution for an Odamex map voting system.
When trying to find the right system, there were some major concerns that most existing designs did not comply with:
1) The system should allow clients to view a list of all maps eligible to be voted on.
2) The system should not clutter the screen with large amounts of text or messages.
3) The system should not require any new binded commands. Simplicity is key.
Ultimately, I chose to base this design off of that found in the Half-Life mod,
Natural Selection.
[Server Implementation]The server design of map voting will require a new cvar and will have to read from the server's existing map list (maps in the maplist are maps eligible and transmitted to clients for voting.
A new server-side cvar, 'sv_votemap', will be used to enable or disable map voting on the server. If enabled, any maps in the maplist may be voted on by clients. If disabled, the maplist operates as usual.
When a client votes on a map, the server sends a message to clients (not a chat string) that should be formatted as follows:
"Player has voted on wad map [z] (x/y)"{Legend:}Player = name of client who used 'votemap' command
wad = name of wad (example: DWANGO5.WAD)
map = name of map lump (example: MAP18)
x = number of players who have voted for same votemap # (see z)
y = number of votes required to change map (must be over 50% of clients connected rounded up to the next whole number. For instance in a server with 8 clients, 'y' would equal 5. (Perhaps the required percentage could be a server variable).
z = ID number assigned to each map in the map list. Each time a new map is added while the server is running, the next consecutive number is assigned to that map. Duplicates (same wad and map) are ignored.
[Other Server Stuff]A few notes added in 2010:
-Voting should be disabled during intermission
-Voting should probably take place in sessions, especially since different votes for different maps can be occuring at once. Maybe clear all votes at the end of a map or every 5-10 minutes?
-Players should only be able to have one outstanding vote, so using the command twice on different maps should be allowed if one decides to change their vote.
[Client Implementation]The client will require a new console command and should receive the map list with the map IDs after inputting it.
The 'votemap' command, when used in console, will output a list in the follow format:
"[z] WAD MAP"The client can then use the command 'votemap "z"' to vote for a map they'd like to play.
This design document is open to input.