Skip to content

burcia1711/computer-vision-games

Repository files navigation

Computer Vision Games with Pygame

Welcome to my learning repository!

This repo is for building simple computer vision-based games using Pygame, gradually moving towards OpenCV-powered interactions.

Each folder demonstrates different features, mechanics, and interactions commonly used in game development and vision-driven applications.

📂 Repo Structure

  • background/ — Handling game backgrounds, loading and displaying scenes.
  • basic/ — Basic game screen, loops, and fundamental mechanics.
  • collision_detection/ — Detecting collisions between objects, boundaries, and players.
  • game_border/ — Setting up and managing game boundaries.
  • hand model/ - Hand tracking and landmark.
hand.mov
landmarkhand.mov
  • images/ — Handling images (sprites, backgrounds, icons, etc.) throughout the games.
  • keyboard/ — Implementing keyboard input for player controls and actions.
  • mouse/ — Implementing mouse input and getting coordinates.
  • music/ — Adding background music, sound effects, and audio feedback to the games.
  • read & show/ - Image reading, showing and other basic operations using OpenCV.
  • text/ — Displaying text elements (such as scores, messages, and UI) inside games.
  • webcam/ - Accessing webcam.
  • webcamAsGameWindow/ - Using webcam as the game window.

🚀 Current Features

  • 🎮 Game mechanics built from scratch with Pygame.
  • 🖼️ Integration of images.
  • 🎵 Music and sound management.
  • 🧠 Collision detection.
  • ⌨️ Keyboard and mouse event handling.
  • 🧱 Game border creation.
  • 📝 Text and font rendering.

📚 Purpose

This repository is part of my personal learning journey on:

  • Computer Vision 🌟
  • Interactive Games 🎮
  • Camera-Based Applications 📷
  • Python Game Development 🐍

I'm starting from the basics of Pygame and moving toward integrating OpenCV for more dynamic, vision-driven gameplay.

🔧 Requirements

Install necessary packages:

pip install pygame opencv-python

🕯️ Catching Candles Game :)

(under firstGame/ folder) A simple game where a candle randomly appears on the screen, and the player uses their index finger landmark (via webcam hand tracking) to catch it. Each time you collide with the candle, it jumps to a new random position. Fun and minimal! And Victorian :)

catchCandles.mov

🌟 Future Goals

  • Full hand gesture control for mini-games
  • Object tracking as a controller input
  • Game mechanics based purely on computer vision without keyboard/mouse
  • Create a simple mini-game fully controlled by your webcam 🎮

🎯 Stay tuned as I continue building!

About

learning pygame

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages