This repository was archived by the owner on May 13, 2025. It is now read-only.
Add warp paintings - #176
Draft
Koopa1018 wants to merge 74 commits into
Draft
Conversation
Very important to have a function you can be 100% sure will run at the very end of the animation (rather than remembering if the animation ends one frame before _animation_length() or not). Also, I notice a common theme with InteractableWarp animations: frame 0 set player graphics, all other frames do special logic. _begin_animation() makes that pattern a little more elegant.
Docstring is much more formalized and much more readable now. Also clears up some ambiguities that existed about animation timing, etc.
Found in the pause menu's star map graphics. These will be nice when proportioning the thing.
Bout what you'd expect it to be.
Very important to have a function you can be 100% sure will run at the very end of the animation (rather than remembering if the animation ends one frame before _animation_length() or not). Also, I notice a common theme with InteractableWarp animations: frame 0 set player graphics, all other frames do special logic. _begin_animation() makes that pattern a little more elegant.
Docstring is much more formalized and much more readable now. Also clears up some ambiguities that existed about animation timing, etc.
Painting is an InteractableWarp, like doors and pipes. It responds to the "up" input. Animation is not at all complete.
...Which actually directly calls player jump logic! Makes for a very accurate jump.
Feels weird to modify the player script to make cutscenes work nicer, but it's still a whole lot more elegant than copying the actual velocity-modify logic into the painting script.
now that I have that ability.
Was allowing player to jump in when solidly outside the frame.
Not implemented yet
Makes the painting entry look serviceable, at least.
...also remove the 99999x99999 water polygon so the game doesn't crash when the test map runs XP
For smaller paintings.
Need to be able to set the graphic, eh? ;) Picture and Frame are separately configurable. The idea is, picture has to be able to ripple without rippling the frame as well. This will be the simplest way to do that, I think--separate picture and frame sprites.
...so that we can mark child classes as Tool without causing on-scene-load problems.
Can't use toolscripts, blah.
This reverts commit 335912b. Feel like it's not my place to make a change to Interactable.
Annoying if you're passing by and you jump and accidentally get sucked into the painting.
I figured I would have to write this from scratch, but. Turns out it was here all along and I just didn't know it 🤦
Burnaway clips the troughs of the painting away to white. It's definitely a very particular effect.
Decays away slowly if changing scenes, fast if not.
- Longer entry animation in both cases. - Slow down ripple decay rate in scene-change mode. - Calculate ripple origin from player position. - Use burnaway during entry flash. - Ensure all shader params are reset at the proper times.
First, it's now truly branchless. Second, the burnaway mask is actually used (that took some work to get locked into a (0,1) slider range). And third, let's separate the timing for the burnaway half of the flash from the non-burnaway half!
And a stronger effect still looks nicer for in-level warping.
Creyon suggested. Does indeed look nicer. Designed so the player doesn't land in the exact center, but rather on an imaginary line across the center.
If the burnaway lags on the final frame, the transition looks pretty awful--freezing on a frame with a little painting left, then smashing to a frame where the scene has already started reappearing, meaning there's no frames of solid white in between. Easiest way to avoid this is to have the burnaway end before scene loading is even thinking of beginning.
Having the material constantly attached to all paintings, as I feared, leads to every painting rippling in sync. Easiest fix is to just keep most paintings' materials unset by default, and only load it onto the ones which are about to come active. If multiplayer is needed, each painting could instantiate a copy of the material before it uses it. This works fine for now, though.
I'm expecting non-square paintings to show up in at least one spot, so it'd be a good idea to explicitly keep the shape's outline from rippling.
Here's hoping I'll be able to manual-merge this sheet when the time comes to merge in the pound-spin windup pose from the pound feedback branch!
These may hopefully become tooltips one day. In the meantime, there should be some documentation on how to use these.
Proper tooltips! Yaaaaay
extension change for shader--tiny papercuts all over the place, aaaaah (also load the material in GD4)
Contributor
|
How's the progress on this? Is a new jump-in animation needed? If so, I'll need to notify the art team. |
"don't" is correct instead of "doesn't" in this case.
Been a while since I made this change, but IIRC Godot 4.1 is not fond of this construction (reading `PlayerCharacter` constants from `body` instead of `PlayerCharacter`).
Collaborator
Author
|
Stopped work because the 4.1 upgrade broke interactables which respond to Jump-in animation needed for sure, but due to the above, priority is debatable. |
Mercifully, it seems like there was no data loss this time. I also moved Mario to the end of the hierarchy, in an attempt to fix paintings' not responding. Didn't end up doing anything, but it was worth a shot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Adds enterable warp paintings, complete with a fancy entry animation.
Under the hood, paintings are based on the same class as doors and warp pipes. Press "enter" button -> play entry animation -> go to new scene, or elsewhere in the current scene.
The entry animation is quite involved, featuring a shader with a painting-ripple effect, as well as an entirely new type of screen transition (see
white_warp.gd). The specifics of the animation depend on if the painting leads to a new scene:WindowWarptransition.)Before review: