Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Game effects and image overlays are not handled on death-turn
New Topic New Poll Post Reply
Poster Message
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged

File: BUG REPORT Player effects on death.hold (1.9 KB)
Downloaded 47 times.
License: Public Domain
icon Game effects and image overlays are not handled on death-turn (+3)  
Attached an example hold.

Game Effect commands are not handled on the turn the player dies. This is especially annoying when you have a fake explosion that can kill the player, but it does not display if you're actually killed at it (there's that level in Chance for Paradise).

Similarly, you may be using ImageOverlay for an effect that repeats or changes or moves every turn and it'll disappear the next turn.

I think both should be displayed on the turn the player dies.

____________________________
My website
10-09-2020 at 10:13 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Game effects and image overlays are not handled on death-turn (+2)  
And a PR

____________________________
My website
10-09-2020 at 10:23 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2846
Registered: 07-11-2014
IP: Logged
icon Re: Game effects and image overlays are not handled on death-turn (+1)  
Can confirm in 5.1.1.alpha.2020-10-18 that game effects are displaying on the turn you die.

However the image overlay in 1E in the attached example hold is NOT displaying on the turn you die.
10-18-2020 at 06:47 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Game effects and image overlays are not handled on death-turn (0)  
Interesting, for it worked. Some other change must've regressed it.

____________________________
My website
10-18-2020 at 07:34 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Game effects and image overlays are not handled on death-turn (+2)  
kieranmillar wrote:
However the image overlay in 1E in the attached example hold is NOT displaying on the turn you die.

PR

This was broken by the fix to this. Short version: when advancing image overlay state now a static time is used, which is updated once per frame, rather than just taking current time which can change in between processing overlays. But when the effect is created it accepts "current time" as an argument, which WAS SDL_GetTicks() which in most cases would be a millisecond or two later than the static time mentioned above, causing the effect on the first frame rendering with 0 transparency.

____________________________
My website
10-18-2020 at 08:05 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2846
Registered: 07-11-2014
IP: Logged
icon Re: Game effects and image overlays are not handled on death-turn (+1)  
Took a look at this hold again in 5.1.1.alpha.2020-10-29.

The issue of the image overlay not showing up on death turn is fixed.

But now I have also noticed that the fuse effect does not show up during death turn. It turns out this was happening in alpha 10-18 too as I just double-checked, I guess I overlooked it last time.
10-31-2020 at 06:13 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Game effects and image overlays are not handled on death-turn (+2)  
Okay you asked me to fix fuses when dying so I fixed dying altogether. PR

Here is what happened:
- The old dying animation code would cache the render of some layers of the room and use that when animating player and fading. The issue was that it would cause some effects to be promoted from lower layers, so O-Layer image overlays would suddenly appear on top of everything. This also had some other smaller issues.
- I changed it so that all cases (normal gameplay, double placement and dying) use the same rendering logic, the only difference being some things only appear during certain states, others don't appear during certain states.
- Death fade is smooth now, but also will be slightly more computationally intensive
- All effects continue animation upon death. This should really only have any serious impact on Image overlays, but given how sparingly they were used it should not be a problem.
- Everything will redraw every frame during death animation to avoid any issues with effects and fadeout
- Raindrops/Snowflakes will no longer generate during the time when the game is not animating them, to avoid hundreds/thousands being created and lagging/crashing/looking awful
- Player, dying required hero & killing monsters are now drawn on top of everything, always, and fade has been moved to draw aftere verything else to remove all weird edge cases
- Fuse sparks animate during death animation

____________________________
My website

[Last edited by skell at 11-03-2020 12:08 AM]
11-02-2020 at 02:46 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2846
Registered: 07-11-2014
IP: Logged
icon Re: Game effects and image overlays are not handled on death-turn (+1)  
This all seems good now in 5.1.1.alpha.2020-11-04. I don't see any issues with effects or overlays or death animations.

Something that was always there but I didn't notice until now, when you use Game Effect Swirl, it is always drawn over the player and not at the coordinates where you ask it to draw. I assume that's intended?
11-07-2020 at 11:43 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Game effects and image overlays are not handled on death-turn (+1)  
kieranmillar wrote:
Something that was always there but I didn't notice until now, when you use Game Effect Swirl, it is always drawn over the player and not at the coordinates where you ask it to draw. I assume that's intended?

It's intended but for 5.2 I want to add a swirl that also can be placed.

____________________________
My website
11-07-2020 at 01:11 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Game effects and image overlays are not handled on death-turn
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.