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

Smarter animation delays + UI popups with a "hourglass" #21562

Merged
merged 7 commits into from Aug 13, 2017

Conversation

Projects
None yet
5 participants
@codemime
Member

codemime commented Aug 5, 2017

Overview

Sometimes the game appears to be hanging for no apparent reason, but it, actually, isn't. The main reason of the "hangs" is invisible animation (if it's enabled, of course). It's invisible either to the player's alter ego or to the player themselves (because it's played beyond the screen bounds). Here are some frequent examples:

  • An automatic turret is shooting at zombies behind the corner.
  • A massive explosion somewhere indoors.
  • Either of the above, taking place beyond the screen bounds.

This PR mitigates (if not resolves) the issue.

Observable behavior

  • Invisible animations aren't played (no delays).
  • Visible animations are followed by animated popups.

wait

  • The popups were added to the following:
    • explosions
    • shooting / throwing
    • sleeping
    • "death monitor"
  • There was a noticeable "hang" after starting sleeping. It was there because the screen gets redrawn only after 30 ingame minutes. Now it's redrawn immediately.
  • There was also flicker in the "death monitor" mode. Now the flicker has gone as well.

hang_on
death

Implementation details

Nothing so exciting.

@Leland

This comment has been minimized.

Show comment
Hide comment
@Leland

Leland Aug 6, 2017

Contributor

This is weird but: with these changes the box displayed on the active tile when examining isn't shown. I'm running this on a Mac – it's visible on master but not here.

Contributor

Leland commented Aug 6, 2017

This is weird but: with these changes the box displayed on the active tile when examining isn't shown. I'm running this on a Mac – it's visible on master but not here.

@pisskop

This comment has been minimized.

Show comment
Hide comment
@pisskop

pisskop Aug 6, 2017

Contributor

those delays are big hints that trouble is afoot nearby. perhaps an onscreen warning or something more noticeable than one line of text on the hud log?

Contributor

pisskop commented Aug 6, 2017

those delays are big hints that trouble is afoot nearby. perhaps an onscreen warning or something more noticeable than one line of text on the hud log?

@Coolthulhu

This comment has been minimized.

Show comment
Hide comment
@Coolthulhu

Coolthulhu Aug 6, 2017

Contributor

those delays are big hints that trouble is afoot nearby.

Delays shouldn't be happening for things that are not seen. A line in the log describing the skipped delay would be fine, but relying on delay to convey any information is inherently wrong.

Contributor

Coolthulhu commented Aug 6, 2017

those delays are big hints that trouble is afoot nearby.

Delays shouldn't be happening for things that are not seen. A line in the log describing the skipped delay would be fine, but relying on delay to convey any information is inherently wrong.

@kevingranade kevingranade merged commit 83b067b into CleverRaven:master Aug 13, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.06%) to 22.881%
Details
gorgon-ghprb Build finished.
Details

@codemime codemime deleted the codemime:hangon_anim_popups branch Aug 13, 2017

@Leland Leland referenced this pull request Sep 14, 2017

Merged

[RDY?]Add loading UI #21867

4 of 4 tasks complete

kevingranade added a commit that referenced this pull request Feb 2, 2018

Revert #21562.
This causes the terrain window to be drawn twice needlessly under numerous circumstances. Does not fix #22839.

kevingranade added a commit that referenced this pull request Feb 3, 2018

Revert "Revert #21562."
Missing wrefresh() calls caused failure to update map in some areas.

This reverts commit 1299402.

Night-Pryanik added a commit to Night-Pryanik/Cataclysm-DDA that referenced this pull request Feb 4, 2018

Merge branch 'master' into bionics-installing-overhaul
* master: (30 commits)
  Prevented spilled liquids from appearing in NPC trade menu
  [RDY] Remove rock-filled rooms in mansion basement (CleverRaven#22850)
  Add missing output.h include.
  Revert CleverRaven#21562.
  Remove unnecessary include of "cursesdef.h" from "output.h"
  Remove unused struct tile_drawing_cache
  Remove unused struct tile
  Remove include of "output.h" from some headers that don't need it
  Remove now unused class copyable_unique_ptr
  Change player_morale_ptr to plain pimpl<player_morale>
  Convert usage of copyable_unique_ptr to pimpl implementation:
  Convert submap::comp to a plain std::unique_ptr
  Store item slot objects in cata::optional wrappers
  Replaced add_spawn() with place_spawn() and also normalized usage of SEEX/SEEY
  Added monster groups to json
  Fix cata::optional::full not being initialized
  Fix cata::optional::emplace not returning anything
  Move implementation of inventory_selector_preset::cell_t::get_text into cpp file.
  Change Creature::replace_with_npc_name to use disp_name directly.
  Move implementation of Creature::replace_with_npc_name into the cpp file.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment