Bug Tracker – Bug 238

CPMA-style Round/Warmup/Ready support

Last modified: 2016-11-11 19:37:58 UTC
Bug 238 - CPMA-style Round/Warmup/Ready support
Summary: CPMA-style Round/Warmup/Ready support
Status: RESOLVED FIXED
Alias: None
Product: Odamex
Classification: Unclassified
Component: Server & Client (show other bugs)
Version: (old) 0.0.1
Hardware: All All
: P2 enhancement
Assignee: Odamex Bug Reporter
URL:
: 239 (view as bug list)
Depends on: 860
Blocks: 620
  Show dependency tree
 
Reported: 2006-10-24 15:13 UTC by Alexander Mayfield
Modified: 2016-11-11 19:37 UTC (History)
1 user (show)

See Also:

Attachments

Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mayfield 2006-10-24 15:13:08 UTC
In most 'pro' games, the server has four phases.

1. Warmup
2. A round of play
3. End of Round
4. End of Game (Intermission)

The server starts in state 1.  Durring this state, the rules of the game apply, but all forms of scoring are frozen (stuck at zero) so you can't 'win'.  And you have max ammo in all four categories from the start.  Every player has a status of 'ready' or 'not ready'.  Players have to use a "ready" command to indicate that they are all ready.  Once all players are ready (or there is a vote to force readyness), the server counts down and switches to state 2.  The playing field resets completely, everything is in its initial state, as if you had just loaded the map.

While in State 2, the round plays out until round conditions are met (Round Frag limit has been reached.  Round Time Limit has been reached.  Only one team is alive (for Last man standing), The team on offense has captured the flag (for Capturestrike)).  Once the conditions are met, the game goes to State 3.

In State 3, the game quickly checks to see if the match conditions have been met (Match Round Limit has been reached, Match Score Limit has been reached).  If so, it heads to state 4.  Otherwise, it waits for a few seconds and goes back to State 2.

State 4 for all intents and purposes is the intermission screen, where the results of the match are displayed.  If a map rotation is in place, it will then load the next map in the rotation.  Otherwise, it returns to State 1.

This system, combined with a working map and setting voting system, can provide much better oppertunities for high level play by allowing both players to set out on equal footing, as well as greater flexability in game modes.

