research: SFML 3.0 migration analysis

- Analyzed SFML 3.0 breaking changes (event system, scoped enums, C++17)
- Assessed migration impact on McRogueFace (40+ files affected)
- Evaluated timing relative to mcrfpy.sfml module plans
- Recommended deferring migration until after mcrfpy.sfml implementation
- Created SFML_3_MIGRATION_RESEARCH.md with comprehensive strategy
This commit is contained in:
John McCardle 2025-07-06 13:08:52 -04:00
commit f76a26c120
2 changed files with 299 additions and 0 deletions

View file

@ -36,6 +36,48 @@
---
### Task: SFML 3.0 Migration Research
**Status**: Research Completed
**Date**: 2025-07-06
**Research Summary**:
1. SFML 3.0 Release Analysis:
- Released December 21, 2024 (very recent)
- First major version in 12 years
- Requires C++17 (vs C++03 for SFML 2.x)
- Major breaking changes in event system, enums, resource loading
2. McRogueFace Impact Assessment:
- 40+ source files use SFML directly
- Event handling requires complete rewrite (high impact)
- All keyboard/mouse enums need updating (medium impact)
- Resource loading needs exception handling (medium impact)
- Geometry constructors need updating (low impact)
3. Key Breaking Changes:
- Event system now uses `std::variant` with `getIf<T>()` API
- All enums are now scoped (e.g., `sf::Keyboard::Key::A`)
- Resource loading via constructors that throw exceptions
- `pollEvent()` returns `std::optional<sf::Event>`
- CMake targets now namespaced (e.g., `SFML::Graphics`)
4. Recommendation: **Defer Migration**
- SFML 3.0 is too new (potential stability issues)
- Migration effort is substantial (especially event system)
- Better to implement `mcrfpy.sfml` with stable SFML 2.6.1 first
- Revisit migration in 6-12 months
**Key Decisions**:
- Proceed with `mcrfpy.sfml` implementation using SFML 2.6.1
- Design module API to minimize future breaking changes
- Monitor SFML 3.0 adoption and stability
- Plan migration for late 2025 or early 2026
**Result**: Created SFML_3_MIGRATION_RESEARCH.md with comprehensive analysis and migration strategy.
---
## Phase 4: Visibility & Performance
### Task 3: Basic Profiling/Metrics (#104)