Commit graph

26 commits

Author SHA1 Message Date
Kelsi
15fa055726 Add M2 skeletal animation and fix terrain texture layers
- Implement GPU bone skinning for M2 doodads/creatures (gryphons, birds)
- Store bone hierarchy and animation keyframes per model
- Compute bone matrices per-instance with keyframe interpolation
- Upload bone weights/indices in vertex buffer, skinning in vertex shader
- Fix terrain texture rendering: restore sampler-to-unit uniform bindings
  removed during texture bind optimization (roads were invisible)
2026-02-04 11:40:00 -08:00
Kelsi
4bc5064515 Add spellbook, fix WMO floor clipping, and polish UI/visuals
- Add spellbook screen (P key) with Spell.dbc name lookup and action bar assignment
- Default Attack and Hearthstone spells available in single player
- Fix WMO floor clipping (gryphon roost) by tightening ceiling rejection threshold
- Darken ocean water, increase wave motion and opacity
- Add M2 model distance fade-in to prevent pop-in
- Reposition chat window, add slash/enter key focus
- Remove debug key commands (keep only F1 perf HUD, N minimap)
- Performance: return chat history by const ref, use deque for O(1) pop_front
2026-02-04 11:31:08 -08:00
Kelsi
c49bb58e47 Add gameplay systems: combat, spells, groups, loot, vendors, and UI
Implement ~70 new protocol opcodes across 5 phases while maintaining
full 3.3.5a private server compatibility:

- Phase 1: Server-aware targeting (CMSG_SET_SELECTION), player/creature
  name queries, CMSG_SET_ACTIVE_MOVER after login
- Phase 2: Auto-attack, melee/spell damage parsing, health/mana/power
  tracking from UPDATE_OBJECT fields, floating combat text
- Phase 3: Spell casting, action bar (12 slots, keys 1-=), cast bar,
  cooldown tracking, aura/buff system with cancellation
- Phase 4: Group invite/accept/decline/leave, party frames UI,
  /invite chat command
- Phase 5: Loot window, NPC gossip dialog, vendor buy/sell interface

Also: disable debug HUD/panels by default, gate 3D rendering to
IN_GAME state only, fix window resize not updating UI positions.
2026-02-04 10:31:03 -08:00
Kelsi
6bf3fa4ed4 Add Windows cross-platform support alongside Linux
Replace POSIX-specific socket and process APIs with portable
abstractions so the project builds on both Windows and Linux.

- Add include/network/net_platform.hpp: Winsock2/POSIX socket
  abstraction (socket types, non-blocking, error handling,
  WSAStartup lifecycle)
- Add include/platform/process.hpp: CreateProcess/fork+exec
  abstraction for spawning ffplay subprocesses
- Update network module (tcp_socket, world_socket) to use
  portable socket helpers instead of raw POSIX calls
- Update audio module (music_manager, footstep_manager,
  activity_sound_manager) to use portable process helpers
  instead of fork/exec/kill/waitpid
