Pygame
Grey overlay
Pink
Green
Blue
Cream
Liliac
Purple
Yellow
Homework 1: Shapes
Learn It
- In lesson 1, you had tried drawing different shapes using code.
- Mary has been experimenting with pyGame at home, and added these lines of code:
- NOTE: The first 4 lines are comments that explain how the shapes are drawn
- NOTE: Remember that you can always re-visit the week 1 notes for a reminder of how the code works.
# pygame.draw.rect(screen, colour, (x, y, width, height), thickness) # thickness is optional filled shape if specified # pygame.draw.circle(screen, colour, (x, y), radius, thickness) # pygame.draw.line(screen, colour, (startX, startY), (endX, endY), thickness) pygame.draw.rect(screen, white, (100, 100, 100, 40)) pygame.draw.rect(screen, white, (125, 140, 50, 50)) pygame.draw.line(screen, white, (100, 80), (200, 80), 2) pygame.draw.circle(screen, white, (150, 50), 10, 2)
- Sketch out the shape that is drawn onto the screen when the code runs. The first is done for you.
- The first shape is a rectangle, which starts being drawn from x=100, y=100.
- The size of the rectangle is 100 pixels wide and 40 pixels tall.
- To complete the task, you can use MS Paint, an app or complete the task on paper and photograph it with a phone.
- Upload the finished sketch to the first homework upload slot at www.BourneToLearn.com
Homework 2: The Games Industry
Learn It
- The gaming industry is huge, and worth billions of pounds a year.
- Read this article, Then answer the following questions:
- Describe three tips for getting a job in the gaming industry.
- Name three different job roles within the games industry.
- Upload your answers to the second homework upload slot at www.BourneToLearn.com
Homework 3: Key terms
Learn It
- You've used a lot of new vocabularly in working on this project, and coding in general.
- Provide definitions (in your own words) for each of the following:
- parameter
- RGB colour
- Blit
- Event listener
- Event handler
- Pseudocode
- Sprite
- All of these terms can be found within the notes for the first six lessons.
- Upload the finished work to the third homework upload slot at www.BourneToLearn.com