developer coding user risk: low
Three.js Top-Down Shooter Raycaster Mechanic
Develop a top-down shooter mechanic using THREE.Raycaster for instant-hit weapon fire. Implement a muzzle flash light that flickers for 0.05s upon firing.
PROMPT
Game Concept: A top-down tactical shooter where you play as a "Star-Marshal" clearing a space station of rogue drones. The game emphasizes precise hit-scan combat and dynamic lighting. Technical Prompt: Develop a top-down shooter mechanic. Use THREE.Raycaster for instant-hit weapon fire. Implement a muzzle flash light that flickers for 0.05s upon firing.
OPTIONAL CONTEXT
- game concept
ROLES & RULES
- Develop a top-down shooter mechanic.
- Use THREE.Raycaster for instant-hit weapon fire.
- Implement a muzzle flash light that flickers for 0.05s upon firing.
EXPECTED OUTPUT
- Format
- code
SUCCESS CRITERIA
- Develop top-down shooter mechanic with precise hit-scan combat
- Implement muzzle flash with dynamic lighting flickering for 0.05s
FAILURE MODES
- May neglect integration with full game loop or input handling
- Might overlook top-down camera constraints for raycasting
- Could fail to ensure compatibility with dynamic lighting system
CAVEATS
- Dependencies
-
- Three.js library
- Pre-existing scene with player, weapon, and drones
- Top-down camera setup
- Missing context
-
- Three.js version
- Input controls (e.g., keyboard/mouse scheme)
- Player/weapon models or scene setup
- Enemy or target implementation for testing raycast
- Ambiguities
-
- 'Develop a top-down shooter mechanic' is vague on scope (e.g., includes movement, collision, UI?).
- No details on player movement, aiming, or integration with existing scene.
QUALITY
- OVERALL
- 0.70
- CLARITY
- 0.85
- SPECIFICITY
- 0.75
- REUSABILITY
- 0.40
- COMPLETENESS
- 0.65
IMPROVEMENT SUGGESTIONS
- Specify sub-components: 'Implement player movement with WASD, mouse aiming, raycast shooting, and muzzle flash.'
- Add output format: 'Provide a complete, self-contained Three.js code example.'
- Use placeholders: 'Use [playerModel] and [weaponModel]; adapt for [game enemies].'
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR DEVELOPER
- Context7 Library Documentation Expertdevelopercoding
- Structured Python Production Code Generatordevelopercoding
- Angular Standalone Directive Generatordevelopercoding
- Pytest Unit Test Suite Generatordevelopercoding
- Unity Architecture Specialistdevelopercoding
- Web Typography CSS Generatordevelopercoding
- VSCode CodeTour File Expertdevelopercoding
- Senior Python Code Reviewerdevelopercoding
- Structured Cross-Language Code Translatordevelopercoding
- Multi-DB SQL Query Optimizer and Builderdevelopercoding