Skip to content

Introducing "Save the Pig" - where an adorable little pig need your help to dodge rockets. When you're happy, the game level increases making the game a little more challenging. But when you feel sad or angry, the game level decreases making it easier to score!

Notifications You must be signed in to change notification settings

innocentmchry/SaveThePig

Repository files navigation

Indian Institute of Technology Guwahati

Welcome to the repository documenting my work as a Summer Research Intern at the Indian Institute of Technology Guwahati. During this internship, I had the opportunity to work on a project that involved utilizing Android Studio and various technologies to create an Affective Gaming experience on Android.

Project Overview

The primary goal of the project was to explore the integration of emotion recognition and facial detection functionalities into an Android game. This involved the use of Android Studio's robust development environment, Canvas for graphics rendering, OpenCV for facial detection, and TensorFlow Lite for emotion recognition.

Introducing "Save the Pig" - where an adorable little pig need your help to dodge rockets. When you're happy, the game level increases making the game a little more challenging. But when you feel sad or angry, the game level decreases making it easier to score! The GameView class encapsulates the logic for a simple mobile game where players control a pig character to avoid falling rockets. The view, initialized with bitmaps for background, ground, and pig, manages game elements such as points, life, and multiple levels. Touch input allows players to maneuver the pig horizontally, while the game adjusts difficult based on consecutive emotion detections, influencing number of rockets. A health bar reflects the pig's remaining life, and the class uses a handler to delay level changes for smoother transitions.

Technologies Used

  • Android Studio: Leveraged the powerful Android Studio IDE for Android app development.
  • OpenCV: Integrated OpenCV to enable facial detection within the Android application.
  • TensorFlow Lite: Incorporated TensorFlow Lite to implement emotion recognition functionality in the game.

Project Highlights

  • Affective Gaming: Explored the concept of Affective Gaming, where the game responds to the player's emotions and facial expressions.
  • Graphics Rendering: Utilized Canvas to enhance the visual appeal of the game and create an engaging user experience.
  • Facial Detection: Implemented facial detection using OpenCV to track and analyze facial features during gameplay.
  • Emotion Recognition: Integrated TensorFlow Lite for real-time emotion recognition, allowing the game to adapt based on the player's emotional state.

Demo

Activity.-.Innocent.Mochahari.mp4

Getting Started

To explore and run the project on your local machine, follow these steps:

  1. Clone the repository to your local machine.

  2. Open the project in Android Studio.

  3. Ensure that you have the necessary dependencies installed, including OpenCV and TensorFlow Lite.

  4. Build and run the project on an Android device or emulator.

Acknowledgments

I extend my sincere gratitude to the Indian Institute of Technology Guwahati for the invaluable opportunity to contribute to this thrilling project. Special thanks to my mentors, Dr. Samit Bhattacharya and Mr. Nilotpal Das, for their unwavering guidance and support during the internship. I am also grateful to Dr. Ranjan Maity for providing me with the opportunity to work on this impactful project.

Happy coding! 🚀

About

Introducing "Save the Pig" - where an adorable little pig need your help to dodge rockets. When you're happy, the game level increases making the game a little more challenging. But when you feel sad or angry, the game level decreases making it easier to score!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages