3D FPS Training Game
Prompt
Create a complete single-file (index.html) 3D FPS game using HTML, JavaScript, and CSS, with the following features and details: - **Visuals and Gameplay:** - A good-looking, modern gun model with shooting animations, firing mechanics, bullet visuals, slight recoil, and visible hands. - Smooth player movement including walking and possibly jumping. - A single well-designed training map featuring realistic terrain (grass, terrain textures), logical obstacles, and visually appealing environment. - **Game Mechanics:** - Bots that walk around the map and behave logically; with features including adjustable bot speed (faster/slower), quantity of bots, armored bots, and jumping bots. - Interactive buttons in the training map enabling control over bot behavior similar to CS:GO training maps (e.g., change bot speed, number, bot types). - **User Interface:** - A professional, modern main menu with at least these buttons: Play, Inventory, Settings. - Play button launches the training map and displays a polished loading screen while the game loads. - Settings menu with audio settings (volume controls), video settings including resolution options, FPS limit, an FPS counter toggle, and additional FPS-related options. - Inventory section showing all default skins currently in the game. - Shop button allowing purchase of skins using in-game currency. - Implement an in-game currency system starting with 2000 gold; each item costs 1000 gold. - Include at least one default skin for AK-47 and one knife skin (such as Karambit Butterfly), purchasable in the shop. - Skin inspection feature both in the menu and during gameplay, enabling players to view weapon skins closely. - **Audio:** - Include appropriate, high-quality sounds: shooting, footsteps, reloading, menu interactions, etc. - **Code Quality and Design:** - Use neat, modular, and well-commented code. - Ensure the entire game is packed in a single index.html file. - Interface and visuals should be modern, clean, and professional, showcasing advanced developer skills. # Steps 1. Set up the HTML structure with necessary canvas or WebGL context. 2. Develop 3D rendering for weapons, hands, and the map. 3. Implement player mechanics: movement, shooting with animations and recoil. 4. Create AI for various bot types with adjustable parameters. 5. Build the training map with obstacles, terrain, and moving targets. 6. Design the main menu, loading screen, inventory, shop, and settings interface. 7. Add audio effects and volume controls. 8. Implement in-game currency and purchase system for skins. 9. Enable skin inspection inside menu and gameplay. # Output Format - A single, standalone index.html file containing all HTML, CSS, and JavaScript to run the described FPS game in a modern browser. - All assets (textures, models, sounds) embedded or referenced such that no external dependencies are required beyond this file. - Well-commented code sections explaining the purpose of key parts. # Notes - Focus on performance and responsiveness for a smooth FPS experience. - Ensure all UI elements are intuitive and professionally styled. - The game should be fully functional as described, ready for future expansion. Make sure to reason through implementation steps clearly before coding.
Related Coding Prompts
Write Code
As a seasoned programmer, your task is to write code in [programming language] to [perform action]. The code should be efficient, well-structured, and optimized for performance. Make sure to follow best practices and industry standards while implementing the necessary algorithms and logic to achieve the desired functionality. Test the code thoroughly to ensure it functions as intended and meets all requirements. Additionally, document the code properly for future reference and maintenance.
Debug Code
Act as a seasoned programmer with over 20 years of commercial experience. Analyze the provided [piece of code] that is causing a specific [error]. Your task involves diagnosing the root cause of the error, understanding the context and functionality intended by the code, and proposing a solution to fix the issue. Your analysis should include a step-by-step walkthrough of the code, identification of any bugs or logical mistakes, and a detailed explanation of how to resolve them. Additionally, suggest any improvements or optimizations to enhance the performance, readability, or maintainability of the code based on your extensive experience. Ensure that your solution adheres to best practices in software development and is compatible with the current development environment where the code is being executed.
Do Code Review
As a seasoned programmer with over 20 years of commercial experience, your task is to perform a comprehensive code review on the provided [piece of code]. Your review should meticulously evaluate the code's efficiency, readability, and maintainability. You are expected to identify any potential bugs, security vulnerabilities, or performance issues and suggest specific improvements or optimizations. Additionally, assess the code's adherence to industry standards and best practices. Your feedback should be constructive and detailed, offering clear explanations and recommendations for changes. Where applicable, provide examples or references to support your suggestions. Your goal is to ensure that the code not only functions as intended but also meets high standards of quality and can be easily managed and scaled in the future. This review is an opportunity to mentor and guide less experienced developers, so your insights should be both educational and actionable.