-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic race features #2307
Add basic race features #2307
Conversation
- Times in the scoreboard - Finish messages - Timer - Checkpoints
The miliseconds should only show two decimals. And the new timer is very ugly, should merge it with the gametimer or at put it next to it somehow. In scoreboard at the top right, where the best time is should, this shouldnt display the decimals at all, just minutes:seconds |
src/game/client/components/hud.cpp
Outdated
@@ -153,7 +155,11 @@ void CHud::RenderScoreHud() | |||
float Whole = 300*Graphics()->ScreenAspect(); | |||
float StartY = 229.0f; | |||
|
|||
if(GameFlags&GAMEFLAG_TEAMS && m_pClient->m_Snap.m_pGameDataTeam) | |||
if(GameFlags&GAMEFLAG_RACE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now it disables the HUD in the lower right corner. It could maybe just display the fastest player. Any other suggestion what to display here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about your own fastest time and the fastest one in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works like in DM now. When you are in spec the two fastest players on the server are shown. Otherwise it displays you and the fastest player.
I wouldnt do that. My mod for example is based on DDrace but also supports kills, deaths and flags. |
Good job as usual 👍 . |
@fokkonaut as stated in the initial post you can configure how many decimals are used for the times. In fastcap for example you want to have milliseconds everywhere. There are maps where the record is around 3 seconds. The timer is probably what you are used to. When I replaced the game timer with the race timer in the client pack, people complained that I should bring the old timer back. |
Maybe make it configurable aswell, as you already made some things as configs |
I consider to change two more things:
|
Good job 👍 |
Note: the auto pickup should be serversided, it's just a flag for the client and very easy to implement, could be in the connect message |
Then I'll leave the game timer thing to custom clients 👍 Just adding flags to the network protocol is not that easy. Doing it in the engine protocol (e.g. the connect message) would work, but it just does not belong there. Adding things to the existing game messages will not work since old servers would just drop the packets. The only non-hacky solution would be to add even more net messages. |
This addresses #2172. Included features are:
The server can set a few config params:
For testing this, the two "Race Test" servers already implement this protocol extension.
You can find the code at: https://github.com/axblk/teeworlds/tree/race_proto
This is more of a proposal and I'm open for your opinions and suggestions! 😃
The flag used for the finish messages is from the old client pack. When someone has a better icon, I'll replace it.
The finish messages are a bit smaller now, but these screenshots should show most of the features: