Playground - Action Sandbox Battle Game

Seele01-Flash
By
Playground is an innovative action sandbox game that combines creative building with explosive destruction. Create epic battles, build massive structures, or unleash chaos in this physics-driven 2D world where your imagination sets the limits.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Playground: Physics Sandbox". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** 2.5D Pixel Art Aesthetic. Use flat 3D geometries (planes or thin boxes) positioned on the XY plane to simulate a 2D side-scrolling view. The art style should mimic "People Playground" or "Melon Playground" – blocky, pixelated textures, but with smooth physics animations. * **Camera:** Use an **Orthographic Camera** locked to a side-view perspective to ensure consistent 2D gameplay within the 3D engine. * **Characters:** Construct characters (Humans, Zombies) using hierarchical composite shapes (Head, Torso, Upper Arm, Lower Arm, etc.) connected by joints to enable **Ragdoll Physics**. * **Environment:** A simple, infinite scrolling tiled background (like graph paper or a concrete wall). Ground and walls should be placable blocks with distinct textures (wood, brick, asphalt). * **Performance:** Use Texture Atlases for character parts and items to reduce draw calls. Implement object pooling for projectiles and blood particles to maintain 60 FPS on mobile browsers. ### 2. Audio Requirements * **BGM:** A lighthearted, "elevator music" style or quirky lo-fi beat that contrasts with the on-screen destruction (comedic irony). * **Sound Effects (SFX):** * **UI:** Soft 'pop' sounds when selecting items from the menu. * **Physics:** 'Thud' sounds for heavy objects hitting the ground, 'wood crack' for breaking crates. * **Combat:** Distinct gunshot sounds (pistol 'crack', shotgun 'boom', machine gun 'rat-a-tat'), explosion rumbles, and exaggerated 'squish' sounds for gore/hits. * **Vocals:** Groans for zombies and screams/grunts for humans upon taking damage. ### 3. Gameplay Loop * **Core Mechanic (Sandbox):** There is no strict win condition. The loop involves **Spawning -> Experimenting -> Destroying**. Players drag entities from a menu into the world and watch them interact via physics. * **Infection Logic:** Implement a collision listener. If a "Zombie" entity's collider touches a "Human" entity, the Human changes state (texture swap + behavior change) to become a Zombie. * **Combat & Physics:** * **Ragdolls:** Characters must go limp when "killed" or thrown. * **Ballistics:** Weapons fire physical projectiles or use raycasting that applies force to specific body parts (pushing them back). * **Destruction:** Explosives (grenades, dynamite) must apply radial force, scattering loose objects and shattering breakable structures (crates, glass). * **AI Behavior:** Zombies should automatically move toward the nearest Human. Humans should flee or, if equipped with weapons, aim and shoot at Zombies. ### 4. Mobile Controls & Interaction * **Touch Input System:** * **Drag & Drop:** Touching an object allows the player to drag it around the screen (physically manipulating the ragdoll/item). * **Multi-touch:** Support handling two fingers—one to drag a character, another to fire a weapon or interact with a prop. * **UI Layout:** * **Toolbar:** A scrollable horizontal bar at the **bottom of the screen** containing categorized icons (Heart=Entities, Gun=Weapons, Grenade=Explosives, Brick=Building). * **Context Menu:** Tapping a spawned object once opens a small floating menu near it with options: "Delete," "Rotate," "Freeze," or "Activate" (for guns/explosives). * **Haptic & Visual Feedback:** * Trigger `navigator.vibrate(50)` on explosions or heavy impacts. * Screen shake effect (camera jitter) when heavy weapons are fired or TNT explodes. * **Orientation:** Force **Landscape Mode** or adapt the viewport dynamically, but Landscape is preferred for the sandbox canvas space. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Playground

Playground is a revolutionary action sandbox game that puts unlimited creative power in your hands. This free-to-play physics-based adventure combines the joy of building with the thrill of destruction, offering an open-ended gaming experience where anything is possible. Whether you're constructing elaborate cities, orchestrating massive battles, or simply experimenting with explosive mayhem, Playground provides the perfect digital canvas for your wildest ideas.

Core Features

Unlimited Creative Freedom

Playground offers complete creative control in a dynamic 2D environment. Build towering structures, design complex battle scenarios, or create interactive playgrounds limited only by your imagination. The game's intuitive interface makes it easy for players of all ages to jump in and start creating.

Comprehensive Character System

Choose from an extensive roster of characters including humans, zombies, hybrid creatures, and special unlockable characters. Each character type brings unique properties and interactions, adding depth to your sandbox creations. Watch as zombies convert humans, creating dynamic chain reactions across your playground.

Extensive Arsenal

Access a vast collection of weapons and tools ranging from basic handguns and rifles to devastating explosives like dynamite and rockets. Each weapon offers different destruction capabilities, allowing you to fine-tune the chaos level of your creations.

Advanced Physics Engine

Experience realistic physics interactions as buildings crumble, explosions create chain reactions, and characters respond naturally to environmental forces. The sophisticated physics system makes every destruction sequence unique and satisfying.

Building Materials Galore

Construct with various materials including bricks, wood, grass, and asphalt. Each material has distinct properties affecting durability and interaction with weapons, adding strategic depth to your building projects.

Game Mechanics

Interactive Sandbox Environment

The game operates on a simple yet powerful principle: place objects, characters, and weapons in your sandbox, then watch as they interact according to realistic physics laws. Create elaborate Rube Goldberg machines, design zombie apocalypse scenarios, or build and destroy architectural marvels.

Strategic Combat Elements

While primarily a creative tool, Playground includes strategic combat mechanics. Position characters wisely, as zombie contact converts humans instantly. Plan defensive structures and weapon placements to create compelling battle scenarios.

How to Play

Character Placement

Start by clicking the heart icon to select characters. Choose from diverse options including male and female humans, various zombie types, pigs, and unique hybrid creatures. Strategic character placement forms the foundation of engaging scenarios.

Weapon Selection

Access the weapon menu via the gun icon to equip your characters or place weapons strategically around your playground. Options range from close-combat tools like chainsaws and shovels to long-range firearms and explosive devices.

Construction Tools

Use the cement block icon to access building materials. Create protective barriers, elaborate structures, or destructible environments using bricks, wood, and other construction elements.

Equipment and Props

Customize your playground with equipment from the shirt icon (armor and protective gear) and environmental props from the wooden crate icon (furniture, obstacles, and decorative elements).

Why Play Playground

Perfect for Creative Minds

Playground appeals to players who enjoy open-ended creativity without strict objectives or time limits. It's digital LEGO meets physics simulation, offering endless entertainment through experimentation and discovery.

Educational Value

The game subtly teaches physics principles, cause-and-effect relationships, and problem-solving skills while maintaining pure entertainment value. It's perfect for players interested in game design, physics, or creative expression.

Stress Relief Gaming

The satisfying destruction mechanics provide excellent stress relief, while the building aspects offer meditative, zen-like gameplay experiences. Switch between creative construction and explosive destruction based on your mood.

Community and Sharing

Create scenarios to challenge friends or share your most impressive constructions and destruction sequences. The game naturally encourages experimentation and creative competition.

Accessibility

With simple mouse-based controls and intuitive menus, Playground welcomes players of all skill levels. The learning curve is gentle, but the depth of possibilities keeps experienced players engaged for hours.

Frequently Asked Questions (FAQ)