since tickets mean respawns left, change the number everyone sees to be one less than it currently is, because at 1 you can't respawn
i totally agree avair. I remember thinking this when i first started playing... but anyway good post, well made. it just makes sense.
i think it was originaly set as 1 being the minimum because 0 caused the game to end and your team to lose and yes i do see your point and how it could be confusing to some.
It should be set that when the counter goes to -1, the game ends, but shows a zero in the text instead.
Having a -1 means that he has to change the variable type he is using. I am sure for efficiency reasons he is using an unsigned short. for explanation: * Checking against 0 instead of a number is much faster for the computer to do rather then using functions to determine if they are equal. EX. if(Tickets==0) Instead of if(Tickets==-1) * Using an unsigned variable allows almost double range. EX: Code: Type Of Variable Bit Size Variables Range Use unsigned char 8 0 <= X <= 255 Small numbers and full PC character set char 8 -128 <= X <= 127 Very small numbers and ASCII characters unsigned short 16 0 <= X <= 65,535 Counting, numbers, loop control short 16 -32,768 <= X <= 32,767 Counting, small numbers, small loop control There is no reason for most aspects of this game to use negative numbers there fore he probably is using unsigned variables in 90% of the code. Currently his code probably looks like this (oversimplified example). Code: ... if(BE_Loose_Ticket&&(BETickets==0)) NFWIN(); elseif(NF_Loose_Ticket&&(NFTickets==0)) BEWIN(); ... To U and I the tickets say 1 but inside the code the tickets read 0.
That would be nice, because what he said above made no sense to me, but that does, and that's why we love you!
So your saying the code reads 1=0 not 0=0? And altering the display before and update? More slowdowns.... the inefficiency goes up... lordy lordy lord. "--" Thats gana take up a one operation to do, when if you optimize the code a bit by making it check against 0 instead of a number you will be surprised at the speed gained. Your talking (I think its) 3 ops to do a number check and only 1 op to do an 0=0 check. Don't get me started on your using floating point variables for armor.
Who cares about client side it can do much more random shit. For example GUI has controls which are named using NTS (null-terminated strings) and are referenced by the string. All in all 0 vs 1 is not a big problem from performance point of view but you have to make sure that nothing will go wrong after changing it (no crashes or weird game endings)