Skip to content

This is the Space Invaders Game created by me in Python using turtle module and OpenCV Object-Tracking.

Notifications You must be signed in to change notification settings

Vaibhhav7860/Space-Invaders-Game-in-Python-using-Object-Tracking-OpenCV

Repository files navigation

Space-Invaders-Game-in-Python-using-Object-Tracking-OpenCV

This is the Space Invaders Game created by me in Python using turtle module, OpenCV Object-Tracking and PyAutoGUI.

TURTLE MODULE :.

All the functionality of the game is added using Turtle Module.

Turtle Key Bindings :-

  1. LEFT ARROW KEY ---------> For left movement of spacebar
  2. RIGHT ARROW KEY --------> For right movement of spacebar
  3. SPACE BAR KEY ----------> For firing
  4. A KEY -----------------> For firing
  5. S KEY -----------------> For Starting the game

SOUND MODULES :-

  1. Winsound :- This module is used for addding collision sound, firing sound and game over sound.
  2. Playsound :- This module is used for adding background music to the game.

OPENCV OBJECT DETECTION AND TRACKING :-

Object Used :- Highlighter

We are detecting the green color of the cap of the highlighter , tracking its motion and finding the direction of its motion.

  1. LEFT ARROW KEY ---------> WEST
  2. RIGHT ARROW KEY --------> EAST
  3. SPACE BAR KEY ----------> NORTH
  4. A KEY -----------------> SOUTH

PyAutoGUI MODULE :-

We are making the respective key presses using PyAutoGUI Module when different directions are detected.

  1. NORTH ---------------> SPACE BAR KEY PRESSED
  2. SOUTH ----------------> A KEY PRESSED
  3. EAST ----------------> RIGHT ARROW KEY PRESSED
  4. WEST ----------------> LEFT ARROW KEY PRESSED

I am open to any type of improvements which you can suggest. So, don't hesitate in making your contributions in this project as pull request is open for all.

About

This is the Space Invaders Game created by me in Python using turtle module and OpenCV Object-Tracking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages