ScratchData LogoScratchData
Back to ksdavidc's profile

AP Physics problems

KSksdavidc•Created July 18, 2021
AP Physics problems
0
0
10 views
View on Scratch

Instructions

This project explores some problems with the ceiling detection part of the Advanced Platformer Physics Wiki http://en.scratch-wiki.info/wiki/Advanced_Platformer_Physics. It omits terminal velocity. That page implements a simple model for allowing a character to jump (up arrow) and fall. This "pull out of the ground and go to zero" model says: If I am falling and touching the ground, pull me out of the ground. If I try to jump and **am not falling (i.e. have neg speed)**, set my velocity to zero. This latter is a kind of ceiling detection, but it has some problems. Some behaviors to notice: One serious problem with this is that the velocity when I am on the ground keeps decreasing infinitely. For simple games this has no effect, but it could cause problems. Less serious, is that when I jump, my speed goes up, but instantly goes to zero, rather than gradually decreasing. Then it goes to -g where g is the gravity, which is this project is -1. However, this is compensated for slightly because the the jump routine lets me jump if I am not touching the ground. For example, if my jump velocity is say 70, then I roughly go 70 0 -g (up arrow) 70 0 -g (up arrow) 70 0 -g (up arrow) to keep climbing. Whether this is desirable or not could depend on the kind of game play you want.

Description

This used to be the version given on the Advanced Platformer Physics page http://en.scratch-wiki.info/wiki/Advanced_Platformer_Physics of the wiki. It has since been superceded.

Project Details

Project ID554098090
CreatedJuly 18, 2021
Last ModifiedAugust 27, 2021
SharedJuly 18, 2021
Visibilityvisible
CommentsAllowed