Chat, where's my Pokémon?

Chat, where's my Pokémon?

A platform that translates streaming chat into Nintendo Switch commands, with over 1M views and 600k commands.

Overview

History

The project began as an attempt to control a Nintendo Switch programmatically to automate certain games using scripts.

One application is in the game Splatoon, where players can create custom banners. Using these scripts, players can draw banners with pixel-perfect precision.

Splatoon BannerSplatoon Banner
Splatoon Banner

There's an existing project that reverse-engineered the controller and mapped its commands.

How it works

Essentially, we forward commands to an Arduino board using a UART device by sending them through a serial port. The Arduino board emulates a switch controller and translates the commands into controller inputs.

The same communication also works backwards. The Arduino board can send feedbacks back to the computer.

FlowFlow
Flow

This bidirectional communication allows you to:

  1. Control Nintendo Switch using keyboard and mouse by mapping the inputs to the controller.
  2. Play Nintendo Switch on your phone by streaming the video to your phone and sending the controller inputs back to the computer and Nintendo Switch.
  3. Automate games by capturing the Nintendo Switch screen and sending controller inputs to it.

Moonlight lets you stream PC games to remote devices. I created a custom Moonlight client and Python script to map the iPhone's discontinued 3D Touch and motion sensor to a Nintendo Switch controller using the same hardware chain. This enables playing Nintendo Switch games on an iPhone with enhanced control.

Here's a demo clip from my video showcasing this solution, the video gained over 1M views:

My hands, 3D touch mapping, Link

Streaming Interaction

After playing around with the control methods and hardware. I decided to build a project that allows users from streaming platforms to directly interact with my local Nintendo Switch using chat. You may have heard of Twitch Plays Pokémon. This project is similar, but with a Nintendo Switch.

Scorbunny
Scorbunny

The project consists of:

  1. Capturing, sanitizing, and mapping the chat commands to controller inputs.
  2. Making custom macros and commands to speed up the interaction.
  3. Using image recognition to capture real-time game states (e.g., inventory, player location) and display them outside the game window.
  4. Detect game state and block commands that would break the progress entirely.
  5. Effectively display how the commands work in real-time.

To achieve this, I made a backend, HTML pages, and video assets to collect and cycle through all the information in OBS (streaming software).

Stats

The stream ended up being more popular than I thought. I launched the project at the release date of Pokémon Sword and Shield. With a few iterations, I kept the stream running for over a month. The stream had over 600k commands. Players were able to communicate and complete the game using only chat commands. There were 4 total completions with second playthroughs. Here's a short clip of the stream (15x speed):

Stream

Tags:

Computer Vision,

Arduino,

UART,

Python,

Nintendo Switch,

WebSocket,

jQuery,

XCode

Previous
Kubernetes Monitoring
Next
A parallel image transformation script