mirror of
https://github.com/BreizhHardware/project_sanic.git
synced 2026-05-09 08:15:51 +02:00
[PR #40] [MERGED] Dev felix #39
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#39
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/40
Author: @BreizhHardware
Created: 4/10/2025
Status: ✅ Merged
Merged: 4/10/2025
Merged by: @ClementHVT
Base:
dev← Head:dev_felix📝 Commits (5)
bca7cc0Feat(Checkpoints) - Add reset_level method to CheckpointDB for resetting checkpoints; implement profiling functionality with cProfile and output to file.f0b2373Feat(Audio) - Enhance audio handling during video playback; pause main music, play extracted audio on a separate channel, and ensure cleanup of temporary audio files.cbfadb0Feat(Player) - Add facing direction handling for player; update image rendering based on movement direction and improve joystick control comments.a8f36ceChore(.gitignore) - Add Python bytecode files to .gitignore; ensure output.prof is ignored.55bee48Feat(Level Design) - Update level dimensions and platform properties; enhance enemy and collectible configurations; increase jump and speed boost durations.📊 Changes
16 files changed (+504 additions, -150 deletions)
View changed files
📝
.gitignore(+4 -1)📝
assets/map/platform/stone_texture.png(+0 -0)➕
assets/sound/main_music.mp3(+0 -0)📝
map/levels/1.json(+2 -2)📝
map/levels/2.json(+375 -108)➕
profiler.py(+9 -0)📝
src/Database/CheckpointDB.py(+15 -0)📝
src/Entity/Exit.py(+25 -6)📝
src/Entity/JumpBoost.py(+2 -2)📝
src/Entity/Player.py(+45 -15)📝
src/Entity/SpeedBoost.py(+4 -4)📝
src/Map/parser.py(+5 -6)📝
src/constant.py(+6 -0)📝
src/game.py(+3 -0)📝
src/handler.py(+9 -6)➖
temp_audio.mp3(+0 -0)📄 Description
This pull request includes various changes to multiple files, enhancing functionality, fixing bugs, and improving code readability and maintainability. The most important changes include adding new methods, updating existing methods, and fixing translation issues.
Enhancements and Bug Fixes:
Profiler Integration:
profiler.pyfile to help with performance analysis. ([profiler.pyR1-R9](diffhunk://#diff-8fd11f89cf2717e23655193cf3d252fcb1805dfa8da56a18b1914b1066f4a625R1-R9))Database Enhancements:
reset_levelmethod toCheckpointDBto reset checkpoints for a specific map. ([src/Database/CheckpointDB.pyR84-R98](diffhunk://#diff-ffd7d15fa6d73583aaaff634c4f75958f1a62b066c3660256b0243ac020ce1a4R84-R98))Gameplay Improvements:
play_video_and_return_to_menumethod inExit.pyto handle audio more efficiently by pausing the main music and using a separate channel for temporary audio. ([src/Entity/Exit.pyL78-R111](diffhunk://#diff-14326ced12bc6a36c5aff4235931aac270e908099f2341040be58690d85c2f09L78-R111))boost_durationforJumpBoostandSpeedBoostentities to 10 seconds. ([[1]](diffhunk://#diff-9d3ef4e5a52d071bbfd1fc1cfbda9d12fcd0259c8d0469af9f3c30d7789492d7L18-R19),[[2]](diffhunk://#diff-cdac9e86a94db37076b033962d506030b1e0fc59a8e322a70e0d86cf63c7a9a5L19-R19))Player Entity Enhancements:
[[1]](diffhunk://#diff-c0effc013092db6988c4774ca8aa3c2ca0c1b1890ffeed5401b98d17d217acc2R214-R253),[[2]](diffhunk://#diff-c0effc013092db6988c4774ca8aa3c2ca0c1b1890ffeed5401b98d17d217acc2R433-R437))moveandtake_damagemethods for better readability. ([[1]](diffhunk://#diff-c0effc013092db6988c4774ca8aa3c2ca0c1b1890ffeed5401b98d17d217acc2L271-R296),[[2]](diffhunk://#diff-c0effc013092db6988c4774ca8aa3c2ca0c1b1890ffeed5401b98d17d217acc2L416-R446))Map and Resource Handling:
create_map_objectsmethod inparser.pyto dynamically scale the background image based on map dimensions. ([src/Map/parser.pyR159-R164](diffhunk://#diff-b7d012db5b4cdd07e07d6f78dda95be51706a586fd88f44d2e2d0e9ffa228fafR159-R164))constant.py. ([src/constant.pyR19-R24](diffhunk://#diff-941b93ca473092cc5313afb6b0966dfc25b01571f7c135a59942f9f0c9514ef4R19-R24))These changes collectively improve the game's functionality, performance, and code quality.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.