bobbi228 / quadra

Automatically exported from code.google.com/p/quadra
0 stars 0 forks source link

Missing level info in DOWNLOAD packet #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Submitted by Patrick Aaltonen (pihvi):

Let's say a server runs with levelup set to true, and a
player for instance came to level 2. If a new player
suddenly connects to this server, then there is no way
for this new player to know which level the other players
are at, which again means he will calculate their score
wrong. I think information about the level for each player
should be added to the download packet (or the
gameserver packet).

Comment by slajoie:

Is scoring really dependant on the level? I don't remember...

In any case, the level can be determined by looking at the 
number of lines and whether levelup is enabled on the server 
so there would be no need to add information to 
P_DOWNLOAD.

Comment by pihvi:

It's easy to check: Create for example an ffa server with 
levelup enabled and join a player to clear at least 15 lines to 
get to level 2. Then pause the game and connect a new 
client. Go back to the first player, unpause, and clear some 
more lines and then check the scores in both clients. The 
score is different (I checked with 1.1.8 that there really is a 
scorfe difference).
The score is dependant by the level with this statement in 
canvas.cpp:
  score_add += (score_add/10)*level;
As far as I can see, there is no lines information in 
P_DOWNLOAD, but you get one with P_STAT. The problem 
here is that LINESTOT is the total number of lines cleared, so 
if the player has played more than one round, it will be 
impossible to know how many lines have been cleared in the 
current round. You won't even know how many rounds each 
player has played when the game is FFA.

Comment by slajoie:

You're right! Sorry I'm a little rusty :).
Maybe there should be a stat for LINES in P_STAT. 
Maintaining backward compatibility is easier (or at least less 
ugly) in P_STAT.

Comment by slajoie:

I have this fixed in my workspace but it needs a little testing.

Comment by pphaneuf:

Stéphane, didn't you already commit this change, in revision
248?

http://code.google.com/p/quadra/source/detail?r=248

Original issue reported on code.google.com by pphaneuf on 31 Mar 2008 at 3:43

GoogleCodeExporter commented 8 years ago
slajoie looks like he knows something. :-)

Original comment by pphaneuf on 31 Mar 2008 at 3:47

GoogleCodeExporter commented 8 years ago
Yes, that revision looks right.

Original comment by slaj...@gmail.com on 31 Mar 2008 at 10:12