- Replace hardcoded /tmp/ paths with std::filesystem::temp_directory_path()
- Link ws2_32 and SDL2main on Windows in CMakeLists.txt
2026-02-03 22:25:41 -08:00
Kelsi
d0dac0df07 Refine water rendering, swimming, and underwater visuals 2026-02-03 20:40:59 -08:00
Kelsi
8bc50818a9 Implement activity SFX and decouple camera orbit from movement facing 2026-02-03 19:49:56 -08:00
Kelsi
dfc29cad10 Add intent-driven strafe animation selection and movement state hooks 2026-02-03 19:29:11 -08:00
Kelsi
871172d63e Tune collision behavior for ramps, props, and structural walls 2026-02-03 19:10:22 -08:00
Kelsi
f00d13bfc0 Improve performance and tune ramp/planter collision behavior 2026-02-03 17:21:04 -08:00
Kelsi
f43e6bf834 Tune planter curb collision and reduce foliage pushback 2026-02-03 16:51:25 -08:00
Kelsi
75046afe47 Add stepped fountain collision for parkour-style climbing 2026-02-03 16:28:33 -08:00
Kelsi
baca09828e Optimize collision queries with spatial grid and improve movement CCD 2026-02-03 16:21:48 -08:00
Kelsi
a3f351f395 Fix camera occlusion and stabilize WMO/M2 collision behavior 2026-02-03 16:04:21 -08:00
Kelsi
d03ff5ee4c Tune collision feel and align M2 movement/camera behavior 2026-02-03 15:17:54 -08:00
Kelsi
dfb1f3cfdc Add WoW-style footsteps and improve third-person movement/collision 2026-02-03 14:55:32 -08:00
Kelsi
54dc27c2ec Add WoW-style camera system with collision and first-person mode
- Implement orbit camera with smooth zoom and collision detection
- Add 50° slope limiting with sliding (prevents mountain climbing)
- Add first-person mode that hides player model and weapons
- Add floor clearance check to prevent camera clipping through ground
- Improve WMO wall collision with proper height range checks
- Add two-sided floor collision detection for WMO geometry
- Increase M2 render distance slightly for better visibility
2026-02-03 14:26:08 -08:00
Kelsi
3e792af3e5 Reduce render distances for better performance
- Terrain load radius: 2 tiles (was 6) - 25 tiles max vs 169
- WMO render distance: 500 units (was 3000)
- M2 doodad distance: 300 units (was 1000)
2026-02-03 13:37:52 -08:00
Kelsi
01bf3b4c08 Add loading screen with random WOWEE splash images
- Add loading screen system with stb_image for JPEG loading
- Two loading screen images (orc and dwarf) randomly selected
- Display loading screen while terrain data loads
- Cache WMO inverse matrices to reduce per-frame computation
- Stub WMO liquid rendering (needs coordinate system fix)
- Update spawn point to Stormwind Trade District
2026-02-03 13:33:31 -08:00
Kelsi
665a73e75f Fix WMO MOHD chunk parsing by adding missing nTextures field
The MOHD header structure was missing the nTextures field at the start,
causing all subsequent field reads to be offset by 4 bytes. This corrupted
bounding box values and caused floor geometry to be incorrectly culled.
2026-02-03 11:46:12 -08:00
Kelsi
a9dd685398 Fix terrain collision by correcting spawn coordinates
- Spawn position changed to (-9080, -100, 100) which is on actual terrain
- The terrain mesh uses WoW coordinates from ADT files directly
- Camera/spawn position must use same coordinate system as terrain
- Cleaned up getHeightAt comments to clarify coordinate system
- Removed debug logging from WMO floor detection
2026-02-02 23:36:49 -08:00
Kelsi
a97ebfbc60 Rename Wowser to Wowee throughout codebase
Update application name in startup logs and window title.
2026-02-02 23:22:58 -08:00
Kelsi
a8cf17e7e5 Improve rendering distances, camera collision, and spawn point
- Increase WMO render distance from 1500 to 3000 units for better city loading
- Increase M2 render distance from 500 to 1000 units
- Increase terrain load radius from 4 to 6 tiles (~3200 units)
- Add raycast-based camera collision that zooms in when obstructed by walls/objects
- Move spawn point outside chapel to road near Stormwind gate
- Add ground height smoothing to prevent stumbling on uneven terrain
2026-02-02 23:18:34 -08:00
Kelsi
76a16a214e Improve movement, crouching, and add M2 animation
Movement:
- Fix speed controls: Shift=sprint (28), normal run (14), Ctrl=walk (5)
- Reduce character height for doorway clearance (eye height 1.2)
- Add working crouch (C or X key) with smooth transition (eye height 0.6)
- Jump to stand up from crouch

M2 Animation:
- Add animation time tracking per M2 instance
- Add procedural swaying animation in vertex shader
- Update animation each frame for vegetation movement
2026-02-02 23:10:19 -08:00
Kelsi
4287878a73 Performance optimizations and collision improvements
Performance:
- Remove expensive inverse() from all vertex shaders (terrain, WMO, M2, water, character)
- Add uniform location caching to avoid repeated glGetUniformLocation calls
- Add proper frustum culling for WMO groups using AABB intersection
- Add distance-based culling for WMO and M2 instances
- Add cleanup of unused M2/WMO models when tiles unload

Collision & Movement:
- Add M2 doodad collision detection (fences, boxes, etc.)
- Reduce character eye height (5.0 -> 1.8) and collision radius (2.5 -> 0.5)
- Enable WoW-style movement speed by default (14 units/sec run, 5 walk, 9 back)
- Fix emote grammar ("You waves." -> "You wave.")

Misc:
- Rename window title to "Wowee"
2026-02-02 23:03:45 -08:00
Kelsi
0c85fcd444 Add attribution and source citations for open source release
- Create ATTRIBUTION.md crediting WoWDev Wiki, TrinityCore, MaNGOS,
  and third-party libraries used
- Add WoWDev Wiki format specification links to file format parsers
  (ADT, BLP, DBC loaders)
- Add protocol documentation reference to opcodes.hpp
2026-02-02 22:09:33 -08:00
Kelsi
ce6cb8f38e Initial commit: wowee native WoW 3.3.5a client 2026-02-02 13:03:22 -08:00