4 Shooting Hoops with Gravity

Alphabet-many platformer games, such as Super Mario Bros. and Sonic the Hedgehog, show the action from the side, with the ground at the bottom of the screen and the character appearing in profile. These games have gravity: characters can jump up and then drop until they land on the ground. In this chapter, we’ll write a basketball game that has gravity. The player will jump and throw a basketball, and the basketball player and ball will drop to the ground.

Before you start coding, look at the final program at https://nostarch.com/scratch3playground/ ...

Get Scratch 3 Programming Playground now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.