Any comments?
Comment 1 Alexander Mayfield 2006-10-24 15:18:54 UTC
*** Bug 239 has been marked as a duplicate of this bug. ***
Comment 2 Mike Lightner 2006-10-24 15:36:08 UTC
I would just like to add at this point that anything like this would have to not be par for the course, and by that I mean not enabled by default.  This would all have to be some sort of enhanced dm mode or something, otherwise it completely goes against the point of odamex which is to provide a DOOM game experience, not a quake 3 experience.
Comment 3 Mike Lightner 2006-10-24 15:37:54 UTC
Aren't 2,3 and 4 already happening anyway?  The only difference here is a warmup period.
Comment 4 Alexander Mayfield 2006-10-25 09:35:55 UTC
(In reply to comment #2)
> I would just like to add at this point that anything like this would have to
> not be par for the course, and by that I mean not enabled by default.  This
> would all have to be some sort of enhanced dm mode or something, otherwise it
> completely goes against the point of odamex which is to provide a DOOM game
> experience, not a quake 3 experience.
> 

Not true.  Older versions of Quake didn't have this warmup mode either.  CPMA added this to make things as fair as possible to both players.  In fact, if you set the settings to 1 round limit, 50 (per round) frag limit, no global time limit, no global frag limit, then the experience would be EXACTLY the same as a doom2.exe match, even MORE than what is avalable today because in internet source ports, you don't have any 'opening theory' because you have to join a game in progress instead of both players joining at the exact same time like with doom2.exe.
Comment 5 Alexander Mayfield 2006-10-25 09:39:11 UTC
(In reply to comment #3)
> Aren't 2,3 and 4 already happening anyway?  The only difference here is a
> warmup period.
> 

There is no mechanism to reset the map to initial state without reloading the map itself.  And the intermission state is independant of being ingame, because after the intermission, it always loads the new map.

Comment 6 Denis Lukianov 2006-10-25 09:44:43 UTC
(In reply to comment #5)
> There is no mechanism to reset the map to initial state without reloading the
> map itself.

There is a difference?

Comment 7 Alexander Mayfield 2006-10-25 09:56:41 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > There is no mechanism to reset the map to initial state without reloading the
> > map itself.
> 
> There is a difference?
> 

Yes.  When you reload the map, everyone has to load the map at the same time, and while Player A might arrive on tic 2, Player B might arrive on tic 5.  If you've ever seen a map change in ZDaemon, you'll see that people enter the map in a staggered fashion, and that the initial seconds of the map are a mad dash to take advantage of the fact that not everyone is loaded up and oriented yet.

The reason this is necissary is because of the difference of playing Peer to Peer on a LAN and the CLient Server model.  When you're on a LAN playing doom2.exe, you get to choose what map to play, who to play against, and you both start on tic 1 as soon as the game starts.

However, in a public Client/Server game, people can join and leave at will, and your score is meaningless at best because you don't have the advantage of being on the server at the begining of the match.  This is appropriate for public FFA servers when you just want to hop in and play, however, for duels and clan games this is less than ideal.

What the warmup and round-based things do is put the environment of having an official match at a LAN party into a client/server model.  The players have control over the settings of match (through voting), and when the match starts, everyone starts out on equal footing (because of the warmup/round).  The fact that I got the idea by playing CPMA and Warsow is immiterial, this is not a "Quake" feature, this is a "Professional Gaming" feature that would have real benefits for those who want to have a serious match in Odamex.
Comment 8 Denis Lukianov 2006-11-07 20:26:04 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > There is no mechanism to reset the map to initial state without reloading the
> > > map itself.
> > 
> > There is a difference?
> > 
> 
> Yes.  When you reload the map, everyone has to load the map at the same time,
> and while Player A might arrive on tic 2, Player B might arrive on tic 5.  If
> you've ever seen a map change in ZDaemon, you'll see that people enter the map
> in a staggered fashion, and that the initial seconds of the map are a mad dash
> to take advantage of the fact that not everyone is loaded up and oriented yet.

Our map loads are immediate. ZDaemon probably forces a reconnect for every map, which is why it takes so long. Please confirm.
Comment 9 Alexander Mayfield 2006-11-09 01:05:06 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > (In reply to comment #5)
> > > > There is no mechanism to reset the map to initial state without reloading the
> > > > map itself.
> > > 
> > > There is a difference?
> > > 
> > 
> > Yes.  When you reload the map, everyone has to load the map at the same time,
> > and while Player A might arrive on tic 2, Player B might arrive on tic 5.  If
> > you've ever seen a map change in ZDaemon, you'll see that people enter the map
> > in a staggered fashion, and that the initial seconds of the map are a mad dash
> > to take advantage of the fact that not everyone is loaded up and oriented yet.
> 
> Our map loads are immediate. ZDaemon probably forces a reconnect for every map,
> which is why it takes so long. Please confirm.
> 

How immediate?  Does the server wait for all clients to load the map before starting on tic 1?  If you have a 300mhz box and a 2 ghz box playing each other, will the 300mhz box take longer to get into the game due to the fact that it will probably take longer to load the map?

If our map loads are immediate, then we will need some of the #nightmare crew to verify that it our immediate map loads are indeed 'as good' as starting a fresh peer to peer game.  If so, then I suppose there is no harm in reloading the map.
Comment 10 Albert Brown 2006-11-12 19:46:22 UTC
Sounds nice, the standard CTF Clanwar in zdaemon comprises of 5 games of CTF.  At the end the total amount of flags scored by each team is added up and the team with the larger number wins. (Or, it can just go by best out of 5, which I prefer, but no one seems to measure score that way).  If Odamex is going to support matches split into a number of rounds, keeping an overall score is important.

Also, the different rounds MUST be able to be on different maps.  For LMS, one map spread over 10 rounds is ok, but that doesnt fly in CTF.
Comment 11 Alexander Mayfield 2006-11-15 20:53:07 UTC
Another thing.  Doesn't reloading the map also reset the timelimit and fraglimit?  There are six variables we should be able to modify

matchtimelimit: Timelimit for the MAP before it goes to the next map
timelimit: Timelimit for the ROUND before it goes to the next round/ends the match and goes to warmup
fraglimit: Fraglimit for the ROUND before it goes to the next round/ends the match and goes to warmup
scoreilmit: Scorelimit for the ROUND before it goes to the next round/ends the match and goes to warmup
winlimit: The number of rounds a specific team or player has to 'win' in order to end the match and go to warmup
roundlimit: The maximum number of rounds that will be played until the match is automatically ended, a winner is picked, and you go to warmup.
Comment 12 Alexander Mayfield 2007-09-09 02:16:32 UTC
For a working example, try this game out:

http://www.warsow.net

Notice how you can have many 'matches' per map.
Comment 13 Alexander Mayfield 2007-09-09 02:23:44 UTC
I realize now that my origioal proposal was a bit too complex.  Here are a few simplified examples of what this system would be used for:

1on1:  Two players are in warmup.  They both 'ready up'.  The match then starts.  Once one player reaches 50 frags, the match endsv
TDM: Eight players are in warmup.  They all 'ready up'.  The match then starts.  Once a certian amount of time has passed (maybe 10-15 minutes), the match endsv
CTF: Eight players are in warmup.  They all 'ready up'.  The match then starts.  Once a certin number of caps have been made (5) or a certian time limit has passed (15), the match ends.

After this, depending if there is a maplist configured, the server switches to the next map.  However, if there is no maplist (and this is what most servers in CPM/Warsow do), you reenter warmup period on the same map and the cycle continues until someone votes a new map.
Comment 14 Ralph Vickers 2007-11-04 11:22:03 UTC
So how do you prevent someone from ruining a server by not readying up?
Comment 15 Denis Lukianov 2007-11-04 11:46:45 UTC
(In reply to comment #14)
> So how do you prevent someone from ruining a server by not readying up?
> 

max_timeout would be my guess
Comment 16 Ralph Vickers 2010-08-27 06:53:49 UTC
http://odamex.net/boards/index.php/topic,229.0.html

I wrote this up a long time ago, but it's a general design document for this feature. Thought it might be useful
Comment 17 Alexander Mayfield 2012-08-30 22:36:54 UTC
I've got a branch with a ready system and map restting.

https://github.com/AlexMax/odamex/commits/resetmap

There is no gametype that uses a round system yet, but the groundwork is laid for it, as there is a codepath for both a normal reset and a "full reset" which resets scores along with the state of the game.
Comment 18 Ralph Vickers 2016-11-11 19:37:58 UTC
This has been in since .6.x. Done!