Advanced Battle Royale Player Controller
Prompt
You are tasked with designing a comprehensive 3D Player Character Controller system inspired by Free Fire with full features and detailed specifications. --- **System Name:** Advanced Battle Royale Player Controller **Objective:** Develop a third-person 3D player movement and control system supporting full keyboard and mouse input. **Suggested Engines:** Unity (using C#) or Three.js / React Three Fiber (using TypeScript) **Viewpoint:** Third-Person (camera follows behind the player, orbit style, free rotation around the player via mouse, mouse fixing disabled) --- ### Player Specifications: - Height: 1.75 meters realistic scale - States: Idle, Walk, Run, Jump, Crouch, Aim, Shoot, Throw Gloo Wall - Model formats: Loadable GLB or FBX files containing skeleton rigs and animations - Features: - Eye and head movement with Look At functionality - Support dynamic changing of clothing and weapons --- ### Controls (Keyboard + Mouse): - W: Move forward - A: Move left - S: Move backward - D: Move right - Shift: Run - Space: Jump - C: Crouch - Mouse Movement: Rotate camera and player - Left Mouse Button: Shoot - Right Mouse Button (hold): Aim - 1, 2, 3: Switch between weapons or Gloo Wall - G: Throw or place Gloo Wall --- ### Movement System: - Animator Controller manages transitions between states automatically (Idle ↔ Walk ↔ Run ↔ Jump) - Jump behavior: - Rapid ascent - Smooth descent with gravity applied - Air control for movement and rotation - Rotation controlled by mouse: - Camera freely orbits player - Player rotates smoothly to face camera direction --- ### Weapons System: - Weapon types: SMG (Light weapon), Sniper Rifle, Pistol, Grenades / Gloo Wall - Each weapon has: - 3D model - Holding animation - Aim animation - Fire animation - Reload animation - Includes systems: - Dynamic crosshair changing based on state - Hit detection with raycasting and damage calculation - Effects: Muzzle flash and bullet sounds --- ### Gloo Wall System: - Triggered by pressing G - Deploys a Gloo Wall in front of the player - Cooldown timer prevents immediate multiple placements - Characteristics: - Blocks bullets - Can be destroyed after taking damage or over time - Can be moved or integrated with AI behaviors --- ### Additional Features: - Health and damage system with a visible health bar - Ammo management with HUD display - Minimap with safe zone shrinking system - Optional mobile support with touch controls - Optional respawn system --- ### Recommended Technologies: - Engines: Unity (C#) or React Three Fiber (TypeScript) - 3D files: GLB/GLTF for characters and weapons - Animations: Mixamo or Blender custom animations - Physics: Rigidbody with Capsule Collider --- # Steps 1. Load 3D character model with skeleton rig and animations. 2. Implement input system supporting keyboard & mouse mapping as specified. 3. Setup Animator Controller for player state transitions. 4. Configure camera to orbit freely and rotate player smoothly. 5. Create weapon management system with models, animations, and firing logic. 6. Develop Gloo Wall deploy and cooldown mechanics. 7. Integrate health, ammo, minimap, and UI elements. 8. Add optional features like mobile controls and respawning. # Output Format Describe the system design, architecture, and implementation details clearly and comprehensively, including code structure, key algorithms, and API choices, while adhering to the specifications above. Provide illustrative pseudocode or code snippets in C# or TypeScript as appropriate. Organize content into major sections matching the above features for readability.
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.