Create leaderboards and implement score submission for farthest, fastest, and arcade scores. Update leaderboards every frame, and submit HTTP requests with new scores at a regular interval. Calculate the hash expected by the API to include in each score submission. Track farthest distance reached across all three difficulties. Add function for calculating and storing total distance of all levels combined. The distance of the standard levels is 14,040, so use that value in certain cases where hard-coding is necessary. Add flag that tracks whether the level skip command has been used. Use the flag to disable leaderboard submission and certain achievements. Add function for clearing an arcade score object to reset it to an empty state. Add leaderboards test case to the test program. Call a mock PHP server and mock SQLite database to test leaderboard score submission. Add compilation flag that enables code that uses PHP, so that the test can launch PHP's test server to test the leaderboards API. Collect mock files for the test program into a class, so that they will be cleaned up automatically after each test case runs.
43 lines
410 B
Plaintext
43 lines
410 B
Plaintext
# Builds
|
|
build/
|
|
dist/
|
|
|
|
# Auto generated
|
|
compile_commands.json
|
|
src/version.hpp
|
|
|
|
# SPACEBOX
|
|
sdl2-config
|
|
|
|
# External symlinks
|
|
ext/
|
|
|
|
# Repository
|
|
local/
|
|
src/__pycache__/
|
|
storage/
|
|
*Play_History.json
|
|
press.html
|
|
feed
|
|
test.html
|
|
|
|
# Logs
|
|
log/
|
|
*_log.txt
|
|
|
|
# Non-free software
|
|
lib/steam/
|
|
|
|
# Testing
|
|
steam_appid.txt
|
|
|
|
# Auto-save
|
|
.\#*
|
|
*~
|
|
\#*
|
|
|
|
# Private
|
|
config/config_api.json
|
|
src/private/
|
|
src/test/leaderboards/hash.test.php
|