Book
Week 4 - Section 2 - The Game
Week 4 - Section 2 - The Game
In this section we will learn about Graphics
Chapter 7.1 - I have spaceship
7.1 - I have spaceship, do you want a ride?
Most of the time we do not create objects using the draw command of pygame but we use sprites.
One of this sprites that we will use is a spaceship
Sprites are usually in png or gif format. To use this sprite it must be in the same folder as our program.
Right click on the spaceship and save it or click here.
Also download and open this file (avoid_v0.1) to Thonny. Run the program.
What is the result?
This is another sprite of a meteor
Right click on the spaceship and save it or click here.
Look at the lines 19 and 50 and try to show (blit) the meteor inside the screen.
Can you show multiple rocks?
You can download the code from here to display the spaceship.