L06 ยท T2 Week 3 ๐ŸŽฏ CT5-DPM-01 ยท CT5-THI-01 ๐Ÿ“‚ Phase 2 โ€” Alien Invasion ยท Ch 12 Ship + Bullets

Lesson 6: Ship Image + Ship Class (Matthes Ch 12 ยง4)

Learning Intentions

Success Criteria

๐Ÿ“ Do Now โ€” Error of the Day

Download ship.bmp from the hub's checkpoints folder. Put it in your game folder (same place as alien_invasion.py). The file name must match EXACTLY.

๐Ÿ‘ I Do โ€” Teacher Demo

Live-code the Ship class: image.load, get_rect(), rect.midbottom = screen_rect.midbottom. Draw a diagram of Rect properties (x, y, right, bottom, midtop, midbottom, center).

๐Ÿค We Do โ€” Build Together

Class types along: everyone gets a Ship class + a ship sprite visible at bottom-centre. Raise hand when yours appears. Test different starting positions.

๐Ÿš€ You Do โ€” Your Turn

Complete the Ship class. Experiment with Rect properties โ€” try top-centre, centre, off-screen. Arcade quests below cover image loading + Rect basics.

  • Download ship.bmp from the hub
  • Build the Ship class (type it)
  • Create ship = Ship(screen) in main
  • Call ship.blitme() in game loop after screen.fill()

๐ŸŽฎ Practice Quests โ€” work through these

Loading practice quests for this lesson...

Three tiers โ€” pick yours

Support

ship_class_starter.py with blitme method pre-written. Visual diagram of Rect

Core

Follow the plan as written. Attempt the arcade quests above at your own pace.

Extension

Complete all quests above + try a Boss battle for bonus XP. Help a classmate if you finish.

Extensions

๐Ÿ“ Exit Ticket โ€” Coding Journal

Journal: what did it feel like seeing your first Pygame sprite on screen?

Evidence of Learning

Ship sprite visible at bottom-centre.

โ† PreviousLesson L05โ†‘ HubAll LessonsNext โ†’Lesson L07