Skip to content
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

Implement idle animations #510

Merged
merged 5 commits into from
May 7, 2021
Merged

Conversation

olanti-p
Copy link
Contributor

@olanti-p olanti-p commented May 5, 2021

Purpose of change

Implement idle animations.
Turns out UDP already has a bunch of them (e.g. for spore clouds), but they went unused as BN lacks relevant code.

Describe the solution

Cherry-picked CleverRaven#40342, then heavily modified it:

  1. Made the code request redraws if there are idle animations on screen (required due to changes from Don't redraw if animations are enabled, but there is nothing to animate #451).
  2. If animations are disabled, fall back to showing the first frame of the animation (instead of random frame).
  3. Added random stagger to trap/item animations to make them look nicer.

Testing

Tested with UDP on:

  1. spore clouds and 'Spore dusted' status effect
  2. lit torches, both wielded and dropped
  3. dissectors

CPU usage stays at ≤1% when none of those are visible, and at ≈8% otherwise.
When animations are disabled, all monsters/items use same tile (and CPU remains at ≤1%).

Additional context

BN-idle-anim

@Proxiehunter
Copy link

I was wondering why Bright Nights didn't seem to have this feature I've seen in Rycon and Vormithrax's vids. Hopefully this build will be available soon.

@Coolthulhu Coolthulhu merged commit d2d53ea into cataclysmbnteam:upload May 7, 2021
@olanti-p olanti-p deleted the port-anims branch May 8, 2021 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants