This tool is for the arcade game StepManiaX. It uses OCR to identify:
- Which screen the game is on
- Currently selected song, difficulty and logged-in users on the select song screen
- Current song being played in the gameplay screen
This tool requires a clean gameplay feed at >= 1080p. You can send this feed from OBS using the virtual camera. Set the OBS virtual camera to output your capture source directly, that way it will work even if you change scenes in OBS.
- Make sure Settings -> Video -> Base and Output resolution is set to 1920x1080 or higher
- Click the cogwheel next to "Start Virtual Camera"
- Set Output Type to Source
- Select your capture device from the list
- Click Start Virtual Camera
First download latest tool release.
Both the two options below require you to come up with a data identifier. The identifier you provide can be anything. Think of it like a password that identifies your OCR data for access in the browser or API.
Running the exe directly will open a window where the tool asks you which webcamera number to use and what your data identifier should be. It will then open a preview window of the webcam. If it's not the right webcam just close the window and try again with the next webcam number.
Example:
Enter webcam number: 4
Enter data identifier: my-unique-id
The tool will run non-interactively if you give it the right parameters. This is useful if you want to start it without typing in the answers every time.
- Run the tool with the preview:
smx-ocr 0 my-unique-id debug
- Run the tool without the preview window:
smx-ocr 0 my-unique-id
If you put the command with parameters in a .bat file you can double-click it to run it.
There are three ways to use the OCR data:
-
Use the score browser with the machine in the URL:
- https://smx.573.no/browser?machine=my-unique-id
- The browser will auto refresh and change songs as you navigate the song selection wheel.
- You can use this URL as a browser source in OBS for overlays.
-
Use the data in your own application with the API:
- https://smx.573.no/api/machines/my-unique-id
- Click the link to see example data
- TODO: Web socket support for this API endpoint
-
Read the file data.json:
- File is updated when the OCR data changes
- Same format as the API output, see above