@aeon-games/gravity-golf
v5.0.0
Published
Gravity Golf
Readme
Gravity Golf
Purpose
Gravity Golf is a physics-based puzzle game within the Aeon Games ecosystem. It reimagines traditional golf on a hexagonal grid, introducing "gravity wells" that dynamically alter the ball's trajectory. Players (and agents) must account for gravitational pull, friction, and environmental obstacles to sink the ball in the fewest strokes possible.
Key Features
- Hexagonal Physics: Ball movement and collision detection optimized for a radius-7 hexagonal board.
- Gravity Wells: Strategic points on the map that exert a pull on the ball, requiring players to "slingshot" or compensate for curved paths.
- Dynamic Course Layouts: Multiple holes with varying par values, obstacle configurations, and gravity well placements.
- Strokes & Scoring: Traditional golf scoring (Birdie, Par, Bogey) adapted to the hexagonal simulation.
Key Files
src/index.tsx: Core game implementation, including the physics engine, gravity simulation, and course generation.package.json: Package metadata and dependencies.tsconfig.json: TypeScript configuration.
Usage
The GravityGolf component is used within the Aeon Games platform:
import GravityGolf from '@aeon-games/gravity-golf';
<GravityGolf
gameId="galactic-open-2026"
onComplete={...}
/>Mechanics
- Phases:
aiming: Click a hex to set the initial shot direction and power.rolling: The physics engine simulates movement, applying gravity and friction.scored: The ball has reached the hole or come to a stop.
- Physics:
- Gravity: Inverse-square law simulation for gravity wells.
- Friction: Velocity decay over time (0.85 coefficient).
- Collision: Bouncing mechanics for board boundaries and walls.
