Thanks for that, I had that as my jump code for a while but it doesn’t feel natural it’s just teleporting, would there be a way using a timer that I can make the character move up let’s say 1 pixel with a time interval of 10? Would I have to do it a different way?
I’ve seen in unity tutorials people coding gravity and people recommending gravity code to make physics in my 2d platformer I’m coding. Does anyone have any idea how I could go about coding gravity without chang8ng the sprites heading and giving the player as much movement control as possible. (preferably like brawhalla or super smash bros movement)
TimeInterval of 10 ms? Not really practical with App Inventor's slow graphics. 300 ms is ave. duration of an eyeblink. You would make your device cpu cry. Regarding ' doesn’t feel natural it’s just teleporting,' .. how should the ball jump naturally. Provide an example.
How would I go about coding the player sprite to start going down after it hits Y = 450 without it canceling our with the “if TestSprite Y ≠ 450, Set TestSprite Y to TestSprite Y - 1” And also why is the Y axis inverted, I have to make the players Y go down to make him go up.
Keep a separate variable for the number you subtract from Y called deltaY (initially 1.)
To reverse direction, set that variable (call it deltaY) to negative(deltaY).
How would I go abound making a solid object on my test area for the player to jump on, and I also want another one the player can move but make them both solid objects
One way would be to place the 'solid' object as the background to the Canvas. Not really solid but the techniques in Creating Animated Apps can be used to make the pixels associated with the object behave like one. Additionally, you can check the pixel color of an area of the Canvas to determine whether a ball or a sprite attempts to land on or cross the boundary. A maze would be one application... have you checked the MIT Gallery for examples Find the Gold Maze App - Challenge Part