Skip to content

Singularity Generator rattles when hit#5788

Open
SteelBlueZK wants to merge 1 commit into
ZeroK-RTS:masterfrom
SteelBlueZK:singurattle
Open

Singularity Generator rattles when hit#5788
SteelBlueZK wants to merge 1 commit into
ZeroK-RTS:masterfrom
SteelBlueZK:singurattle

Conversation

@SteelBlueZK

Copy link
Copy Markdown
Contributor

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.

Imagine a baby playing with the most powerful physics.
Comment thread scripts/energysingu.lua
local abs = math.abs
local rand = math.random

local SPRING = 0.18 -- Pull toward center

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will bite us in the ass during some mass string replace action in 15 years

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants