[PR #43] [MERGED] Dev to main quasi final (normalement) #43

Closed
opened 2026-05-06 12:17:29 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/BreizhHardware/project_sanic/pull/43
Author: @BreizhHardware
Created: 4/10/2025
Status: Merged
Merged: 4/10/2025
Merged by: @ClementHVT

Base: mainHead: dev


📝 Commits (10+)

  • 1478360 Feat(FloatingText) - Implement FloatingText class for displaying temporary messages; update player to manage and draw floating texts on screen; enhance error messages in constant.py and improve code readability.
  • bf17cc7 Fix(Enemy) - Correct indentation for player.add_projectiles() call to ensure proper execution flow in event handling.
  • 692504d Refactor(Player) - Remove draw_floating_text method and its call in update; streamline floating text management for improved performance.
  • c59fea3 Fix(Handler) - Correct parallax effect calculations for background positioning; ensure seamless background movement in all directions.
  • 9451e79 Feat(Cinematic) - Add Cinematic class for level 1 storytelling; integrate cinematic playback into map loading process and remove redundant cinematic method from MapParser.
  • ed86161 Feat(Cinematic) - Update play_cinematic method to accept level name; ensure cinematic plays only for Level 1 and improve event handling during playback.
  • 49d69d2 Merge pull request #41 from BreizhHardware/dev_felix
  • 722719e Feat(Cinematic) - Enhance cinematic playback by allowing multiple levels; refactor play_cinematic method to track played cinematics and improve text display functionality.
  • 178074a Fix(.gitignore) - Add pycache directory to ignore list; ensure Python cache files are excluded from version control.
  • d617e82 Update src/Map/cinematic.py

📊 Changes

52 files changed (+1496 additions, -288 deletions)

View changed files

.DS_Store (+0 -0)
📝 .gitignore (+2 -1)
assets/.DS_Store (+0 -0)
assets/map/.DS_Store (+0 -0)
assets/map/background/.DS_Store (+0 -0)
assets/map/enemy/.DS_Store (+0 -0)
assets/map/platform/.DS_Store (+0 -0)
assets/player/.DS_Store (+0 -0)
assets/sound/execuse_me.mp3 (+0 -0)
📝 map/levels/1.json (+2 -2)
📝 map/levels/2.json (+3 -3)
📝 map/levels/3.json (+875 -24)
📝 map_test.json (+13 -0)
src/.DS_Store (+0 -0)
📝 src/Database/CheckpointDB.py (+1 -1)
📝 src/Database/__pycache__/CheckpointDB.cpython-313.pyc (+0 -0)
📝 src/Database/__pycache__/InfiniteModeDB.cpython-313.pyc (+0 -0)
📝 src/Database/__pycache__/LeaderboardDB.cpython-313.pyc (+0 -0)
📝 src/Database/__pycache__/LevelDB.cpython-313.pyc (+0 -0)
📝 src/Entity/Enemy.py (+36 -9)

...and 32 more files

📄 Description

This pull request includes several changes to enhance the game's functionality, including the addition of floating text for player actions, the implementation of a cinematic class, and various code improvements. The most important changes are summarized below:

New Features:

  • Floating Text for Player Actions:

    • Added FloatingText class to display floating text when the player performs certain actions, such as gaining projectiles. (src/Entity/FloatingText.py)
    • Integrated FloatingText into the Player class, including initialization and update methods. (src/Entity/Player.py) [1] [2] [3]
  • Cinematic Class Implementation:

    • Introduced the Cinematic class to handle game cinematics, including resource loading and display logic. (src/Map/cinematic.py)
    • Updated MapParser to use the new Cinematic class for playing cinematics based on the level. (src/Map/parser.py) [1] [2] [3] [4]

Code Improvements:

  • Database Checkpoint Adjustment:

    • Modified the save_checkpoint method to adjust the pos_y value by adding 100 before saving. (src/Database/CheckpointDB.py)
  • Code Cleanup and Refactoring:

    • Removed unnecessary import of os in Enemy.py. (src/Entity/Enemy.py)
    • Improved parallax effect calculations and fixed background positioning in draw_background. (src/handler.py)
    • Added floating text drawing logic to the game loop. (src/handler.py)
  • Minor Fixes:

    • Corrected a typo in the error message for loading icons in constant.py. (src/constant.py)
    • Fixed conditional formatting and improved code readability in handle_death_screen and handler. (src/handler.py) [1] [2]

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BreizhHardware/project_sanic/pull/43 **Author:** [@BreizhHardware](https://github.com/BreizhHardware) **Created:** 4/10/2025 **Status:** ✅ Merged **Merged:** 4/10/2025 **Merged by:** [@ClementHVT](https://github.com/ClementHVT) **Base:** `main` ← **Head:** `dev` --- ### 📝 Commits (10+) - [`1478360`](https://github.com/BreizhHardware/project_sanic/commit/14783601e47d95939f6a84f9b30783655b740c3f) Feat(FloatingText) - Implement FloatingText class for displaying temporary messages; update player to manage and draw floating texts on screen; enhance error messages in constant.py and improve code readability. - [`bf17cc7`](https://github.com/BreizhHardware/project_sanic/commit/bf17cc7891de278771fc8b52592e0a8466c0c69b) Fix(Enemy) - Correct indentation for player.add_projectiles() call to ensure proper execution flow in event handling. - [`692504d`](https://github.com/BreizhHardware/project_sanic/commit/692504d4ad85ecbe6b145ce7b43c3e726986b3d9) Refactor(Player) - Remove draw_floating_text method and its call in update; streamline floating text management for improved performance. - [`c59fea3`](https://github.com/BreizhHardware/project_sanic/commit/c59fea37c9c13a23d0146280b0eeee23d7d51ac2) Fix(Handler) - Correct parallax effect calculations for background positioning; ensure seamless background movement in all directions. - [`9451e79`](https://github.com/BreizhHardware/project_sanic/commit/9451e7961f44505fbaaf3a0f97e2fb0500c520f1) Feat(Cinematic) - Add Cinematic class for level 1 storytelling; integrate cinematic playback into map loading process and remove redundant cinematic method from MapParser. - [`ed86161`](https://github.com/BreizhHardware/project_sanic/commit/ed86161be97e3f5bb4b0d7fdae89479b4edfb0ef) Feat(Cinematic) - Update play_cinematic method to accept level name; ensure cinematic plays only for Level 1 and improve event handling during playback. - [`49d69d2`](https://github.com/BreizhHardware/project_sanic/commit/49d69d2c78c837c496e47963ed8b689e74822555) Merge pull request #41 from BreizhHardware/dev_felix - [`722719e`](https://github.com/BreizhHardware/project_sanic/commit/722719e8aff924d1dd894ff7a08086857cff8313) Feat(Cinematic) - Enhance cinematic playback by allowing multiple levels; refactor play_cinematic method to track played cinematics and improve text display functionality. - [`178074a`](https://github.com/BreizhHardware/project_sanic/commit/178074ae560641696c6029f1e860459ba514e6d8) Fix(.gitignore) - Add __pycache__ directory to ignore list; ensure Python cache files are excluded from version control. - [`d617e82`](https://github.com/BreizhHardware/project_sanic/commit/d617e82ef8429d595bbd147e7c27ec563d37fc5d) Update src/Map/cinematic.py ### 📊 Changes **52 files changed** (+1496 additions, -288 deletions) <details> <summary>View changed files</summary> ➕ `.DS_Store` (+0 -0) 📝 `.gitignore` (+2 -1) ➕ `assets/.DS_Store` (+0 -0) ➕ `assets/map/.DS_Store` (+0 -0) ➕ `assets/map/background/.DS_Store` (+0 -0) ➕ `assets/map/enemy/.DS_Store` (+0 -0) ➕ `assets/map/platform/.DS_Store` (+0 -0) ➕ `assets/player/.DS_Store` (+0 -0) ➕ `assets/sound/execuse_me.mp3` (+0 -0) 📝 `map/levels/1.json` (+2 -2) 📝 `map/levels/2.json` (+3 -3) 📝 `map/levels/3.json` (+875 -24) 📝 `map_test.json` (+13 -0) ➕ `src/.DS_Store` (+0 -0) 📝 `src/Database/CheckpointDB.py` (+1 -1) 📝 `src/Database/__pycache__/CheckpointDB.cpython-313.pyc` (+0 -0) 📝 `src/Database/__pycache__/InfiniteModeDB.cpython-313.pyc` (+0 -0) 📝 `src/Database/__pycache__/LeaderboardDB.cpython-313.pyc` (+0 -0) 📝 `src/Database/__pycache__/LevelDB.cpython-313.pyc` (+0 -0) 📝 `src/Entity/Enemy.py` (+36 -9) _...and 32 more files_ </details> ### 📄 Description This pull request includes several changes to enhance the game's functionality, including the addition of floating text for player actions, the implementation of a cinematic class, and various code improvements. The most important changes are summarized below: ### New Features: * **Floating Text for Player Actions:** * Added `FloatingText` class to display floating text when the player performs certain actions, such as gaining projectiles. (`src/Entity/FloatingText.py`) * Integrated `FloatingText` into the `Player` class, including initialization and update methods. (`src/Entity/Player.py`) [[1]](diffhunk://#diff-c0effc013092db6988c4774ca8aa3c2ca0c1b1890ffeed5401b98d17d217acc2R68) [[2]](diffhunk://#diff-c0effc013092db6988c4774ca8aa3c2ca0c1b1890ffeed5401b98d17d217acc2R441-R442) [[3]](diffhunk://#diff-c0effc013092db6988c4774ca8aa3c2ca0c1b1890ffeed5401b98d17d217acc2L686-R695) * **Cinematic Class Implementation:** * Introduced the `Cinematic` class to handle game cinematics, including resource loading and display logic. (`src/Map/cinematic.py`) * Updated `MapParser` to use the new `Cinematic` class for playing cinematics based on the level. (`src/Map/parser.py`) [[1]](diffhunk://#diff-b7d012db5b4cdd07e07d6f78dda95be51706a586fd88f44d2e2d0e9ffa228fafR13) [[2]](diffhunk://#diff-b7d012db5b4cdd07e07d6f78dda95be51706a586fd88f44d2e2d0e9ffa228fafL37-R38) [[3]](diffhunk://#diff-b7d012db5b4cdd07e07d6f78dda95be51706a586fd88f44d2e2d0e9ffa228fafL47-R48) [[4]](diffhunk://#diff-b7d012db5b4cdd07e07d6f78dda95be51706a586fd88f44d2e2d0e9ffa228fafL201-L258) ### Code Improvements: * **Database Checkpoint Adjustment:** * Modified the `save_checkpoint` method to adjust the `pos_y` value by adding 100 before saving. (`src/Database/CheckpointDB.py`) * **Code Cleanup and Refactoring:** * Removed unnecessary import of `os` in `Enemy.py`. (`src/Entity/Enemy.py`) * Improved parallax effect calculations and fixed background positioning in `draw_background`. (`src/handler.py`) * Added floating text drawing logic to the game loop. (`src/handler.py`) * **Minor Fixes:** * Corrected a typo in the error message for loading icons in `constant.py`. (`src/constant.py`) * Fixed conditional formatting and improved code readability in `handle_death_screen` and `handler`. (`src/handler.py`) [[1]](diffhunk://#diff-87e072956b3498cea1c9c03f2d500bf062c0d59e2f74fba337a39118c7ea9188L614-R623) [[2]](diffhunk://#diff-87e072956b3498cea1c9c03f2d500bf062c0d59e2f74fba337a39118c7ea9188L901-R910) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:17:29 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BreizhHardware/project_sanic#43
No description provided.