Coding
814 prompts available
3D City Game Design
Create a 3D city-themed game featuring immersive 3D sound effects. The game should include a loading screen, controls for moving left and right, and incorporate some form of power or ability that the player can use. # Requirements - **Theme:** City environment with 3D visuals. - **Sound:** Implement 3D spatial sound effects to enhance immersion. - **Loading Screen:** Provide a loading screen before the game starts. - **Controls:** Include buttons or controls that allow the player to move left and right. - **Power:** Introduce at least one power or ability that the player can use within the game. # Steps 1. Design a city environment as the game setting. 2. Integrate 3D sound for authentic audio experience. 3. Develop a loading screen for game initialization. 4. Implement left and right movement controls. 5. Add a player power or special ability feature. # Output Format Provide a detailed game design and development plan outlining how each feature will be implemented. Optionally, include code snippets, diagrams, or pseudocode to illustrate key components.
3D Ludo Game HTML
Create an interactive 3D Ludo game in HTML with the following rules and features: - Four players each choose a color and have four pieces initially placed in their respective starting areas. - The game proceeds in a clockwise order, where players take turns rolling a six-sided die. - On a player's turn, use the die roll to move one of their pieces forward the corresponding number of spaces around the board. - The objective is for each player to successfully move all four pieces entirely around the board and into the central "home" area. - Implement visual 3D representations for the board and pieces using HTML, CSS (including 3D transforms), and JavaScript. - Include clear game state indicators, such as active player highlight, die roll display, and piece movements. - Ensure the game enforces valid moves according to the rules of Ludo and properly handles turns, captures, and entries into the home area. # Steps 1. Design and render a 3D Ludo board with starting points, paths, and central home area for all four colors. 2. Implement player piece objects with 3D visuals corresponding to their colors. 3. Create a dice roll mechanism that returns values 1 through 6. 4. Program game logic for turn sequence, piece movement, capturing opponent pieces as per Ludo rules, and entry into the home area. 5. Add user interaction allowing players to select a piece to move after a dice roll. 6. Provide real-time updates of game status, including current player and dice outcomes. 7. Handle game completion when a player successfully moves all four pieces to the home area. # Output Format Provide a complete HTML file including embedded CSS and JavaScript that renders the interactive 3D Ludo game meeting the described requirements. The code should be well-structured, commented, and ready for deployment in a modern web browser.
3D Mario Kart Game
Create a 3D Mario Kart-style racing game featuring a checkerboard grass environment and a clearly defined track. The game should use realistic physics to simulate vehicle behavior accurately. Implement two control schemes for player movement: - Use 'W' to accelerate forward. - Use 'A' and 'D' to steer left and right respectively. - Alternatively, allow the Up arrow to accelerate, and the Left and Right arrows to steer accordingly. Ensure smooth handling, realistic acceleration, and turning mechanics that reflect real-world physics. The visual style should include a checkerboard pattern for the grassy areas surrounding the track, enhancing the 3D effect and game aesthetics. # Steps 1. Design a 3D racing track with appropriate dimensions and a surrounding checkerboard grass texture. 2. Apply realistic physics for the kart, including acceleration, braking, friction, and turning dynamics. 3. Implement player input controls supporting both 'WASD' and arrow keys for movement and steering. 4. Render the environment and kart with 3D graphics ensuring a coherent visual experience. # Output Format Provide a detailed description or code example (preferably in a commonly used game development framework or language) illustrating the implementation of the game, including physics handling, input control mapping, and rendering of the checkerboard grass and track. # Notes - The physics should simulate momentum, traction, and collision with the track boundaries. - Controls should be responsive and provide smooth player experience. - Visuals should clearly distinguish the track from the surrounding grass. # Examples Example control scheme initialization: ```python # Pseudocode if key == 'W' or key == 'UpArrow': accelerate_forward() if key == 'A' or key == 'LeftArrow': steer_left() if key == 'D' or key == 'RightArrow': steer_right() ``` Example of checkerboard grass texture creation: ```pseudo for each grid_cell in grass_area: if (row + column) % 2 == 0: color = dark_green else: color = light_green draw_square(grid_cell, color) ```
3D Clash Royale Game
Create a detailed system prompt that guides the development of a 3D Clash Royale-inspired game using HTML and related web technologies. The prompt should include clear objectives and explicit instructions covering the following aspects: - **Core Game Mechanics:** Define mechanics similar to Clash Royale, such as card collection, battle arena layout, troop deployment strategies, and tower defense dynamics. Ensure these mechanics are clearly outlined to serve as the foundation of the game design. - **3D Model Creation and Integration:** Specify how to create and integrate 3D models for game assets including characters, towers, and the environment. Emphasize the importance of optimizing models for web performance and compatibility. - **User Interaction:** Detail user interaction workflows such as card selection interfaces and troop deployment controls, ensuring intuitive and responsive gameplay within a web context. - **Technology Stack and Tools:** Recommend use of HTML5, CSS3, and JavaScript as core technologies. For 3D rendering, specify libraries like Three.js or WebGL native API. Highlight frameworks or tools that facilitate animation, state management, and responsive UI. - **Animations:** Describe techniques for animating character movements and battle effects, including the use of tweening, keyframe animations, and particle effects relevant for an engaging real-time gaming experience. - **Multiplayer Considerations:** If multiplayer is part of the scope, include guidance on networking strategies, synchronization, and latency management suitable for browser-based games. - **Performance and Optimization:** Include best practices for optimizing rendering performance, loading times, and responsive design to accommodate different devices. # Steps 1. **Outline Core Game Mechanics:** - Define card collection system, types of cards (troops, spells, buildings). - Describe battle arena design and layout. - Specify troop deployment rules, movement, and attack behaviors. - Explain tower defense mechanics including health, damage, and destruction. 2. **3D Model Development:** - Define requirements for 3D assets (poly count, textures). - Suggest tools for creating models (e.g., Blender). - Provide integration steps with Three.js or WebGL. 3. **User Interaction Design:** - Design card selection UI using HTML/CSS. - Detail input handling for troop deployment via mouse/touch. - Describe feedback mechanisms for user actions. 4. **Technology and Framework Specification:** - Use HTML5 for structure. - CSS3 for styling and animations. - JavaScript for game logic. - Three.js or WebGL for 3D rendering. - Optional: State management libraries (e.g., Redux) or UI frameworks. 5. **Animation Implementation:** - Use Three.js animation mixers or custom JavaScript for movement. - Include battle effects like explosions and hit animations. 6. **Multiplayer and Networking (optional):** - Use WebSockets or WebRTC for real-time communication. - Implement client-server architecture for game state sync. 7. **Optimization and Deployment:** - Optimize models and assets. - Implement lazy loading and asset caching. - Ensure responsiveness and cross-browser compatibility. # Output Format Provide the full system prompt as a comprehensive markdown document structured with headings, subheadings, and bullet points for clarity. The prompt should be instructive and precise, enabling a language model to assist effectively in the full development lifecycle of the 3D Clash Royale-inspired game. # Notes - Maintain focus on web technologies with practical guidance. - Incorporate best practices for 3D web game development. - Suggest useful tools and libraries but leave room for customization. - Emphasize ease of use for developers with web technology background.
3D Coder Language IDE
Create a Python program that implements a simple custom language called "3D Coder" designed for creating 3D objects. The program should: - Open a graphical window with a text editor area where users can write their 3D Coder code. - Display a welcome message "Welcome to 3D Coder!" positioned near the bottom of the window. - Have a "Run" button located at the top-right corner, which when pressed, executes the code the user wrote. - Support a syntax with these elements: - A show function to print text, using the syntax: show "Your text here" - A cube function to render a 3D cube, using syntax like: cube(color, sidelength) - Variables allowing simple assignments and usage within the code. The system should parse the user's input in the custom 3D Coder language, interpret commands like `show` to output text in the UI and `cube` commands to display 3D cubes of specified colors and sizes. # Steps 1. Use a Python GUI framework (Tkinter, PyQt, or similar) to create the editor window. 2. Add a multiline text input area for the user to write code. 3. Add a label at the bottom with "Welcome to 3D Coder!". 4. Add a "Run" button at the top right. 5. When "Run" is clicked, parse the text code: - Identify and execute/show `show` commands (print text output in a designated output area). - Identify and execute/display `cube` commands by rendering cubes with given color and side length (use a simple 3D rendering library or simulate the cube graphically). - Handle variable assignment and substitution. 6. Display outputs accordingly in the window. # Output Format Provide a complete, runnable Python script that fulfills all above requirements, including GUI setup, parsing logic, and rendering functionality. # Notes - You may assume basic syntax parsing; robust error handling is optional but helpful. - Focus on usability and clarity of the custom language features requested. - Include comments explaining the main parts of the code.
3D Maze HTML P.O.V
Create an interactive 3D maze experience using HTML, CSS, and JavaScript, allowing users to navigate the maze from a first-person perspective. Details: - Implement a 3D visualization of the maze that can be viewed and navigated in first-person (P.O.V). - The maze should be generated or predefined and rendered in 3D. - Include user controls (e.g., keyboard arrows or WASD keys) to navigate through the maze. - Ensure smooth movement and responsive design suitable for modern browsers. - Optionally, add features like a minimap, timer, or finish point indication. Steps: 1. Design or algorithmically generate the maze layout. 2. Use CSS 3D transforms or a JavaScript 3D library (e.g., Three.js) to render the maze walls, floors, and ceilings. 3. Implement a first-person camera or viewport to simulate the user's perspective inside the maze. 4. Add event listeners for user input to control movement and rotation. 5. Include collision detection to prevent passing through walls. 6. Optionally, add UI elements such as a minimap or countdown timer. Output Format: Provide complete, well-commented HTML, CSS, and JavaScript code files or a single HTML file including all components, ready to be opened in a web browser for immediate use. Example: [HTML file with canvas showing a 3D maze, arrow keys moving the POV through corridors, walls rendered in 3D perspective]
3D Maze in HTML
Create a 3D maze using HTML, CSS, and JavaScript. The maze should be interactive, allowing a user to navigate through it in a 3D environment, preferably using keyboard controls or mouse interactions. Use appropriate 3D rendering techniques such as CSS 3D transforms or WebGL to build the maze structure. Ensure the maze has defined walls, paths, and a clear start and end point. Provide smooth user experience with responsive controls and clear visual cues for navigation. # Steps 1. Design the maze layout, defining walls and paths. 2. Use HTML and CSS to create the structural elements and style them with 3D transforms. 3. Implement JavaScript functionality to handle user input (keyboard or mouse) for navigation. 4. Render the maze in 3D, ensuring depth perception and perspective. 5. Add start and end points and implement a way to detect when the user completes the maze. 6. Optimize for smooth performance and responsiveness. # Output Format Provide a complete, standalone HTML file or a set of files (HTML, CSS, JS) that can be run in a modern web browser to demonstrate the functional 3D maze with interactive navigation. # Notes - You may use any standard open-source libraries for 3D rendering (e.g., Three.js) if desired. - Ensure accessibility and usability best practices for controls.
3D Colorful Open World Car Game
Create a 3D colorful open world car driving game implemented as an HTML script. The game should include the following features: - A fully navigable open world environment with vibrant, colorful graphics. - A drivable car with realistic car physics (acceleration, steering, braking). - Controls allowing the player to drive the car around the environment smoothly. - Basic game UI elements (e.g., speedometer, map, or other relevant displays). - Ensure performance is optimized for web browsers. # Steps 1. Set up the HTML5 canvas and WebGL context or use a popular 3D JavaScript library such as Three.js or Babylon.js. 2. Design or import a 3D car model and open world terrain with colorful textures. 3. Implement car physics for realistic driving mechanics. 4. Implement player input handling for car controls (keyboard or gamepad). 5. Add lighting and environment effects to enhance visual appeal. 6. Include UI overlays to display driving information. 7. Optimize for smooth performance on common web browsers. # Output Format Provide a complete, runnable HTML script that includes all necessary JavaScript and assets (either embedded or loaded externally) that can be opened directly in a web browser to play the game. # Notes - External resources should be referenced from common CDNs where possible. - Comment your code to explain key parts and facilitate understanding. - Ensure compatibility with major modern browsers. # Examples [No example code provided due to the scope, but feel free to incorporate popular open-source 3D driving game examples or libraries if helpful.]
3D Configurator Architecture
You are assisting a developer building a 3D configurator for an online sofa store integrated with Shopify Storefront API. The store has three main sofa collections (Linea, Cloud, Noble) and an Addons collection (Sofa Addons), each with modular products and variants that impact pricing. Your task is to provide detailed guidance on structuring the project’s data flow and user interactions to achieve the following functionality: 1. Dynamically retrieving and displaying the correct variants when a user selects a product variant in the 3D configurator. 2. Associating relevant addons conditionally based on selected customizations, leveraging the separate Addons collection and using line item attributes to record which sofa variants require which addons. 3. Combining the user’s current modular customization selections into a coherent cart item representation on the client side before adding it to the cart, including displaying a confirmation modal summarizing the selected sofa variants and any addons. 4. Efficiently obtaining the unique Shopify variant ID from the selected product and variant titles (using a provided JavaScript function example) to enable adding the correct variant to the cart. Stack details: - NextJS with TypeScript - React Three Fiber (R3F) for 3D rendering - Valtio for global state management - Shopify client for Storefront GraphQL queries Provide a step-by-step architectural and implementation plan addressing these points, including: - How to model and store product and variant data in Valtio state to support quick lookup by variant title - Best practices for linking addons to specific sofa variants and representing that in the cart line attributes - UI/UX flow recommendations for the confirmation modal combining various selections - Integration tips for using the given `getVariantIdByTitle` function or improved alternatives within NextJS and TypeScript Output Format: Provide a detailed, structured explanation with clearly numbered steps covering data architecture, user interaction flow, state management strategies, and code snippets or pseudocode if helpful. Illustrate key points with concise examples using placeholders (e.g., [ProductName], [VariantName], [AddonName]) where needed. Avoid generalities—focus on concrete solutions to the described challenges.
3D Minecraft Browser Game
Create a fully functional 3D Minecraft-inspired game playable directly in a web browser using HTML, CSS, and JavaScript. This game should render a 3D blocky environment reminiscent of Minecraft, featuring at least one type of block that forms a simple terrain for the player to walk on. Player controls must include: - Movement using the WASD keys - Camera orientation control using mouse movement or touch input - Jumping ability The game should support real-time rendering and allow smooth user interaction. Use WebGL or a suitable 3D JavaScript library such as Three.js to handle all rendering. The code must be well-structured, thoroughly commented, and entirely self-contained within a single HTML file. You may include external dependencies only via CDN links. # Steps 1. Set up an HTML5 canvas element to render the 3D graphics. 2. Initialize a Three.js scene with a perspective camera and appropriate lighting. 3. Construct a blocky terrain made from cube geometries representing the ground blocks. 4. Implement first-person player controls: handle keyboard input (WASD for movement, space for jumping), and capture mouse input for looking around. 5. Implement collision detection to prevent the player from falling through the blocks and to allow walking and jumping realistically on the terrain. 6. Create a game loop that continuously updates the player's position and orientation, handles input, performs collision checks, and renders the scene in real time. # Output Format Provide the complete content of a single HTML file that includes embedded CSS and JavaScript needed for the game. The file must be ready to open in any modern web browser and start playing immediately. External libraries, such as Three.js, can be linked via CDN URLs within the HTML `<head>` or `<body>`, but no other external files or assets should be required. # Example Output ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>3D Minecraft Playable</title> <!-- Include Three.js from CDN --> <script src="https://cdn.jsdelivr.net/npm/three@0.150.1/build/three.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/three@0.150.1/examples/js/controls/PointerLockControls.js"></script> <style> /* Basic CSS to make canvas fill the window */ body { margin: 0; overflow: hidden; } canvas { display: block; } </style> </head> <body> <script> // JavaScript code to initialize scene, create blocks, add player controls, collision detection, and render loop </script> </body> </html> ``` Ensure the code is logically organized with clear comments explaining the main sections and functions.
3D Minecraft Clone Analysis
You are presented with full HTML, CSS, and JavaScript source code for a 3D Minecraft-like game implemented using Three.js. Your task is to analyze, explain, or perform any requested modifications or troubleshooting based on this code. When responding: - Read the provided code carefully, understanding the main components: world generation, block management, player controls, lighting and time of day, UI, and the game loop. - Reason step-by-step about how specific parts work when explaining or debugging. - Provide concise, clear explanations or detailed fixes as needed. - If asked to enhance or optimize, keep it consistent with the existing style and structure. - Always reference line numbers or function names when clarifying specific code behaviors. - Assume thorough knowledge of JavaScript, Three.js, and 3D game programming. # Steps - Review the code structure and logic, including constants and configuration. - Understand how blocks are placed and rendered in the 3D world. - Analyze player movement and controls, including collision detection. - Understand time of day and lighting updates. - Review UI updates and interactions. - Reason about input handling and event listeners. # Output Format - Provide explanations, suggestions, or code changes as clear prose or code blocks. - When giving modified code snippets, include sufficient context. - If outputting an entire updated file, preserve the original formatting and structure. # Notes - The code uses pointer lock API for mouse control. - Blocks are stored in a "world" object keyed by coordinates. - The player's position and rotation affect camera updates. - Lighting simulates day/night cycles with sun and moon directional lights. # Examples - Explaining how the "generateTree" function works. - Fixing a bug where the player sometimes falls through blocks. - Adding a new block type with custom color and texture. # Response Formats {"prompt":"<full detailed prompt as above without JSON metadata>","name":"3D Minecraft Clone Analysis","short_description":"Analyze or modify a 3D Minecraft Clone game in three.js.","icon":"CubeIcon","category":"programming","tags":["JavaScript","Three.js","3D Game","Minecraft"],"should_index":true}
3D Corridor Shooter Game
Create a detailed implementation plan and provide example code snippets for a 3D corridor-style first-person shooter game with the following features: - A player character holding and visibly showing a gun in view. - Realistic recoil animation on the gun when shooting. - A responsive crosshair in the center of the screen that moves to aim up, down, left, and right according to player input. - Movement and aiming controls allowing the player to freely move their aim toward any target direction. - Corridor environment walls designed with a concrete texture style. - Old-style wall-mounted lights that flicker intermittently to add atmosphere. Include reasoning steps to explain design choices for movement, aiming, recoil mechanics, and lighting effects before providing code examples. # Steps 1. Define the first-person controller with movement and mouse/keyboard aim controls. 2. Implement the firing system with visible gun model and recoil animation. 3. Create the crosshair UI element that moves with player input. 4. Design corridor geometry with concrete textures. 5. Add flickering old-style lights to the walls using light sources with fluctuating intensity. 6. Integrate all components and test player shooting with responsive aiming and visual feedback. # Output Format Provide an organized explanation and planning section followed by concise, well-commented code snippets in a chosen game development framework (e.g., Unity C# or Unreal Engine Blueprint/Python). Include code for player control, gun recoil, crosshair movement, corridor texturing, and flickering lights. Avoid excessive length but ensure clarity and completeness for implementation guidance.