This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-05-16 15:52:15

Freestylin_Monkey
Scratcher
Registered: 2008-03-24
Posts: 100+

I have a question

in my game jumperoo, when i land on some platforms the foot kind of goes through the floor, although the character doesnt, yet some platforms the foot goes right on top of the platform which is great, is there something i can do about it?

here check it out

http://scratch.mit.edu/projects/Freestylin_Monkey/165459


I am Lord of Lords, I am King of Kings, I AM MASTERS OF ALL MASTERS!!!
-But I am a servant of my mother

Offline

 

#2 2008-05-16 15:58:06

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: I have a question

Whats happening, I imagine, is that your downwards movement steps are sometimes so big that your characters foor moves from "not touching the platform" to "partway into the platform" in one step.

You can not directly avoid this without having fixed falling speeds, but you can hide the fact that it happens by checking how "deep" into the platfrom your character has sunk, and if too far, moving them back up.  If you do this with a hidden "sensor sprite" you can actually have the sensor sprite move back out of the platform before the character sprite moves to it, so that the character sprite doesn;t appear to jiggle up and down.

I think thats the method I used in my "complex jumping demo" though it has been a while since i looked at the code for that...


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

Board footer