mirror of
https://github.com/BreizhHardware/project_sanic.git
synced 2026-05-09 08:15:51 +02:00
[PR #32] [MERGED] Feat(Game Logic) - Integrate speedrun timer functionality; add Speedr… #32
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BreizhHardware/project_sanic#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/BreizhHardware/project_sanic/pull/32
Author: @BreizhHardware
Created: 4/9/2025
Status: ✅ Merged
Merged: 4/9/2025
Merged by: @ClementHVT
Base:
dev← Head:dev_felix📝 Commits (1)
60aa7f6Feat(Game Logic) - Integrate speedrun timer functionality; add SpeedrunTimer class, modify game state management to include timer, and update leaderboard to display best times.📊 Changes
4 files changed (+283 additions, -41 deletions)
View changed files
📝
src/Map/Infinite/InfiniteMapGenerator.py(+9 -1)➕
src/Map/Speedrun/SpeedrunTimer.py(+105 -0)📝
src/Menu/Leaderboard.py(+116 -26)📝
src/handler.py(+53 -14)📄 Description
This pull request introduces several new features and improvements, particularly focusing on the speedrun functionality and leaderboard enhancements. The most important changes include the addition of a
SpeedrunTimerclass, modifications to handle speedrun times, and updates to the leaderboard to display level-specific scores.Speedrun Functionality:
src/Map/Speedrun/SpeedrunTimer.py: Introduced a newSpeedrunTimerclass to manage speedrun times, including starting, stopping, updating, and saving times to a database.src/handler.py: IntegratedSpeedrunTimerinto the game flow, including starting the timer when a level starts, updating the timer during gameplay, and saving the time when a level is completed. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]Leaderboard Enhancements:
src/Menu/Leaderboard.py: Updated the leaderboard to display scores for individual levels, including fetching and formatting scores from the database. Added new tabs for each level and improved the display of scores. [1] [2]Platform Generation:
src/Map/Infinite/InfiniteMapGenerator.py: Improved platform generation logic to ensure platforms are placed within a reasonable jump height, enhancing gameplay experience. [1] [2]🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.