Singularity Generator rattles when hit#5788
Open
SteelBlueZK wants to merge 1 commit into
Open
Conversation
Imagine a baby playing with the most powerful physics.
sprunk
reviewed
Jul 13, 2026
| local abs = math.abs | ||
| local rand = math.random | ||
|
|
||
| local SPRING = 0.18 -- Pull toward center |
Member
There was a problem hiding this comment.
this will bite us in the ass during some mass string replace action in 15 years
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.
Imagine a baby playing with the most powerful physics.
The orb in the middle of singu will now respond to enemy attacks, bouncing away from the impact and springing back towards the center. When it gets pushed close enough to the arms, the ball shrinks to avoid egregious model clipping. The y-axis jiggle is randomly generated, because the engine does not pass the vertical component of the impulse vector. As the Singu scales from 100% to 20% HP, the spring dampening, or resistance to permanently jiggling, decreases, so a near-death Singu has a much more noticeable jiggle for longer.
I've tested this with about 12% of the unit roster, and the animation seems sane and fun about 99% of the time.
Disclaimer: PD boilerplate code written by chatgpt, but fine tuning and other formula are all me.