mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-24 15:33:50 +00:00
- TESTING.md: WOWEE_BUILD_TESTS defaults to ON in CMakeLists.txt:28, not OFF as the doc claimed. - TROUBLESHOOTING.md: log path is logs/wowee.log in CWD (per src/core/logger.cpp:61), not ~/.wowee/logs/. - CONTRIBUTING.md / docs/status.md: align test count with actual 31 test_*.cpp files in tests/ (was 27 in both docs, 31 in README). - docs/quickstart.md: section numbering jumped from 2 to 4 to 5; renumbered to 1-4.
3.5 KiB
3.5 KiB
Contributing to Wowee
Build Setup
See BUILD_INSTRUCTIONS.md for full platform-specific details. The short version: CMake + Make on Linux/macOS, MSYS2 on Windows.
cmake -B build -DCMAKE_BUILD_TYPE=Debug
make -C build -j$(nproc)
Code Style
- C++20. Use
#pragma oncefor include guards. - Namespaces:
wowee::game,wowee::rendering,wowee::rendering::world_map,wowee::ui,wowee::ui::chat,wowee::math,wowee::core,wowee::network. - Conventional commit messages in imperative mood:
feat:new featurefix:bug fixrefactor:code restructuring with no behavior changeperf:performance improvement
- Prefer
constexproverstatic constfor compile-time data. - Mark functions whose return value should not be ignored with
[[nodiscard]].
Pull Request Process
- Branch from
master. - Keep commits focused -- one logical change per commit.
- Describe what changed and why in the PR description.
- Ensure the project compiles cleanly before submitting.
- Manual testing against a WoW 3.3.5a server (e.g. AzerothCore/ChromieCraft) is expected for gameplay-affecting changes.
Architecture Overview
See docs/architecture.md for the full picture. Key namespaces:
| Namespace | Responsibility |
|---|---|
wowee::game |
Game state, packet handling (GameHandler), opcode dispatch, spline parsing |
wowee::rendering |
Vulkan renderer, M2/WMO/terrain, sky system |
wowee::rendering::world_map |
Modular world map (16 components: facade, compositor, layers, etc.) |
wowee::ui |
ImGui windows and HUD (GameScreen) |
wowee::ui::chat |
Modular chat system (15+ components: commands, markup, macros, etc.) |
wowee::math |
Reusable math modules (CatmullRomSpline) |
wowee::core |
Coordinates, math, utilities |
wowee::network |
Connection, Packet read/write API |
Packet Handlers
The standard pattern for adding a new server packet handler:
- Define a
struct FooDataholding the parsed fields. - Write
void GameHandler::handleFoo(network::Packet& packet)to parse intoFooData. - Register it in the dispatch table:
registerHandler(LogicalOpcode::SMSG_FOO, &GameHandler::handleFoo).
Helper variants: registerWorldHandler (requires isInWorld()), registerSkipHandler (discard),
registerErrorHandler (log warning).
Testing
31 unit-test suites cover core systems, animation, transport/spline, world map, and chat.
See TESTING.md for the full guide. Run with ./test.sh --test.
Manual testing against WoW 3.3.5a private servers (primarily ChromieCraft/AzerothCore)
is expected for gameplay-affecting changes.
Key Files for New Contributors
| File / Directory | What it does |
|---|---|
include/game/game_handler.hpp |
Central game state and all packet handler declarations |
src/game/game_handler.cpp |
Packet dispatch registration and handler implementations |
include/network/packet.hpp |
Packet class -- the read/write API every handler uses |
include/ui/game_screen.hpp |
Main gameplay UI screen (ImGui) |
src/ui/chat/ |
Modular chat system (commands, markup, macros, tab completion) |
src/rendering/world_map/ |
Modular world map (facade, compositor, layers, coordinate projection) |
src/math/spline.cpp |
Reusable CatmullRomSpline math |
src/game/spline_packet.cpp |
Unified spline packet parsing for all expansions |
src/rendering/m2_renderer.cpp |
M2 model loading and rendering |
docs/architecture.md |
High-level system architecture reference |