Commit 4521a88
Implement Milestone 5 Phase 5c and Milestone 6: Platform Coordinate System
This commit implements the remaining ship navigation features and the critical
platform coordinate system that allows players to ride along on moving ships.
Phase 5c: Ship Movement & Navigation
- Added 'navigable' tile property to all map tiles (water=true, land=false)
- Ships can now distinguish navigable vs non-navigable terrain
- End-to-end ship controls and movement verified
Milestone 6: Platform Coordinate System
- Phase 6a: Ship Boundary Detection
* Added onShip tracking to Player type
* Implemented checkShipBoundary() to detect when players enter/exit ship deck
* Logs boarding/disembarking events
* Stores ship-relative position when player is on ship
- Phase 6b: Coordinate Transformation
* Added shipRelativePosition field to track position relative to ship center
* Calculates and maintains relative offset when player boards ship
* Updates relative position as player moves around on deck
- Phase 6c: Platform Movement (players ride along!)
* Ship movement now propagates to all players on the ship
* Local player moves with ship when onShip is set
* Remote players move with ship based on their onShip state
* Players maintain relative position on deck as ship moves
Technical Details:
- Ship boundary checking uses rectangular deck boundary (width/height from shipData)
- Players automatically board when within deck bounds, leave when outside
- Ship movement delta is applied to all passengers each frame
- This works for any number of ships and players simultaneously
Files Modified:
- clients/mew-world/assets/maps/map1.tmj: Added navigable properties
- clients/mew-world/src/types.ts: Added onShip field to Player
- clients/mew-world/src/game/GameScene.ts: Added boundary detection and platform movement
Players can now:
1. Walk onto a ship's deck and automatically board
2. Ride along as the ship moves through the world
3. Walk around on the ship's deck while it's moving
4. Walk off the ship to disembark
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 7f66ee8 commit 4521a88
File tree
3 files changed
+104
-8
lines changed- clients/mew-world
- assets/maps
- src
- game
3 files changed
+104
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| |||
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
71 | | - | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
76 | | - | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
| |||
87 | 97 | | |
88 | 98 | | |
89 | 99 | | |
90 | | - | |
| 100 | + | |
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
94 | 104 | | |
95 | | - | |
| 105 | + | |
96 | 106 | | |
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
100 | 115 | | |
101 | 116 | | |
102 | 117 | | |
| |||
106 | 121 | | |
107 | 122 | | |
108 | 123 | | |
109 | | - | |
| 124 | + | |
110 | 125 | | |
111 | 126 | | |
112 | 127 | | |
113 | 128 | | |
114 | | - | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
118 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
119 | 139 | | |
120 | 140 | | |
121 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
| 305 | + | |
303 | 306 | | |
304 | 307 | | |
305 | 308 | | |
| |||
448 | 451 | | |
449 | 452 | | |
450 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
451 | 457 | | |
452 | 458 | | |
453 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
454 | 492 | | |
455 | 493 | | |
456 | 494 | | |
| |||
466 | 504 | | |
467 | 505 | | |
468 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
469 | 544 | | |
470 | 545 | | |
471 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
0 commit comments