feat: player entity with WASD movement, tile collision, camera follow (Phase 4.1)
Player spawns at walkable tile near map center. WASD controls movement (150px/s, normalized diagonal). Tile collision with wall-sliding prevents walking through acid pools, crystals, geysers. Camera follows player with smooth lerp. 39 new tests (134 total). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -34,3 +34,8 @@ export const Health = {
|
||||
export const ChemicalComposition = {
|
||||
primaryElement: [] as number[], // atomic number (e.g. 11 for Na)
|
||||
};
|
||||
|
||||
/** Tag component — marks entity as the player (no data, identity only) */
|
||||
export const PlayerTag = {
|
||||
_tag: [] as number[],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user