Skip to content

Practicing Python, OOP in Python, AI-assisted coding, and basic game techniques using PyGame

Notifications You must be signed in to change notification settings

ihouwat/pygame-learning

Repository files navigation

Same Again!

Goal

I wanted to practice Python in an unfamiliar domain. I chose PyGame since I've never done any game development before.

Learnings:

  • Coding in Python
  • OOP in Python (see scratchpad for notes)
  • Using Github Copilot: first time I've used the AI-assistant extensively for a project, and I had to learn how to prompt it effectively. This exercise ended up being a great way to learn about the tool and Python at the same time.
  • Basic game design: PyGame library (see tutorials folder), the game loop, drawing, events, game states, thinking in terms of single frames, etc.

The Game: Same Again!

Same Again! is a matching and language skills game for my toddler. When she loves something, she'll keep asking for it, 'same again! same again!', hence the name :)

Each puzzle in the game asks the kiddo to match an item against four options. The puzzle is preceded by a spoken word in a target language (English, Portuguese, or Arabic) in order to teach her new words and reinforce the matching skills. The items to match can be images or colored shapes as the levels progress. The game is designed to be played with a parent, who can help the kiddo learn the new words.

See the demo below (note that the frames are janky and the sound quality low only due to recording on my machine. Be sure to unmute the audio):

same-again-demo.mp4

Game Play

  • Mouse left button selects the correct answer
  • Escape key opens a menu where a player can:
    • set their name
    • set the target language
    • start a new game
    • quit the game

Attributions

Icons

Music

Sound Effects

About

Practicing Python, OOP in Python, AI-assisted coding, and basic game techniques using PyGame

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages