Cool ProjectsGeneral

Stardew Valley Villager Recognition and Gift Preferences Bot w/ OpenCV

userHead LattePanda 2022-06-22 16:08:37 871 Views0 Replies
HARDWARE LIST
1 x LattePanda Alpha 864s
1 x Arduino Leonardo (Built-in)
1 x DFRobot 8.9" 1920x1200 IPS Touch Display
1 x 3.5" 320x480 TFT LCD Touch Screen (ILI9488)
2 x Logic Level Converter (Bi-Directional)
1 x Buzzer
1 x 5mm Green LED
1 x 220Ί Resistor
1 x Breadboard
1 x Jumper Wires

In this project, I wanted to focus on an emerging field for improving our overall experience while playing and exploring video games, known as computer vision implementation in video games. We have nearly interminable options while employing computer vision to improve video games, from aim assistance bots for first-person shooter (FPS) games to mining bots for role-playing (RPG) games. Although computer vision implementation in video games is commonly utilized for competitive online games, I decided to employ computer vision in one of my favorite video games - Stardew Valley.

In Stardew Valley, even though I played it more than once already, I still needed to scrutinize guides to remember villagers' gift preferences while trying to increase my friendship with certain characters. Thus, I decided to employ computer vision to recognize villagers and display their birthdays and gift preferences (loves, likes, and hates) automatically while playing Stardew Valley.

Since I wanted this project to be as compact as possible, I chose to use a LattePanda Alpha 864s, a high-performance SBC (single-board computer), has an embedded Arduino Leonardo. To recognize villagers while exploring the Stardew Valley world, I deployed the OpenCV template matching. After detecting villagers successfully, to display their gift preferences and birthdays without interrupting the gaming experience or performance, I used the embedded Arduino Leonardo on the LattePanda Alpha. Arduino Leonardo prints the detected villager information on a 3.5" 320x480 TFT LCD Touch Screen (ILI9488) and notifies the player via a buzzer and a 5mm green LED.

Because I was usually struggling to increase my friendship with these eight characters below, I used the OpenCV template matching to recognize them:

Abigail
Emily
Haley
Maru
Penny
Alex
Harvey
Sam

After running this project and obtaining accurate results, it obviates the need for shrewd gift acumen for villagers while playing Stardew Valley. 😃 🎁

Click here to inspect code files and instructions.
1.jpg 1.jpg (546.43 KiB) Viewed 257 times 2.jpg 2.jpg (474.14 KiB) Viewed 257 times 3.jpg 3.jpg (499.87 KiB) Viewed 257 times 4.jpg 4.jpg (551.27 KiB) Viewed 257 times
Project Video


*This article was published in DFRobot
Author: TheAmplituhedron