• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

wondering if there is any tutorials for a player shadow in a plattformer

ETHC33

Member
what i'm looking for here is something like a semi transparent circle that would be under the player. If i'm jumping id like it to shrink and when im falling id like it to grow. always on the ground below the player. Is there any tutorials for this? maybe at least something to point me in the right direction? just wondering. thanks for any help
 

Slyddar

Member
You can do this using a map script (sometimes called remap), which basically takes an input and lets you map it to another value based on the range of another set of data. @samspade has this tutorial on how it works - https://forum.yoyogames.com/index.php?threads/map-remap-values-from-one-range-to-another.59699/

If you use that script and remap the scale of the shadow sprite based on the players vsp, you could make it shrink as they jump, and grow as they fall. It's actually exactly how I've used it for the same effect you are after.
 
Last edited:

ome6a1717

Member
One thing you might want to look into is called "raytracing". It basically sends a collision line from point a to b, and then stops once it hits an object (and returns that position). Then you could just raytrace from the bottom of the player down below the screen. For shrinking the shadow you could potentially just use distance or what @Slyddar recommended.
 
Top