Sandspiel - Creative Physics Sandbox Game

Seele01-Flash
By
Sandspiel is a captivating creative sandbox game where you experiment with 20 interactive elements that react with each other in realistic ways. Build unique pixelated environments, create stunning art, and watch fascinating chain reactions unfold.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Sandspiel Lite (WebGPU Cellular Automata)**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** 2D Pixel Art rendered within a 3D context. The game should look like a classic "falling sand" simulation (cellular automata). The background should be a muted, soft beige or dark charcoal to make the colorful particles pop. * **Core Asset (The Canvas):** Instead of standard meshes, use a **GLSL Shader (Fragment Shader)** or **WebGPU Compute Shader** approach on a single full-screen plane (PlaneBufferGeometry) to handle the particle simulation efficiently. The "texture" of the world is generated procedurally by the physics engine frame-by-frame. * **Particle Aesthetics:** * **Sand:** Yellow/Tan pixels that pile up. * **Water:** Blue pixels that flow horizontally and settle. * **Plant:** Green pixels that grow upwards or stick to surfaces. * **Fire:** Orange/Red pixels that rise, flicker, and consume "Plant" or "Wood" pixels. * **Stone/Wall:** Gray static pixels that block movement. * **Gas/Vapor:** Light purple/white pixels that drift upward randomly. * **Mobile Optimization:** Since this is computationally heavy, use a lower internal resolution (e.g., `width/4`, `height/4`) for the simulation grid and upscale it using `gl.NEAREST` filtering to maintain the sharp pixel look without draining the mobile battery. Limit the grid size to max 256x256 simulation cells for performance. ### 2. Audio Requirements * **BGM:** A generative, ambient soundscape. Soft, slow-tempo lo-fi beats or ethereal synthesizer pads that promote relaxation. The music should feel "organic" and non-intrusive. * **SFX (Procedural/Granular):** * **Drawing:** A soft "shhh" or scratching sound (pink noise) that varies slightly in pitch depending on the element selected (e.g., Water sounds liquid/bubbly, Stone sounds crunchy). * **Reactions:** Subtle popping sounds when Fire burns Plant, or a sizzling sound when Water hits Fire (turning to steam). * **UI:** Soft, rounded "plop" sounds for selecting different elements from the menu. ### 3. Gameplay Loop * **Core Mechanic:** A sandbox physics simulation based on cellular automata rules. There is no winning or losing. * **Element Behaviors:** 1. **Gravity:** Heavy particles (Sand, Water) fall down. 2. **Displacement:** Water moves sideways if blocked below; Sand piles up in pyramids. 3. **Chemical Reactions:** * Fire + Plant = Fire grows, Plant disappears, Smoke appears. * Water + Fire = Steam (Gas) appears, Fire extinguishes. * Seed + Water + Sand = Plant grows rapidly. * **Tools:** * **Brush:** Paint pixels into the simulation. * **Eraser:** Remove pixels (set to "Empty"). * **Pause:** Freeze the simulation logic but keep rendering. * **Clear:** Reset the entire grid. ### 4. Mobile Controls & Interaction * **Touch Input (The "Brush"):** * Implement **multi-touch support**. The user drags a finger across the canvas to spawn particles. * **Pressure/Radius:** If the API allows (e.g., Force Touch) or via a UI slider, change the brush size (radius). Default to a medium finger-width radius. * **Visual Feedback:** Render a semi-transparent ring under the user's finger showing the current brush size and selected element color. * **Orientation:** Force **Portrait Mode** for one-handed play or allow auto-rotation. The simulation grid must resize dynamically to fill the viewport `window.innerWidth`. * **UI Layout (Bottom-Anchored):** * **Element Palette:** A horizontal scrollable bar (Carousel) at the bottom of the screen. Each element is a circular button (min 48x48px) with an icon and distinct color. * **Action Bar:** A small row above the palette containing "Undo", "Pause", "Clear", and "Brush Size" slider. * **Haptic Feedback:** Trigger a very light vibration (Taptic Engine/`navigator.vibrate(5)`) continuously while the user is dragging/painting to simulate the feeling of pouring sand. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Sandspiel is an innovative physics-based sandbox game that transforms your browser into a creative laboratory. This pixel art simulation allows you to experiment with 20 different elements that interact with each other in fascinating and realistic ways. Whether you want to plant flourishing gardens, ignite dramatic fires, or create flowing lava rivers, Sandspiel provides the perfect canvas for your imagination.

The game combines the satisfying mechanics of physics simulation with the creative freedom of digital art creation. Every element behaves according to realistic physics principles - water flows downward, fire spreads and consumes, plants grow when watered, and lava cools into solid stone. This creates endless possibilities for experimentation and artistic expression.

Core Features

Physics-Based Element Interactions

Experience realistic physics as you watch elements interact naturally with each other. Plant seeds and nurture them with water to create beautiful gardens, ignite fires that spread and consume organic materials, or create dramatic lava flows that cool into permanent stone structures.

20 Unique Elements

Choose from a diverse palette of 20 different elements, each with unique properties and behaviors. From basic materials like sand, water, and stone to more complex elements like plants, fire, and various gases, every element opens up new creative possibilities.

Advanced Creative Tools

  • Variable Brush Sizes : Control the quantity and precision of your placement with adjustable brush sizes
  • Undo Function : Step back through your creative process to experiment with different approaches
  • Pause/Play Controls : Freeze time to create detailed compositions, then unpause to watch your creations come to life
  • Community Sharing : Upload your masterpieces and explore incredible creations made by other players

Digital Art Canvas

Use Sandspiel as more than just a physics simulator - it's a dynamic art platform. Create visually stunning compositions that react and evolve when unpaused. Design chain reactions, build complex ecosystems, or simply paint beautiful landscapes that live and breathe.

Gameplay Mechanics

Building and Experimenting

Start with a blank canvas and begin placing elements to see how they interact. Use solid materials to contain and direct the flow of liquids and gases. Create barriers, channels, and structures that guide the behavior of dynamic elements.

Chain Reactions and Systems

Design elaborate chain reactions by strategically placing elements that trigger each other. Watch as a single spark ignites a fire that spreads through vegetation, or create water systems that nurture growing plant networks across your canvas.

Community and Sharing

Join a vibrant community of creators by uploading your own artworks and exploring the incredible creations of other players. Use community art as inspiration or add your own creative touches to existing works.

How to Play

Basic Controls

  • Left Mouse Click : Place selected element at cursor location
  • Element Palette : Choose from 20 available elements
  • Brush Size Slider : Adjust the size of your placement tool
  • Pause/Play Button : Control time flow in your simulation
  • Undo Button : Revert to previous states of your creation

Getting Started Tips

  1. Start Simple : Begin with basic elements like sand, water, and stone to understand the physics
  2. Experiment Freely : There's no wrong way to play - let curiosity guide your experiments
  3. Use Containers : Create solid boundaries to control liquid and gas behavior
  4. Layer Elements : Build complex scenes by layering different materials
  5. Share Your Art : Upload interesting creations to inspire others and get feedback

Why Play Sandspiel

Sandspiel offers a unique blend of creativity, physics, and relaxation that appeals to artists, gamers, and curious minds alike. It's completely free to play, requires no downloads, and works perfectly on both desktop and mobile devices. The game provides endless entertainment whether you want to create beautiful art, conduct physics experiments, or simply relax with satisfying sandbox gameplay.

The pixel art style gives the game a charming retro aesthetic while the sophisticated physics engine ensures realistic and engaging interactions. With an active community sharing amazing creations daily, you'll never run out of inspiration for your next masterpiece.

Frequently Asked Questions (FAQ)