Skip to content

Add dev-only teleportation debugging tool (M key)#4

Open
marcus-the-worm wants to merge 1 commit intoTanner253:mainfrom
marcus-the-worm:teleportation_system
Open

Add dev-only teleportation debugging tool (M key)#4
marcus-the-worm wants to merge 1 commit intoTanner253:mainfrom
marcus-the-worm:teleportation_system

Conversation

@marcus-the-worm
Copy link
Copy Markdown
Contributor

@marcus-the-worm marcus-the-worm commented Dec 22, 2025

🛠️ Add Dev-Only Teleportation Debugging Tool

Overview

Adds a quick travel teleportation system for development and testing purposes only. This tool helps developers quickly navigate to key locations during testing without manual walking.

⚠️ Development Only

This feature is only available when NODE_ENV !== 'production' and will not be accessible to production users.

Features

  • Teleport Wheel UI: Radial menu displaying 4 key locations
  • M Key Binding: Press and hold M to open the teleport wheel (dev mode only)
  • Hover & Release: Hover over location and release M to teleport
  • Smart Disabling: Locations you're already at are grayed out and unselectable
  • Auto Room Transitions: Automatically exits buildings and teleports to town location
  • Visual Feedback: Chat bubble notification confirming teleportation

Debug Locations

  • 🎣 Ice Fishing - Quick access to fishing area for testing
  • 🎰 Casino - Fast travel to casino for slot machine/game testing
  • 🎵 Nightclub - Direct access to nightclub for DJ/furniture testing
  • 🍕 Pizza Parlor - Quick travel to pizza parlor area

Usage (Dev Mode Only)

  1. Run in development mode (npm run dev)
  2. Press and hold M key
  3. Hover over desired location
  4. Release M to teleport
  5. Player teleports instantly with automatic room transitions

Why Dev-Only?

  • Testing efficiency: Quickly access different areas during development
  • QA workflow: Faster bug reproduction and verification
  • Feature testing: Rapid navigation to test specific features
  • Not intended for gameplay: Would break game balance and intended player flow

Technical Details

  • Conditionally compiled out in production builds
  • Uses localStorage for seamless room transition positioning
  • Location filtering based on current room (prevents teleporting to same location)
  • Updates posRef, velRef, syncs with multiplayer
  • Sticky selection behavior with dead zone
  • Touch support for mobile devices
  • Grayscale visual effect for disabled locations

Files Changed

  • src/components/TeleportWheel.jsx - Teleport wheel component
  • src/VoxelWorld.jsx - Dev-only teleport logic, M key handler with env check

DEMO

teleportation_demo.mp4

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Dec 22, 2025

@marcus-the-worm is attempting to deploy a commit to the Tanner Percival's projects Team on Vercel.

A member of the Team first needs to authorize it.

Implement quick travel teleport wheel (M key) for testing and debugging purposes. Only available in development mode (NODE_ENV !== 'production'). Allows instant travel to key locations with smart room transitions.
@marcus-the-worm marcus-the-worm changed the title Add teleportation system with M key wheel navigation Add dev-only teleportation debugging tool (M key) Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant