This repository contains the server-side application for managing high scores for the Star Dodge game. It is designed to store, retrieve, and serve player scores, enabling seamless integration with the game.
- RESTful API for submitting and retrieving high scores.
- Storage of player scores in a SQLite db alongside other client data
- Integration-ready with the Star Dodge game.
- Simple and lightweight Python implementation for easy setup.
- Simulator to add scores for testing purposes.
The code of this project was mainly written by generative AI.
To run the score server, ensure you have the following installed:
- Python 3.12 or later
- Required Python packages (see
requirements.txt
)
Follow these steps to set up and run the score server locally:
git clone https://github.com/bee256/star_dodge_score_server.git
cd star_dodge_score_server
Install the required dependencies with:
pip install -r requirements.txt
Start the server using the following command:
python app.py
The server will come up and create an empty database instance at instance/scores.db
.
The console input indicates a development servers, however, the performance is enough for many gaming clients.
* Serving Flask app 'app'
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8123
* Running on http://192.168.178.111:8123
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
* Debugger PIN: 452-250-555
Run the simulator to add some test data. If the Star Dodge game is run in high score server mode, it will update the high scores every 5 seconds and play a sound if a player made it to the top ten.
python simulator.py
This project is licensed under the MIT License. See the LICENSE file for more details.