Message Boards

Topic: 'votemap' Design Document/Proposal  (Read 12995 times)

Offline Ralphis

  • Administrator
  • Posts: 111
    • View Profile
'votemap' Design Document/Proposal
« on: October 14, 2008, 19:10:15 »
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.
« Last Edit: January 24, 2010, 02:06:08 by Ralphis »

Offline Ralphis

  • Administrator
  • Posts: 111
    • View Profile
Re: 'votemap' Design Document/Proposal
« Reply #1 on: January 24, 2010, 02:01:34 »
An example of how this would look in game:

Client goes to console and types votemap. The following is output in their console:

[1] UDM1.WAD MAP01
[2] UDM1.WAD MAP04
[3] DWANGO5.WAD MAP02
[4] DWANGO5.WAD MAP11

These are the maps in the server's map list. Say there are four players in a server, Ralphis, Manc, Denis, and SoM.

I want to vote for dwango5 map11, so I type votemap 4 in the console. The following would be output to all players in the server:

Ralphis has voted on DWANGO5.WAD MAP11 [4] (1/3)

1 being how many people have voted on the map so far, 3 being the required votes (over 50% of players in the server rounds up to 3 players).

At the same time, Manc could do the same thing and vote on another map, say udm1 map04 by using votemap 2. The following would be output to clients:

Manc has voted on UDM1.WAD MAP04 [2] (1/3)

So there are now two votes in progress at the same time. Then denis decides that Manc has a good idea voting for udm1 map04, so he also types votemap 2. The following is output to clients:

Denis has voted on UDM1.WAD MAP04 [2] (2/3)

SoM is convinced that Manc and Denis have the right idea so he agrees and types votemap 2 in the console as well:

SoM has voted on UDM1.WAD MAP04 [2] (3/3)

So now all the required votes have been met and the server will jump to intermission and switch to udm1.wad map04.
« Last Edit: January 24, 2010, 02:03:12 by Ralphis »