A high-performance rhythm game bot for NIKKE: Goddess of Victory's Tracing The Stars (TTS) minigame. Uses DXGI Desktop Duplication for GPU-accelerated screen capture and pixel-perfect note detection.
- 300 FPS capture rate with DXGI Desktop Duplication
- GPU-accelerated screen capture (zero CPU overhead)
- Independent key handling - all 7 keys work simultaneously without blocking
- Hold detection with dual measurement points for accuracy
- Smart timing - 10ms repress cooldown, 40ms grace period for holds
- Color-based detection - White, Gold, Green, and Purple notes
- Scan code input - Works with DirectInput games
- Windows 10/11
- Requires 1920x1080 resolution (1080p) with 100% display scaling
- Visual Studio 2019 or newer (for compilation)
- Administrator privileges (auto-requested on first run)
- NIKKE game with Tracing The Stars minigame
⚠️ IMPORTANT: The bot uses fixed scan regions calibrated for 1080p. Other resolutions or display scaling settings will not work correctly.
IMPORTANT: Configure your in-game keybinds to match:
| Note Color | Keys |
|---|---|
| White notes | D F J K |
| Gold note | B |
| Green note | A |
| Purple note | L |
- Run
color_bot.exe(will request admin privileges) - Press
F9to calibrate - Press
F8to start/stop
- Visual Studio 2019 or newer with C++ Desktop Development workload
- Windows SDK
- Clone the repository:
git clone https://github.com/yourusername/nikke-tts-bot.git
cd nikke-tts-bot- Run the build script:
build.batOr compile manually:
# Initialize Visual Studio environment
call "C:\Program Files\Microsoft Visual Studio\[VERSION]\Community\VC\Auxiliary\Build\vcvars64.bat"
# Compile resource file
rc.exe color_bot.rc
# Compile program
cl.exe color_bot.cpp /O2 /EHsc /W3 /D_CRT_SECURE_NO_WARNINGS /Fe:color_bot.exe ^
d3d11.lib dxgi.lib winmm.lib user32.lib shell32.lib advapi32.lib ^
/link /SUBSYSTEM:CONSOLE color_bot.res-
Launch the bot:
color_bot.exe
- Bot will automatically request administrator privileges
- A console window will open with instructions
-
Calibrate (F9):
- Start the Tracing The Stars minigame
- Press
F9in the bot console - Click 5 points on the hit line (left to right):
- Left edge of lane 1
- Right edge of lane 1 / Left edge of lane 2
- Right edge of lane 2 / Left edge of lane 3
- Right edge of lane 3 / Left edge of lane 4
- Right edge of lane 4
- Calibration is saved to
bot_config.json
-
Start the bot (F8):
- Press
F8to start - Bot will automatically play the minigame
- Press
F8again to stop
- Press
| Key | Action |
|---|---|
F8 |
Start/Stop bot |
F9 |
Calibration |
F10 |
Exit program |
The bot saves calibration data to bot_config.json:
{
"hit_zone_y": 1080,
"lane_centers_x": [100, 200, 300, 400],
"lane_hold_x": [85, 185, 285, 385],
"lane_keys": ["d", "f", "j", "k"],
"green_x": 90,
"purple_x": 410,
"gold_x": 400,
"green_tap_x": 200,
"purple_tap_x": 300,
"special_scan_half": 6
}Edit color_bot.cpp constants for fine-tuning:
#define SCAN_Y_A_OFFSET 18 // Top scan boundary (px above hit line)
#define SCAN_Y_B_OFFSET 51 // Bottom scan boundary (px above hit line)
#define SCAN_Y_GOLD_OFFSET 80 // Gold note scan height (px above hit line)
#define TARGET_FPS 300.0 // Capture frame rate
#define KEY_REPRESS_COOLDOWN 0.01 // 10ms between key pressesColor detection thresholds:
c.white = R > 185 && G > 185 && B > 185;
c.dark = R < 60 && G < 60 && B < 60;
c.green = G > 130 && G > R + 30 && G > B + 15;
c.purple = R > 130 && B > 120 && G < 120;
c.gold = R > 240 && G > 215 && B > 110 && B < 145;- DXGI Capture: Uses DirectX Graphics Infrastructure to capture frames directly from GPU memory
- Color Classification: Analyzes pixel colors in scan regions above the hit line
- Note Detection:
- White notes: Detected at lane centers with hold detection at lane edges
- Gold note: Scanned in a higher region (80px above hit line)
- Green/Purple notes: Zone-based detection across all lanes
- Input Simulation: Sends keyboard input using Windows SendInput API with hardware scan codes
- Resolution locked: Requires 1920x1080 (1080p) with 100% Windows display scaling
- Pixel-based detection: Visual effects (glows, flashes) after gold notes may occasionally cause false detections
- Calibration required: Must recalibrate if game resolution or UI scale changes
- Single monitor: Captures primary monitor only
- Verify display settings: Game must run at 1920x1080 with 100% Windows scaling
- Verify game keybinds match bot configuration (D F J K B A L)
- Ensure bot is running as administrator
- Check that game window is on primary monitor
- Recalibrate (F9) - calibration may be off
- Ensure 1080p resolution and 100% scaling
- Check
SCAN_Y_A_OFFSETandSCAN_Y_B_OFFSETvalues
- Check resolution: Must be 1920x1080 at 100% scaling
- Increase
SCAN_Y_GOLD_OFFSETfor gold notes - Adjust color thresholds in
classify()function - Lower
TARGET_FPSif system can't keep up
- Ensure Visual Studio C++ Desktop Development workload is installed
- Check that Windows SDK is installed
- Verify
vcvars64.batpath inbuild.batmatches your VS installation
- Language: C++
- Graphics API: Direct3D 11, DXGI 1.2
- Input Method: Windows SendInput with scan codes
- Architecture: Single-threaded event loop at 300 FPS
- Memory: ~10MB RAM usage
- CPU: <1% on modern processors (GPU does the heavy lifting)
MIT License - See LICENSE file for details
This bot is for educational purposes. Use at your own risk. The authors are not responsible for any consequences of using this software, including but not limited to game bans or account suspensions.
Contributions are welcome! Please feel free to submit a Pull Request.
- DXGI Desktop Duplication implementation
- Windows SendInput for reliable input simulation
- Optimized color detection algorithms
Note: This bot is designed specifically for NIKKE's Tracing The Stars minigame. It may not work with other rhythm games without modification.

