osu! Tablet Area Optimizer

gui mapping

Overview

osu! is a free-to-play, online rhythm game developed by Dean "peppy" Herbert, which involved a series of consecutive objects appearing on a playfield. Users must aim a cursor to the object and input an action to successfully "hit" the object. For more information on the specifics see my this project.

A popular input device that I, and most of the playerbase uses, are graphics drawing tablets. These tablets can detect the position of a handheld pen device and report it the computer, where there is a one-to-one mapping of the tablets' "active area" and position on the user's screen, colloquially known as "tablet area" in the community.

I have always been a strong proponent of using a tilted mapping, like in the second image, to better suit a human wrist's range of motion. If we assume that most people hold their tablet pens like they would a pencil, notice that the comfortable range of accessible area on the tablet sweeps a solid arc, rather than a straight rectangle. An solid arc shaped area would be interesting to experiment with, but a tilted rectangle preserves the distance metric between tablet area and the screen, which I believe is a worthwhile compromise.

A downside of using tilted areas is achieving a consistent feeling across play sessions. Naturally, a tablet will be placed in a variety of positions relative to a user's desk over different sessions, which results in an inconsistent feel which can be exacerbated for those used to a tilted area or tablet. This project aims to fix this issue as a method to calibrate tablet area.

The program parses user replay with an algorithm, and produces a mapping of player hit attempts to hit objects. Next, there are several optimizations methods currently available for calibrating the area. First and most simple, a simple mean hit deviation angles and radial distance are computed, and the program returns the negative of the mean as a suggested adjustment. In addition to a simple mean, there is a least-squares fit, using tablet tilt and size as parameters, adjusts the hit attempts given the new tilt and size and minimizes the sum of squared hit errors. Finally, I am experimenting with a optimization method I would call "path error." An idealized path is created for some given map, and the user's replay is compared at each time step to the idealized path. A least-squares fit is then conducted with tablet tilt and size again, but minimizing the sum of the squared errors between the user's aiming path and the idealized path. Each of the optimization methods have their pros and cons- and the user is free at any time to change and experiment with what feels best for them.

Features

  • Simple GUI with graphics to operate and visualize effects of calibration in real time
  • Automatic map file path detection through parsing osu!'s proprietary database file
  • Three distinct optimization algorithms to suit a user's preferences
  • Computes analysis of 20+ minute long maps with hundreds of thousands of replay data points in seconds from optimized algorithms

Technologies / Skills

Python (numpy, pandas, scikit-learn, matplotlib, tkinter), Data Analysis, Metric Spaces (tablet mappings!), Data Structures and Algorithms.

Future Work

There are a few bugs with select maps in the hit detection algorithm that need to be ironed out. The program also only supports a purely keyboard-input only playstyle- while this is the most common playstyle by far, I would like to add support for other playstyles including mouse or pen inputs.

← Back to Home