Build A Catapult
In this tutorial, you will build a catapult to launch a ball from one side of the stage to the other, as in the game Angry Birds. You’ll make the ball trace its trajectory and program arrow keys to let you aim the ball. If time allows, you can turn your project into a game by adding a target.
For this tutorial, you will use GP, a new blocks-based language similar to Scratch. The name “GP” stands for “general purpose” because, like Python, Java, and C++, GP can be used for a wide range of programming tasks.
Print this two-page guide or open it in another browser tab:
Start GP by clicking the link below and start building!
NOTE: GP does not save your program in the cloud automatically. Be sure to save your work as you go by clicking the “Save” button. That will download your program to your computer so you can come back to it later.
Save your GP program, if you haven’t already done so. It will be saved in your browser’s “download” folder as a file ending in “.gpp”. To return to it later, start GP using the link above, then drag and drop your program onto the GP browser window to load it.
Visit the Hour of Code website to claim your certificate:
Get Your Certificate
If you like GP and have a Windows, Macintosh, or Linux computer, you may wish to download the stand-alone GP application, which offers better performance and makes it easier to save and open GP project files:
If you enjoyed this tutorial, you might enjoy some of the other GP tutorials: