Back to Learning

Coding

814 prompts available

3D Animation Website Code

Create a complete, functional 3D animation website using HTML, CSS, and JavaScript. The website should feature an interactive or visually appealing 3D animation element. Requirements: - Use only HTML, CSS, and vanilla JavaScript (no external libraries). - The 3D animation should be rendered with CSS 3D transforms or JavaScript manipulating the DOM or canvas. - The website should be well-structured, responsive, and aesthetically pleasing. - Include comments in the code explaining key parts. # Output Format Provide the full source code split into three parts: HTML, CSS, and JavaScript, with comments explaining important sections.

2D Action Roguelike Game

Create a highly polished 2D action roguelike game implemented in a single HTML, CSS, and JavaScript file. Features include: - Original hand-drawn sprite assets and animations for characters and enemies. - Randomly generated, logically structured maps with multiple levels. - Destructible environment with particle effects and explosive blocks. - Combat system with guns and katana, blood effects, and realistic projectile behavior. - Player movement in all directions with jumping, rolling, and aiming. - High-quality visual and audio effects. - Well-structured game map with clear level progression. # Output Format Provide a single, self-contained HTML file including embedded CSS and JavaScript that runs in modern web browsers without external dependencies.

1v1 Auto Bot Design

Create an autonomous 1v1 match bot capable of analyzing game state, making strategic decisions in real-time, and executing actions to outperform a single opponent without human intervention. The bot should be designed considering the game mechanics and rules specific to 1v1 matches. It must include decision-making algorithms that emphasize strategy, adaptability, and rapid responses based on the evolving game state. Implementation details should cover how the bot processes inputs, evaluates the current state, and executes actions effectively. # Steps 1. Thoroughly analyze and understand the specific game mechanics, rules, and win conditions relevant to 1v1 matches. 2. Architect the bot's decision-making framework incorporating components for strategy formulation, adaptability to opponent behavior, and timely real-time responses. 3. Develop and implement modules for input handling, real-time state evaluation, and efficient action execution. 4. Conduct comprehensive testing in simulated 1v1 environments, gather performance data, and iteratively refine the bot's strategies to maximize its effectiveness. # Output Format Deliver a detailed design overview outlining the bot architecture and strategic approach; include key algorithms expressed as pseudocode or concise code snippets illustrating decision-making and action execution; and provide a summary of testing outcomes demonstrating the bot's performance and improvements in 1v1 matches.

2D Solar System UI

Create a user interface (UI) using TypeScript that displays a 2D solar system visualization. The UI should allow users to adjust the positions of planets dynamically and to select between geocentric and heliocentric reference systems for the planetary orbits. Requirements: - Use TypeScript for the implementation. - Render a 2D solar system showing the sun, planets, and their orbits clearly. - Provide interactive controls to adjust each planet's position in real-time. - Include an option to toggle between geocentric (Earth-centered) and heliocentric (Sun-centered) viewing perspectives. - Ensure smooth and intuitive user interactions for adjusting positions and switching modes. # Steps 1. Set up a TypeScript project with a UI framework or canvas library suitable for 2D rendering. 2. Model the solar system including the sun and planets with appropriate initial positions. 3. Implement rendering logic to draw orbits and planets on a 2D plane. 4. Provide interactive controls (e.g., sliders or drag handles) to adjust planet positions individually. 5. Add a toggle control to switch the reference frame between geocentric and heliocentric systems. 6. Update the rendering dynamically to reflect position adjustments and system changes. # Output Format Provide the fully commented TypeScript source code for the UI, including all components, rendering logic, and interaction handlers necessary to fulfill the described functionality.

1-Minute Trading Script

Create a trading script for buying and selling on a 1-minute chart using guidelines from a provided documentation link. - Access the provided link and understand the essentials of the scripting environment from the documentation. - Follow any specific instructions or examples provided to generate the script. - Implement basic buy and sell commands suitable for a 1-minute timeframe. # Steps 1. **Visit the Documentation**: Open the provided link and read through the relevant sections to understand the scripting environment. 2. **Identify Key Concepts**: Look for any specific syntax, functions, or indicators suitable for creating a buy/sell script. 3. **Draft the Script**: - Set up the environment for a 1-minute chart. - Implement basic market conditions to trigger buy and sell commands (e.g., moving averages, RSI, or price crossovers). - Ensure the script can handle real-time data efficiently. 4. **Refine and Optimize**: - Make sure the script adheres to best practices in the documentation. - Test and refine logic to ensure accuracy and efficiency. # Output Format - Begin with a brief comment heading explaining the functionality of the script. - Write script code using the appropriate syntax from the documentation. - Clearly comment your code for readability. # Example ```javascript // Trading script for 1-minute buy/sell decisions // Implements a simple moving average crossover ... ``` # Notes - Specific indicators or market conditions should be adapted from the documentation if available. - Always ensure that the script complies with any legal or exchange-based regulations as outlined in the documentation. - Consider exception handling and logging as part of best practices.

1v1 Autonomous Game Bot

Create a fully autonomous 1v1 game-playing bot capable of competing without human input. The bot must analyze the current game state dynamically, make strategic decisions in real-time, and execute appropriate actions to outperform its opponent in a one-versus-one match setting. To accomplish this effectively, follow these key steps: 1. Analyze and fully understand the underlying game mechanics and rules pertinent to 1v1 matches to inform decision logic. 2. Design robust decision-making algorithms emphasizing strategic planning, adaptability to opponent moves, and fast real-time responsiveness. 3. Detail the implementation approach covering input processing (game state observation), evaluation of game state, and corresponding action execution. 4. Conduct thorough testing through simulated 1v1 matches, optimize the bot’s strategy and responsiveness based on performance data, and iterate as needed. # Output Format Provide a comprehensive output including: - A clear design overview outlining the architecture and components of the bot. - Key decision-making algorithms expressed in pseudocode or relevant code snippets showcasing game state analysis, strategy determination, and action execution. - A summarized report of testing outcomes demonstrating the bot’s effectiveness and improvements in competitive 1v1 gameplay scenarios. Ensure your response walks through reasoning before presenting final algorithms or designs, emphasizing clarity, adaptability, and strategic performance of the bot.

2D Space Shooter Game

Create a fully functional 2D top-down space shooter game using ON Core framework featuring the following elements: 1. Player Ship: - Movement controlled by arrow keys and WASD keys. - Shooting functionality triggered by the Spacebar. - Health system allowing the player to sustain 3 hits before the game ends. - Multiple weapon upgrade options including laser, missiles, and spread shot. 2. Enemies: - Include distinct enemy types such as small fighters, bombers, and formidable bosses. - Enemies should spawn in random, varied patterns. - Destroying enemies increases the player’s score. 3. Game Mechanics: - Implement a scoring system with persistent high-score saving. - Incorporate power-ups that restore health, upgrade weapons, and provide shields. - Include a smoothly scrolling starfield as the game's background. 4. Visual & Audio Design: - Use pixel-art or vector-style graphics for all visual elements. - Integrate sound effects for shooting, explosions, and collecting power-ups. - Add background music that loops seamlessly. 5. Difficulty & Progression: - Difficulty should increase progressively through waves. - Introduce a boss fight every 5 waves. Additional Requirements: - Provide clean, well-structured, and optimized code suitable for ON Core. - Ensure smooth performance throughout gameplay. - Design the codebase to allow easy customization of key parameters such as ship speed, enemy behavior, and scoring rules. # Steps - Start by setting up the player ship mechanics: movement, shooting, and health. - Implement enemy types with differing behaviors and spawn patterns. - Create the scoring and power-up systems. - Develop the visual and audio components. - Build the progression system with escalating difficulty and periodic boss battles. - Add configurable parameters for customization. # Output Format Provide the full source code for the game in a single code block, commented thoroughly to explain each major component and configuration option. Include any assets (graphics, audio) as references or placeholders with clear instructions for integration. Ensure that the code is modular and maintainable.

2D Bomber Game Plan

Create a detailed plan and explanation for developing a 2D Bomber-style game. Include the following elements: - Game concept overview: Describe the main objectives and gameplay mechanics typical of a 2D Bomber game. - Core gameplay elements: bomb placement, explosion mechanics, player controls, enemy AI, level design. - Technical considerations: recommended programming languages or frameworks, sprite and animation handling, collision detection. - Possible features: power-ups, multiplayer options, scoring system. - Step-by-step outline for building the game, considering design, development, testing, and deployment. Provide clear reasoning for each element and suitable examples where appropriate. # Steps 1. Define the game concept and player goals. 2. Detail player controls and bomb mechanics. 3. Design enemy AI and level layout. 4. Choose technology stack for implementation. 5. Outline development phases. 6. Discuss additional features and enhancements. # Output Format Deliver a well-structured text document explaining the plan, including bullet points and sections as needed for clarity.

1-Minute Trading Script

Develop a trading script for executing buy and sell orders on a 1-minute chart. Follow the steps outlined: 1. **Review Documentation**: Identify relevant sections that discuss the scripting environment, syntax, functions, and suitable indicators for a 1-minute trading strategy. 2. **Identify and Gather Requirements**: Determine key programming constructs, market indicators, and conditions required to generate buy/sell signals on a 1-minute timeframe. Focus on aspects that enable real-time processing and decision-making. 3. **Script Drafting**: - Initialize the script to operate on 1-minute intervals. - Implement conditions to trigger buy/sell orders with indicators like moving averages, RSI, or price crossovers. - Ensure real-time data handling is efficient. 4. **Refinement and Testing**: - Optimize the trading logic based on best practices from the documentation. - Conduct thorough testing for accuracy and efficiency. # Output Format - Include a comment block outlining the script’s purpose and functionality. - Present the script code clearly with proper syntax, highlighting core trading logic. - Use comments throughout the code for better understanding and maintainability. # Example ``` javascript // This script facilitates trading on a 1-minute chart // Moving Average crossover strategy is utilized for buy/sell signals var shortMA = calculateSMA(priceData, shortWindow); var longMA = calculateSMA(priceData, longWindow); if (shortMA > longMA) { // Execute a buy order executeBuyOrder(); } else if (shortMA < longMA) { // Execute a sell order executeSellOrder(); } ``` # Notes - Adapt indicators and conditions according to the documentation. - Comply with regulatory or exchange-specific rules. - Incorporate error handling and logging mechanisms to enhance script robustness.

3D Auto-Playing Snake

Create a 3D version of the classic Google Snake game with the following specifications: - The game environment should be a fully 3D map, allowing the snake to move within a three-dimensional space. - The snake should autonomously play itself; it must navigate and grow without user input. - Display the text "Follow me" prominently in the center of the map throughout gameplay. Ensure the game logic includes: - Automatic pathfinding algorithms for the snake to find and eat food items efficiently. - Smooth 3D movement and growth of the snake segments. - A visually clear and readable display of "Follow me" text, situated centrally. # Steps 1. Develop a 3D environment for the snake to move in. 2. Implement snake movement and growth mechanics in 3D. 3. Integrate an automatic AI to control the snake's movements. 4. Display the "Follow me" message centered on the map. # Output Format Provide the complete source code (preferably in JavaScript using WebGL or a similar 3D rendering library) for the game enabling the described functionality, along with brief comments explaining critical parts of the implementation.

1-Minute Trading Script

Create a trading script for buying and selling on a 1-minute chart using guidelines from a provided documentation link. - Access the provided link and understand the essentials of the scripting environment from the documentation. - Follow any specific instructions or examples provided to generate the script. - Implement basic buy and sell commands suitable for a 1-minute timeframe. # Steps 1. **Visit the Documentation**: Open the provided link and read through the relevant sections to understand the scripting environment. 2. **Identify Key Concepts**: Look for any specific syntax, functions, or indicators suitable for creating a buy/sell script. 3. **Draft the Script**: - Set up the environment for a 1-minute chart. - Implement basic market conditions to trigger buy and sell commands (e.g., moving averages, RSI, or price crossovers). - Ensure the script can handle real-time data efficiently. 4. **Refine and Optimize**: - Make sure the script adheres to best practices in the documentation. - Test and refine logic to ensure accuracy and efficiency. # Output Format - Begin with a brief comment heading explaining the functionality of the script. - Write script code using the appropriate syntax from the documentation. - Clearly comment your code for readability. # Example ```javascript // Trading script for 1-minute buy/sell decisions // Implements a simple moving average crossover ... ``` # Notes - Specific indicators or market conditions should be adapted from the documentation if available. - Always ensure that the script complies with any legal or exchange-based regulations as outlined in the documentation. - Consider exception handling and logging as part of best practices.

3D Battle Royale Game

Create a complete 3D Battle Royale-style game inspired by Free Fire, featuring a player character and environment built with React Three Fiber and @react-three/rapier physics engine, using TypeScript (TSX). Specifications: - Character: - Realistic height: 1.75 meters. - Physics: Gravity, mass, and collision detection implemented realistically. - Environment: - Tropical island terrain with varied elements: buildings, trees, mountains, roads, obstacles. - Spawn points for players and items. - Camera: - Third-person view following player. - Mouse-controlled free movement and rotation. - Player Controls: - Movement using WASD. - Sprint with Shift. - Jump with Space (realistic height ~1.5m). - Crouch with 'C'. - Aim (right-click) and shoot (left-click). - Switch among Assault Rifle, SMG, and Shotgun. - Interact: pick up weapons and shields. - Throw grenades and use healing items. - Animations: - Idle, running, jumping, aiming, and shooting states. - Physics and Collision: - Prevent walking through objects. - Avoid unnatural jumps or flying. - Development: - Code modular and scalable. - Optimize for performance. Steps: 1. Model player with accurate height and physics. 2. Build tropical island environment with spawn points. 3. Implement a third-person, mouse-controlled camera. 4. Set up detailed player input and interactions. 5. Integrate all animations. 6. Apply physics and collision logic. 7. Organize code in TSX using React Three Fiber and @react-three/rapier. 8. Ensure code is modular, scalable, and performant. Output Format: Provide the entire source code implementing the full game logic in TypeScript (TSX), compatible with React Three Fiber and @react-three/rapier, fully modularized and thoroughly commented. Include player controls, animations, physics, environment generation, and camera controls exactly as specified. Deliver only source code and inline comments without additional explanation or narrative. Notes: - Player experience and controls must replicate Free Fire closely. - Use realistic physics constants. - Environment supports spawning and item pickup mechanics. - Camera provides full rotational freedom around the player. - Prevent physics glitches such as clipping or unnatural flight.

Page 8 of 68

    Coding Prompts - Learning AI Prompts | Elevato