Eggy Car - Physics-Based Driving Game

Seele01-Flash
By
Eggy Car is a unique physics-based driving game where you must carefully balance an egg on your car roof while navigating challenging terrain. Drive as far as possible without letting the egg fall!

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Eggy Car". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Use a **Low-Poly, Toon-Shaded** aesthetic to mimic the vector art style of the original game. Use bright, saturated colors (Orange background, Red car, White egg). * **Camera**: Set up a **Side-Scrolling Orthographic Camera** (or high-FOV perspective camera) that follows the player's car smoothly on the X-axis but creates a slight "dead zone" to avoid jittery movements. * **The Car**: Create a stylized vehicle (resembling a red mini-van) with functioning suspension physics (wheels move up/down). It must have a "roof rack" or a cradle area where the egg sits. * **The Egg**: A large, white, oval mesh. It must **NOT** be parented to the car hierarchy. It must be a separate physics body that rests freely on top of the car, subject to inertia and gravity. * **Terrain Generation**: Implement a procedural terrain generator (using Perlin noise or sine waves) to create an infinite loop of steep hills, valleys, and jumps. The ground should have a simple texture or grid pattern so the player can perceive speed. * **Mobile Optimization**: Use `BoxGeometry` and `CylinderGeometry` primitives where possible to keep draw calls low. Use simple Lambert or Basic materials rather than expensive PBR materials. ### 2. Audio Requirements * **BGM**: A loopable, whimsical, and "bouncy" instrumental track (upbeat pizzicato strings or light synth) that matches the tension of balancing an egg. * **Sound Effects**: * **Engine**: Pitch-shifted engine hum based on the car's velocity. * **Suspension**: Squeaky sounds when the car lands a jump. * **The Egg**: A "wobble" sound when the egg moves violently; a "crack/splat" sound upon game over. * **Coins**: A high-pitched "ding" when collecting yellow spheres (coins) scattered on the terrain. ### 3. Gameplay Loop * **Core Mechanic**: The player drives the car to the right. The egg sits loosely on the roof. The physics engine (e.g., Cannon.js or Ammo.js) must calculate friction and inertia. Accelerating too fast makes the egg roll back; braking hard makes it roll forward. * **Objective**: Drive as far as possible (distance = score) and collect coins placed along the path. * **Fail State**: The game ends immediately if the egg falls off the roof and collides with the ground, or if the car flips over. * **UI/HUD**: Display the current "Distance" (in meters) and "Coins Collected" at the top of the screen. ### 4. Mobile Controls & Interaction * **Touch Input**: Implement an invisible split-screen control scheme: * **Right Half Tap/Hold**: Gas (Accelerate forward / Apply torque to wheels). * **Left Half Tap/Hold**: Brake/Reverse (Decelerate / Apply negative torque). * **Orientation**: Force or optimize for **Landscape Mode**. * **Responsiveness**: The physics must feel "weighty." The car shouldn't achieve max speed instantly; it needs torque curves. * **Feedback**: * Add a subtle camera shake when the car lands from a jump. * If using the Web Vibration API, trigger a short haptic pulse when the car hits the ground or collects a coin. * **Start/Restart**: A large, thumb-friendly "Play" button overlay to start the game. On Game Over, show a "Restart" button immediately without complex menu navigation. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Eggy Car

Eggy Car is an addictive physics-based driving game that combines simple controls with challenging gameplay mechanics. Your mission is deceptively simple: drive as far as possible while keeping a fragile egg balanced on your car's roof. This free online game tests your patience, precision, and understanding of physics as you navigate through endless scrolling terrain filled with hills, valleys, and obstacles.

The game's charm lies in its realistic physics engine that makes the egg behave naturally - it slides, bounces, and rolls based on your driving decisions. Every acceleration, brake, and landing affects the egg's position, creating a constant tension between speed and safety.

Core Features

Simple Yet Challenging Gameplay

Eggy Car uses a minimalist approach with two-button controls that anyone can learn instantly. Despite the simple controls, mastering the game requires skill, patience, and understanding of physics principles. The egg on your car roof is completely unsecured and responds realistically to every movement.

Realistic Physics Engine

The game features a sophisticated physics system where: - Hills launch eggs skyward when you drive too fast uphill - Hard landings cause the egg to bounce and potentially fall - Aggressive acceleration makes the egg slide backward - Sudden stops send the egg flying forward

Endless Terrain Challenges

Navigate through diverse terrain features including: - Steep hills that test your throttle control - Sudden valleys where momentum becomes your enemy - Rolling landscapes requiring precise speed management - Gaps and jumps demanding smooth landings - Coin collection points offering risk-versus-reward decisions

Progression System

Collect coins during your runs to unlock: - New vehicles with improved stability and handling characteristics - Performance upgrades for smoother driving experience - Different environments with unique challenge levels - Enhanced car models designed for better egg protection

How to Play

Desktop Controls

  • D key or Right Arrow : Accelerate forward
  • A key or Left Arrow : Brake or reverse

Mobile Controls

  • Tap right side : Move forward
  • Tap left side : Brake or reverse

Gameplay Strategy

Success in Eggy Car requires: 1. Gentle acceleration to prevent the egg from sliding 2. Smooth landings after jumps to avoid egg bouncing 3. Controlled speed on hills to maintain egg stability 4. Strategic coin collection without compromising egg safety 5. Physics understanding to predict egg movement

Why Play Eggy Car

Eggy Car offers a unique gaming experience that combines: - Free gameplay with no downloads required - Cross-platform compatibility for desktop and mobile devices - Progressive difficulty that keeps you engaged - Physics-based learning that improves with practice - Addictive gameplay loop with clear objectives - Minimalist design focusing on pure gameplay mechanics

The game is perfect for players who enjoy precision-based challenges and physics puzzles . Each attempt teaches you something new about momentum, balance, and careful driving. Whether you're looking for a quick gaming session or extended play, Eggy Car delivers satisfying gameplay that rewards patience and skill over speed and recklessness.

Frequently Asked Questions (FAQ)