[InFine] Inadvertent background animation
The background flats used for the background of the EP2 and 3 ending text animate when the menu isn't open. Open the menu and they stop animating. Close it and they start animating again.
In the original Heretic and earlier versions of Dday, they didn't.
Labels: User Interface, Materials
#1 Updated by danij about 11 years ago
This is a side effect of the new global materials system introduced in 1.9.0-beta6. As materials are animated automatically, without the game knowing about it there is no way for the game to specify that there should be no animation.
I'm not going to tackle this until the work on DED Reader 2.0 has been completed because the proposed inheritance and derivation features will make addressing this problem much easier (if we allow games to derive new materials dynamically at runtime; this issue can be resolved by cloning whatever material name is used as the background, disabling the animation in the clone and draw using that material instead).
#7 Updated by skyjake almost 7 years ago
As materials are animated automatically, without the game knowing about it there is no way for the game to specify that there should be no animation.
With regard to #1507, this sounds like a feature needed for the materials system (flag to pause animation if game time is paused or InFine time is paused).
#8 Updated by danij almost 7 years ago
My long term plan for the material system is to allow new materials to be defined on the fly and not just during startup. Rather than provide a mechanism for material behavior to alter based on some external logic (in this case, pausing the animation until the game logic says so), my plan was to instead to implement the pause by dynamically deriving a new material variant with no animation.
This should achieve the same end result while keeping the architecture clean.
#9 Updated by skyjake almost 7 years ago
I see. From an external point of view (let say in the InFine implementation), one shouldn't have to worry about this detail, though: the material should simply stop if the time in the relevant context stops. How is this handled in your plans?
libdeng2 there is the
Clock class that represents a time source. To me it sounds like a nice solution if it was possible to specify per material which
Clock to use as a time source. (Consequently, only animating materials would be observing a
#11 Updated by danij almost 7 years ago
In the above situation InFine would opaquely generate a new material variant specific to the context/scope of the script. (In practice one would request a variant appropriate to a context-config from the base
Material). The same mechanism could be used for other scoped contexts, e.g., map, UI, etc...
Simply switching the
Clock would appear to be a nice solution but how would we handle situations where multiple contexts are visible at once (e.g., InFine animation overlaid on top of the game world)?
#12 Updated by vermil almost 7 years ago
Pardon me for interfering, but I am wondering, if Skyjake is misinterpreting the issue here:
In Vanilla Heretic and pre-material system Dday, the background flats used on the E2-3 ending never animated. In Dday they are animating because they happen to be flats used in an animated flat sequence.
#15 Updated by vermil almost 7 years ago
- Tags changed from InFine, Menu, Animation, Heretic to InFine, Menu, Animation, Heretic, Doom2
I forgot that Doom2 Map20's intermission text background is also an animating flat. Given Doom is a higher priority than the other games symbolically, I thought I'd mention it.