42 Commits

Author SHA1 Message Date
68b35ea57b Audio update 2025-12-25 19:17:36 +01:00
0b546ce25c Fixed resource loader 2025-12-25 14:23:17 +01:00
45086e58d8 Add pure game model + GTest board tests and scaffolding
Add SDL-free Board model: Board.h, Board.cpp
Add unit tests for Board using Google Test: test_board.cpp
Integrate test_board into CMake and register with CTest: update CMakeLists.txt
Add gtest to vcpkg.json so CMake can find GTest
Add high-level refactor plan: plan-spacetrisRefactor.prompt.md
Update internal TODOs to mark logic extraction complete
This scaffolds deterministic, testable game logic and CI-friendly tests without changing existing runtime behavior.
2025-12-25 10:27:35 +01:00
14cb96345c Added intro video 2025-12-25 09:38:06 +01:00
a7a3ae9055 added basic network play 2025-12-23 19:03:33 +01:00
953d6af701 fixed cooperate play 2025-12-22 21:26:56 +01:00
a729dc089e sync line added in cooperate mode 2025-12-22 17:13:35 +01:00
494f906435 supabase integration instead firebase 2025-12-21 20:50:44 +01:00
afd7fdf18d basic gameplay for cooperative 2025-12-21 15:33:37 +01:00
a6c2c78cb5 refactoring app name to spacetris and new icon 2025-12-21 10:29:01 +01:00
38dbc17ace refactor main game loop 2025-12-19 20:07:48 +01:00
adf418dff9 refactored some functions from main.cpp 2025-12-19 18:16:17 +01:00
fe6c5e3c8a Updated bottom menu 2025-12-17 20:12:06 +01:00
cecf5cf68e fixed main screen 2025-12-17 18:13:59 +01:00
3264672be0 Fixed gameplay 2025-12-16 18:51:23 +01:00
81586aa768 fixed progress bar 2025-12-16 12:09:33 +01:00
9e0e1b2873 fixed bundlle 2025-12-10 20:37:31 +01:00
d53a1cde34 fix 2025-12-10 20:05:54 +01:00
5a755e9995 mac icon added 2025-12-10 19:53:11 +01:00
ea74af146d mac fix 2025-12-10 18:24:48 +01:00
b44de25113 latest state 2025-12-06 09:43:33 +01:00
383b2e48ec new background for main screen 2025-12-01 20:52:26 +01:00
dc8a317837 fix 2025-11-30 14:35:45 +01:00
dd0ac54ee5 cmake fix 2025-11-30 14:32:52 +01:00
55c40f0516 added helper menu 2025-11-30 13:30:02 +01:00
f0a6b0d974 Added settings.ini 2025-11-23 19:08:35 +01:00
39da4484ca cleaning code 2025-11-23 08:28:44 +01:00
77a9237e25 converted from bmp to jpg 2025-11-22 21:46:00 +01:00
4e69ed9742 added buttons to main state 2025-11-22 12:16:47 +01:00
ec2bb1bb1e feat: Add Firebase high score sync, menu music, and gameplay improvements
- Integrate Firebase Realtime Database for high score synchronization
  - Add cpr and nlohmann-json dependencies for HTTP requests
  - Implement async score loading from Firebase with local fallback
  - Submit all scores > 0 to Firebase in background thread
  - Always prompt for player name on game over if score > 0

- Add dedicated menu music system
  - Implement menu track support in Audio class with looping
  - Add "Every Block You Take.mp3" as main menu theme
  - Automatically switch between menu and game music on state transitions
  - Load menu track asynchronously to prevent startup delays

- Update level speed progression to match web version
  - Replace NES frame-based gravity with explicit millisecond values
  - Implement 20-level speed table (1000ms to 60ms)
  - Ensure consistent gameplay between C++ and web versions

- Fix startup performance issues
  - Move score loading to background thread to prevent UI freeze
  - Optimize Firebase network requests with 2s timeout
  - Add graceful fallback to local scores on network failure

Files modified:
- src/persistence/Scores.cpp/h - Firebase integration
- src/audio/Audio.cpp/h - Menu music support
- src/core/GravityManager.cpp/h - Level speed updates
- src/main.cpp - State-based music switching, async loading
- CMakeLists.txt - Add cpr and nlohmann-json dependencies
- vcpkg.json - Update dependency list
2025-11-22 09:47:46 +01:00
66099809e0 feat: implement textured line clear effects and refine UI alignment
- **Visual Effects**: Upgraded line clear particles to use the game's block texture instead of simple circles, matching the reference web game's aesthetic.
- **Particle Physics**: Tuned particle velocity, gravity, and fade rates for a more dynamic explosion effect.
- **Rendering Integration**: Updated [main.cpp](cci:7://file:///d:/Sites/Work/tetris/src/main.cpp:0:0-0:0) and `GameRenderer` to pass the block texture to the effect system and correctly trigger animations upon line completion.
- **Menu UI**: Fixed [MenuState](cci:1://file:///d:/Sites/Work/tetris/src/states/MenuState.cpp:19:0-19:55) layout calculations to use fixed logical dimensions (1200x1000), ensuring consistent centering and alignment of the logo, buttons, and settings icon across different window sizes.
- **Code Cleanup**: Refactored `PlayingState` to delegate effect triggering to the rendering layer where correct screen coordinates are available.
2025-11-21 21:19:14 +01:00
b5ef9172b3 some problems fixed 2025-08-17 21:13:58 +02:00
d75bfcf4d0 Fixed loader, main menu and level selector 2025-08-17 16:51:33 +02:00
e591aaba45 Immediate Code Cleanup 2025-08-17 10:58:06 +02:00
56bdc61cc4 Asset Management fixed 2025-08-17 10:41:25 +02:00
5f438add45 Phase 2: Core Systems: Input Management done 2025-08-17 10:32:53 +02:00
36f849ba36 Refactored step 1: Core Architecture Setup 2025-08-17 10:22:21 +02:00
0e0519b0e9 Created LevelSelectorState
- code removed from main.cpp and added into a new class
2025-08-17 09:10:49 +02:00
eddd1a24b2 fixed level selector 2025-08-16 21:58:19 +02:00
2afaea7fd3 Updated game structure
Some checks failed
Build and Package Tetris / build-windows (push) Has been cancelled
Build and Package Tetris / build-linux (push) Has been cancelled
2025-08-16 12:10:19 +02:00
71648fbaeb Updated game speed 2025-08-16 08:24:26 +02:00
d161b2c550 Initial release: SDL Windows Tetris 2025-08-15 11:01:48 +02:00