Code a Gesture-Controlled Snake Game
Channel: The Assembly
Date: 2021-09-25

Everyone remembers Snake, the very simple but highly addictive game that came preloaded on our old Nokia mobile phones - the objective was to maneuver a ‘snake’ (just a line of pixels that acted as its own primary obstacle and kept growing as the game went on) in a bordered plane in pursuit of items to ‘eat’ (more pixels).

In this session, we’ll show you not only how to develop the game anew in Python using Pygame, but also add a unique twist: we’ll control it solely with gestures without the need for tactile input of any sort.  To do this, we’ll build upon computer vision techniques (via OpenCV and MediaPipe) we used in earlier sessions for hand pose estimation and gesture control.

Prerequisites:
✅ Visual Studio Code (https://code.visualstudio.com/download) 
✅ Python (https://www.python.org/downloads) 
✅ pip install: OpenCV (https://pypi.org/project/opencv-python/), Pygame (https://pypi.org/project/pygame/), MediaPipe (https://pypi.org/project/mediapipe/)

GitHub Link: https://github.com/The-Assembly/Code-a-Gesture-Controlled-Snake-Game
-----------------------------------------

To learn more about The Assembly’s workshops, visit our website, social media or email us at workshops@theassembly.ae

Our website: http://theassembly.ae
Instagram: http://instagram.com/makesmartthings
Facebook: http://fb.com/makesmartthings
Twitter: http://twitter.com/makesmartthings