Repository navigation
Hilo abilities - #3131
Draft
manuq wants to merge 6 commits into
Draft
Hilo abilities#3131manuq wants to merge 6 commits into
manuq wants to merge 6 commits into
Conversation
Connect it in _ready() instead of in each projectile scene. All the projectile scenes did it the same way, and a scene made by copying one could miss it. This is from prior discussions with Will. The diff here shows that indeed doing the connection from the Signals tab adds redundancy in this case.
The physics engine applies constant_force on each physics step, so update it there instead of on each frame. This makes the projectile more reliable on slow devices, where several physics steps can pass between frames.
Like the walk behaviors do for characters, move the speed toward a target on each physics step, by a new speed_step: speed, or hit_speed after being repelled. Keep the direction, which comes from the bounces and the homing force. Projectiles no longer lose speed to the default linear damping over their life, and homing projectiles no longer speed up while they turn toward their target. They turn at a steady speed instead, which makes them easier to read and to repel.
So the projectile goes in the exact direction it was repelled, and the player can aim it. Remove the homing force too, since it stays applied until changed.
To be used by a new player ability that slows down the projectiles that come close, so they are easier to repel. It comes from Luto's blessing in El Hilo que no tejí. While slowed down, the projectile moves toward a new slowdown_speed, or its speed if that's lower. Like the stopping and moving steps of the walk behaviors, add a slowdown_step for when the projectile is faster than its target speed, and keep speed_step for when it's slower, so the two can be set up differently. Being repelled clears the slowdown.
|
Play this branch at https://play.threadbare.game/branches/endlessm/hilo-abilities/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.