-
Notifications
You must be signed in to change notification settings - Fork 382
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
Update to DDNet HUD and OPD (On Player Displays) #6724
base: master
Are you sure you want to change the base?
Conversation
Very cool that you tackled this. Haven't reviewed it yet. |
e61fc40
to
6cbe440
Compare
Ops, I wanted to merge master into this, to resolve the merge conflict. Accidentally rebased on master, sorry! |
I like rebasing better anyway. |
Mostly me too, mainly if I do an error in my commit and want to do a quick fix via rebase (like my last commit, I would like to rebase this). But then it is not so nice if someone is reviewing... But I have bad experiences in rebasing PR on master, like here, it was just to confusing to fix the conflict correct.
|
6c46fde
to
82c10c5
Compare
This seems to change some graphics? The freeze bar looks different in the new extras.png file. Is that intended? |
Yes, sorry I have not finished the description of the PR yet. I will complete this later (for now please have a look at the commit messages). |
I have made a few tests with debug / monitoring functions, I came to the conclusion that using GameTick is the best option. If someday someone comes up with a better solution, it is welcome. Using gametick should be pretty stable (as stable as your ping, I guess), so pro players that relay on stable counters should be satisfied. |
Not going to lie, this is just making image management messier than it already is. Cramming everything into one image doesn't sound very intuitive for the future. Like, if we were to tackle rearrangement of images, I think we should organize everything properly. |
The idea was that we have one png for all stuff that we have added for ddnet Game, HUD and OPD. The idea was that someday we could maybe expand the loading mechanic of extras.png, so that for other mods that require other textures cloud be another texture be loaded. The discussion we had about the changes are long time ago, so please, all changes I have made here are open for discussion. |
When you have a minute it'd be nice to see some screenshots for these changes |
I will do some later tomorrow. |
Video showing / testing the new Jump Display Indicator Sorry for the lags. :/ I do not know why the recording is so bad |
m_FreezeStart is now corrected by the ticks the character was paused Possible physical changes: Until now it was possible if you sit inside freeze to re-freeze instant after unpause. Now you re-freeze after the second that was dawned before the pause. I do not excpect that this is used on any map, and it did not bring any benifit.
Renamed freezebars.* to countdowns.* because it will contain different types of countdowns with different display styles. That will be at least a countdown for freeze time and ninja time, in form of stars as in vanilla and progress bars. Alternative name for the class could be: "on_player_display" so it can include also different future displays that are not countdowns, but also are displayed on the player. Renamed option cl_show_freeze_bars to cl_show_freeze_countdown, because it now includes the switch between freeze bar and freeze stars. Added void CreateDamageInd to client component to create multiple damage stars in the way it is done on the server. Fix alpha calculation of damage indicator, so that we can use a lower alpha than 1 for other players. Added setting menu for toggle between freeze stars and freeze bars
Move arrow.png, hud.png, strong_weak.png inside extras.png Todo: Remove weapon armor from game.png (it is now included inside extras.png) Now the Strong/Weak Indicator Texture has a color (instead of hardcoded collor in code), so customization is easy Removed HUD Assets Tab and all related code Renamed cl_show_freeze_countdown to cl_show_state_change_countdown; so it is a more general name because it now includes also the coutdown for ninja move time Simplefied the rendering of countdown bars a lot, by just using two seperate textures, one for full bar; one for empty bar Implemented client sided star emitation for ninja move time Moved ninja countdown bar from top left to bottom of the player. Ninja bar moves below the freeze bar if there is any, because freeze time is normally lower. Removed ninja bar from HUD Updated settings page for new countdown option Server Changes: Also Increase m_Core.m_FreezeStart if server is paused; so that Clients get correct FreezeStart for countdown calculations; This should have no effects on game physics (as mentioned in the commit before).
We no longer want to display ground jumps, because it is anoying for many players to see a frequently change in the HUD. Most of the time the player knows when he has ground jump (because he stays on ground) or it is implicitly indicated via the air jump display. The idea is now as following: m_Jumps == -1 (255): Tee has only ground jump => display nothing m_Jumps == 0: Tee has no jump at all => display air jump disabled symbol To make it easier for the player to distinguish the two cases above, the "air jump disabled" symbol is used. Even tho in the first case the player also has no air jump; he can associate the no air jump symbol with no jump at all; and since we do not display ground jumps he should not be confused in the first case to make a ground jump. m_Jumps == 1: Tee has one ground jump or one air jump => display one air jump symbol that also gets empty on ground jump m_Jumps >= 2: Tee has one ground jump and (m_Jumps - 1) air jumps => display (m_Jumps - 1) air jumps
- remove s_StarsCountdownToolTip - use mem_zero in init of countdowns - use const Reference instead of pointer for CCharacterCore in countdowns - use const pointer for CCharacterCore in HUD
59abd97
to
86d9b93
Compare
Discuss: Should we maybe generate the new snowflake particles instead of damage indicator stars for the countdown? People obsessed with the stars can just replace it in the hud png. |
@Learath2 So you do not mean stopping the freeze animation if you have turned on the stars countdown, but using a different texture for the stars countdown? One that is default different than the damage stars, more like the snowflake particle, but different so that you can distinguish it from the freeze animation? |
Yes, we can make them bigger and give them an outline to make them stand out. Iirc the freeze animation ones are tiny. Idk if it would look better, though. Maybe stars are the way. I was interested in trying it when I first accepted to add the stars back. |
I have talked with Ravie about this. He has added a good thought, with that I agree. We only add the Star countdown back for player that loved them and do not want any changes to them. So changing the texture, would not satisfy these people. Ravie also means the option to switch back to star countdown should be a hidden option, not in ingame setting menu. Even adding an extra textur to the set, that is identical to the old star, just that you have the option to change the countdown star without changing the damage indicator star, is also nothing we should do (at least not without having people that would like to have that). And it wouldn't be easy to reacreate the identical star as vector image. |
Update DDnet entities with new Shields design
Update weapon armor in entities clear
For me, this PR can be merged. Could everyone who had criticism look over it again? Maybe I lost sight of something that was under discussion. |
If we don't want to do asset handling in this PR, I propose not changing the layout with this PR. To expand: Every change in assets causes churn for all people having custom assets. If we do a change, I want to do it right, so we don't have to cause work for the community twice. |
If this is so high prio; I guess we can put this back to draft, and I do my best to finish the work faster... Arguments against staying with the old layout (if the asset handling is not high prio): Combining the textures as I did, makes it easier for designers to create a full HUD/OPD texture set (at least for now). But I'm fine with putting it back to queue |
CC #5699. |
Status: Blocked on #6753. |
Status: Still blocked on #6753. :/ |
Hello everyone, I hope you are all doing well.
Main goal for this PR is to add an option to restore countdowns using stars for Unfreeze time and Ninja time. Doing this I also updated the HUD and OPD.
It would be good if someone familiar with the tick states on the client side could take a look at the new star generator in countdown.cpp. I'm not sure if there is a better solution.
The tick I use should be the same as the original star counter design, so switching to the client sided star counter should be without complications.
PR includes:
Changes to the server:
This should have no effect on physics, since the only effect is, that a player can not get instantly refrozen if he sits in freeze after unpause, Instead, the refreezing occurs only after the second that has already started.
Graphics changes:
Checklist