p
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
https://file--976e40c4399211f0bf529e149126039e.web.val.run
A fully functional 3D pole-vaulting game prototype built with Three.js, featuring mobile-first design and realistic physics.
- 3D Environment: Immersive 3D world with varied terrain, platforms, and decorative elements
- Realistic Physics: Spring-damper pole mechanics with gravity and momentum
- Mobile-First Controls: Touch-optimized interface with visual feedback
- Camera-Driven Propulsion: Unique mechanic where camera rotation applies swing force
- Movement Joystick (bottom-left): Walk/run around the environment
- Vault Button (bottom-right): Hold to plant pole and swing
- Camera Control: Touch and drag to look around and aim
- Crosshair: Center screen targeting reticle
- Target & Plant: Aim crosshair at surfaces and hold vault button to plant pole
- Spring Physics: Pole behaves like a spring with realistic stretch/compression
- Swing Dynamics: Player orbits around pivot point with physics-based motion
- Camera Propulsion: Rotate camera while vaulting to apply tangential force
- Release: Let go of vault button to detach and fly based on momentum
- Backend: Hono server serving static HTML
- Frontend: Single HTML file with embedded Three.js game
- Physics: Custom spring-damper system with gravity simulation
- Controls: NippleJS for joystick, native touch events for camera
- PoleVaultGame Class: Main game controller
- 3D Scene: Ground, platforms, trees with shadows and lighting
- Player System: Capsule mesh with physics and camera following
- Pole System: Dynamic 3D rod with spring physics and visual feedback
- Input Handling: Touch and mouse controls for cross-platform compatibility
- Fixed timestep physics for consistent behavior
- Efficient mesh updates for pole stretching
- Mobile-optimized rendering settings
- Responsive design for various screen sizes
- Explore: Use the left joystick to move around the 3D environment
- Look Around: Touch and drag on screen to rotate camera and aim
- Plant Pole: Hold the red "VAULT" button while aiming at a surface
- Build Momentum: While swinging, move the camera to apply propulsive force
- Launch: Release the vault button at the optimal moment to fly toward distant platforms
- Large open world with varied terrain
- Multiple platforms at different heights
- Decorative trees and realistic lighting
- Shadow mapping for visual depth
- Realistic gravity and momentum
- Spring-based pole mechanics with visual feedback
- Collision detection with ground and platforms
- Smooth camera following with interpolation
- Pole color changes when stretched beyond rest length
- Dynamic pole geometry showing compression/extension
- Crosshair for precise aiming
- Smooth animations and transitions
The game is ready to play immediately - just visit the backend URL and start vaulting!
Controls Summary:
- Left joystick: Move
- Touch/drag screen: Look around
- Red button: Hold to vault
- Camera movement while vaulting: Apply swing force
Try to reach all the platforms scattered around the environment using different vaulting techniques and momentum-building strategies!