Eggy Car - Physics-Based Driving Game

Seele01-Flash
By
Eggy Car is a delightfully challenging physics-based driving game where your mission is simple yet tricky: drive as far as possible without letting the fragile egg passenger fall out and crack!

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Eggy Car (Physics Hill Climb)". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: 2.5D Side-Scroller. Use an **Orthographic Camera** to simulate a flat 2D vector art style similar to the screenshot, while using 3D geometry. Use bright, high-saturation colors (Sky Blue background `#87CEEB`, Dirt Red/Brown ground `#A0522D`, bright Red Car). * **Asset Construction**: * **Car**: A composite low-poly model consisting of a chassis (BoxGeometry), two wheels (CylinderGeometry), and a specifically shaped "cradle" on top to hold the egg. * **The Egg**: An ovoid shape (SphereGeometry with scaling) with a simple texture or geometric face (eyes/mouth). It must be a separate physics body resting loosely in the car's cradle. * **Terrain**: Procedurally generated infinite terrain using Perlin noise or sine waves to create smooth hills, steep climbs, and dips. The surface should be smooth to allow driving but uneven enough to cause physics instability. * **Decor**: Simple low-poly palm trees and clouds in the background (parallax effect preferred if performance allows). * **Performance**: Use `InstancedMesh` for repeated environmental elements (trees, coins). Limit dynamic lights; use baked ambient lighting or a single directional light with soft shadows. ### 2. Audio Requirements * **BGM**: A cheerful, looping, up-tempo casual track (whistling or ukulele style) that encourages replayability. * **SFX**: * **Engine**: A synthesis loop where pitch increases with car velocity. * **Egg Interaction**: A "wobble" sound when the egg hits the car edges; a distinct "crack/splat" sound when the game ends. * **Coins**: A high-pitched, satisfying chime. * **Suspension**: Squeaking sounds when the car lands after a jump. ### 3. Gameplay Loop * **Physics Engine Integration**: **Crucial**. Use **Cannon.js** or **Matter.js** (wrapped for Three.js) to handle rigid body dynamics. The Egg must *not* be parented to the car; it must be a free-moving physics object constrained only by gravity, friction, and the walls of the car's cradle. * **Core Mechanic**: The player drives endlessly to the right. The car must accelerate and brake. The egg reacts to inertia. * *Acceleration*: Egg rolls backward. * *Braking*: Egg rolls forward. * *Hills*: Gravity pulls the egg out of the car. * **Win/Loss Condition**: * **Score**: Distance traveled (in meters). * **Game Over**: If the Egg collides with the Ground or falls out of the car bounds. * **Collectibles**: Gold coins placed in arcs over hills (risky jumps) or in valleys. ### 4. Mobile Controls & Interaction * **Touch Input**: Split-screen invisible touch zones: * **Left 50% Screen**: Brake / Reverse. * **Right 50% Screen**: Accelerate / Gas. * **UI Layout**: * Distance Counter: Top Center (Large, readable font). * Pause Button: Top Right (min 44x44px safe area). * "Retry" Overlay: Appears immediately on Game Over with a large "Play Again" button. * **Feedback**: * Camera: Smoothly follow the Car on the X-axis, but apply soft damping on the Y-axis to avoid making the player dizzy on bumpy roads. * Visual: simple dust particles (particle system) emitting from tires when accelerating on the ground. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Eggy Car is a charming physics-based casual driving game that combines simple controls with genuinely challenging gameplay. Your objective seems straightforward - drive a car with an egg passenger as far as possible without letting it fall and crack. However, this deceptively simple concept creates an addictive and engaging experience that will test your patience and precision.

The game features bright, cartoonish graphics with colorful landscapes and playful animations. The egg character wobbles realistically with adorable facial expressions, while your vehicle bounces and tilts according to realistic physics as you navigate the endless terrain.

Core Features

Realistic Physics Engine

The game's physics system creates authentic driving dynamics where every acceleration, brake, and hill impacts your egg's stability. The wobbly egg passenger responds naturally to your car's movements, making each moment tense and exciting.

Endless Gameplay Mode

Unlike traditional racing games with levels, Eggy Car offers a single endless mode where you continuously strive to beat your previous distance record. Every run starts fresh, encouraging repeated play to improve your skills.

Vehicle Upgrade System

Collect coins during your drives to unlock and purchase new vehicles. Each car offers different characteristics: - Lighter cars : Faster but harder to balance - Heavier vehicles : More stability but slower acceleration
- Compact cars : Perfect for beginners seeking control - Racing cars : Ideal for experienced players wanting speed

Power-Up Collection

Discover helpful power-ups during your journey: - Freeze : Locks your egg in place temporarily, perfect for steep hills - Magnet : Automatically collects nearby coins without risky maneuvers

Gameplay Mechanics

The Challenge Begins

You start at the base of a small hill with your egg precariously positioned in the car. The immediate temptation is to accelerate quickly, but this is the fastest way to lose. Success requires gentle, measured movements.

Mastering the Hills

Navigating terrain requires different techniques: - Uphill climbing : Light acceleration taps to maintain momentum - Peak transitions : Ease off acceleration to prevent bouncing - Downhill descents : Gentle braking to control speed and egg stability

Coin Collection Strategy

Golden coins appear along your route, but they're strategically placed to tempt risky maneuvers. Only collect coins when you feel completely safe - a cracked egg isn't worth any reward.

Operation Guide

The controls are intentionally minimal to focus on skill and timing:

  • A key or Left Arrow : Move backward/reverse
  • D key or Right Arrow : Accelerate forward
  • Quick reverse taps : Use to stabilize a sliding egg

The key to success lies in smooth, gentle movements rather than aggressive driving. Always look ahead to anticipate terrain changes and adjust your speed accordingly.

Why Play Eggy Car

Perfect Casual Gaming Experience

Eggy Car delivers the ideal balance of simple mechanics and challenging gameplay. You can jump in for a quick session or spend hours trying to beat your best distance.

Completely Free Browser Game

Play instantly in any modern web browser without downloads, installations, or payments. The game works perfectly on both desktop computers and mobile devices.

Addictive Progression System

The combination of distance challenges, coin collection, and vehicle unlocks creates a satisfying progression loop that keeps you coming back for "just one more try."

Family-Friendly Entertainment

With its cheerful cartoon style, upbeat music, and simple concept, Eggy Car appeals to players of all ages while providing genuine challenge for skilled gamers.

Skills Development

While entertaining, the game also develops valuable skills including patience, precision timing, and strategic thinking as you learn to balance risk versus reward in coin collection.

Frequently Asked Questions (FAQ)