Our first march 2022 camp has officially come to an end. We are thankful for all our students who participated.
Jayden, one of our camp students, learned how to create a shooting game in python in just a week.
HOW THE GAME WORKS:
When the game starts, a fruit (it can be an apple or any other fruit that a student chooses) will appear on the screen. The student, acting as the player, needs to ‘shoot’ the fruit by clicking it using the mouse. A successful shot will display a pleasant message saying ‘Good shot’. The fruit will then disappear and reappear in another location. However, when the player misses a shot, the message ‘Missed shot’ will appear and the game will come to an end.
WHAT CODE FUNCTIONALITIES WERE USED AND HOW?
- A student needed to understand who actors are and how to display them
- A student needs to understand basic inbuilt functions such as ‘draw’ which PyGame uses to display elements on the game window
- To make the game interactive, the student needed to understand how to use their mouse to ‘shoot’ the fruit. In PyGame, this is normally handled by the function ‘on_mouse_down()’.
The student plays a lot of games and watches a lot of anime. Being able to learn how to create even a simple game made him feel accomplished.
Leave A Comment