Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

This is really cool and creative !!

Loved the animation, style, music, everything. Very interdimensional trash tv.

Curious how you detected the stretch of arms and legs. I think it simply detects the distance of the original position to the current position. But how it stretches is nice, i kinda wanna learn more about that.

Brilliant game

(1 edit) (+1)

Thanks for playing the game!

The stretch detection for Mr Strong is simple, it's just if you triggered the stretch. I don't check the distance although I did at one point but I felt like it slowed the game down so I dropped it.

The actual stretch is a bit more complicated. Using Godot, I created a 2D skeleton and rigged the sprite (its just a single sprite). After I created a dictionary that holds information about the chain of bones for each limb. Next the bones run ithrough an IK system I wrote. The IK system works like this:

  1. Gets all the limb data from the chain (bone positions, velocities, lengths) and find the root bone anchor point (shoulder/hip)
  2. Check if the limb is being dragged by the mouse
  3. If dragging pull the end-point of the bone chain towards the mouse
  4. Apply damping and update positions based on velocity
  5. Next I do multiple iterations of the following for stability: 
    1. Ensure each bone maintains its correct length by adjusting connected joints
    2. Pull bones toward their desired lengths.
    3. Keep the root bone attached to it's anchor point
  6. Convert the new simulated bone positions into the bone transforms

  7. Workout bone rotations by looking at the direction between joints

  8. Clamp/limit angle changes to prevent some jank 

  9. Lerp angle on the rotations for a smoother movement.

I hope that helps with some understanding and direction if you ever try to build your own IK system.

(1 edit) (+1)

WOAHHHH This is really informative!! Thank you Alarm Mouth !!

I am saving this hehe