Develop a Python Ball Trajectory Simulation Game with Pygame, share the complete code so I can copy and paste to test it:
Objective

Create an interactive Python simulation game using the Pygame library that allows users to launch a ball over an adjustable wall. The simulation should accurately depict physics-based motion, handle collisions precisely, and provide an intuitive user interface for interaction and adjustments.
Key Components and Features
1. Display Setup

    Window Dimensions:
        Total Size: 1300 pixels (Width) x 800 pixels (Height).
        Simulation Area: Upper 650 pixels in height.
        UI Area: Lower 150 pixels in height.
    Background:
        Color: Light Gray.
        Grid Lines: Draw horizontal and vertical grid lines every 200 units within the simulation area to aid alignment.

2. Physics Mechanics

    Gravity:
        Direction: Downwards along the Z-axis.
        Magnitude: 650 units per second squared.
    Ball Properties:
        Radius: 96.3881 units.
        Color: Red.
        Initial Position: Centered horizontally (y=0) and resting on the ground (z=BALL_RADIUS).
        Velocity: Adjustable via UI sliders for speed and launch angle.
        Max Speed: 6000 units/second.
    Wall Properties:
        Position: Fixed at y=1474 units along the Y-axis.
        Height: Adjustable via a UI slider (0 to 1820 units).
        Thickness: Equal to the ball's radius (96.3881 units).
        Color: Dark Gray.
    Boundaries:
        Y-axis: -3581 to 3581 units.
        Z-axis: 0 (ground) to 1820 units (ceiling).

3. User Interface (UI)

    Sliders:
        Initial Speed Slider:
            Range: 0 to 6000 units/second.
            Default: 1000 units/second.
            Label: "Initial Speed".
        Launch Angle Slider:
            Range: -180° to 180°.
            Default: 45°.
            Label: "Launch Angle".
        Wall Height Slider:
            Range: 0 to 1820 units.
            Default: 400 units.
            Label: "Wall Height".
    Buttons:
        Launch Button:
            Label: "Launch".
            Function: Initiates the ball's launch based on current slider settings.
        Reset Ball Button:
            Label: "Reset Ball".
            Function: Resets the ball to its initial position and stops its movement.
        Reset Wall Button:
            Label: "Reset Wall".
            Function: Resets the wall height to the default value (400 units).

4. Ball Mechanics and Collision Handling

    Motion Update:
        Update the ball's position and velocity each frame based on current velocities and gravity.
    Collisions:
        Wall Collision:
            Detect collision only with the wall's boundaries considering its thickness and height.
            Upon collision, invert the horizontal velocity (Vy) to simulate a bounce.
            Prevent the ball from overlapping the wall by adjusting its position post-collision.
        Ceiling Collision:
            Detect collision with the ceiling.
            Invert the vertical velocity (Vz) upon collision.
        Ground Collision:
            Detect collision with the ground.
            Stop the ball's movement upon impact (no bounce).
        Side Boundaries Collision:
            Reflect the ball off the left and right boundaries by inverting Vy.
    Prevent Unintended Collisions:
        Ensure the ball does not interact with aesthetic elements like prediction lines by isolating collision logic strictly to physical boundaries and the wall.

5. Trajectory Prediction

    Visualization:
        Display a light blue line indicating the predicted path of the ball based on current launch parameters.
        The prediction should account for potential ceiling bounces but exclude ground bounces.
    Accuracy:
        Ensure the prediction accurately reflects the ball's physics, including multiple bounces if applicable.
        Exclude any collision logic from the prediction line to prevent unintended interactions.

6. User Interactions

    Dragging the Ball:
        Allow users to click and drag the ball within the simulation area to set its initial position.
        Enforce constraints to prevent the ball from intersecting with walls, ceiling, or ground during placement.
    Adjusting Sliders and Buttons:
        Real-time updates to simulation parameters as users interact with sliders.
        Responsive buttons that execute their respective functions promptly upon being clicked.

7. Information Display

    Details to Show:
        Initial Position: y and z coordinates.
        Current Position: y and z coordinates.
        Initial Velocity: Vy and Vz components.
        Current Velocity: Vy and Vz components.
        Current Wall Height.
        Prediction Result: Indicate whether the ball will make it over the wall (displayed in green for success and red for failure).

8. Visual Enhancements

    Grid Lines: Aid in accurate placement and alignment of the ball.
    Dynamic Wall Visualization: The wall should visibly adjust in height based on the slider's value.
    Clean Aesthetics: Ensure all UI elements are neatly organized and visually distinct for a user-friendly experience.

9. Performance and Optimization

    Frame Rate: Maintain a consistent 60 FPS for smooth animations.
    Trajectory Computation: Optimize the prediction algorithm to handle multiple bounces without significant performance loss.
    Collision Precision: Ensure precise collision detection to prevent visual glitches like the ball bouncing on invisible objects.

Implementation Guidelines

    Initialize Pygame and Setup Display:
        Create the main window with specified dimensions.
        Define color schemes and fonts for UI elements and simulation visuals.

    Define Classes:
        Ball Class:
            Manage properties like position, velocity, radius, and color.
            Handle motion updates and collision detection/responses.
        Slider Class:
            Manage slider properties, handle user interactions, and render sliders with labels.

    Handle Events:
        Mouse Events:
            Detect clicks on buttons and initiate corresponding actions.
            Handle dragging of the ball with constraints to prevent improper placements.
            Manage slider adjustments for real-time parameter updates.
        Quit Event: Ensure the program exits gracefully when the user closes the window.

    Update Mechanics:
        Continuously update the ball's position and velocity based on physics calculations.
        Detect and respond to collisions with walls, ceiling, ground, and boundaries.

    Render Graphics:
        Draw the simulation area, including grid lines, walls, and boundaries.
        Render the ball and its predicted trajectory.
        Display UI elements like sliders, buttons, and informational texts.

    Trajectory Prediction:
        Calculate the ball's anticipated path considering current velocities and gravity.
        Visually represent the trajectory without implementing collision logic on prediction lines.

    Information Display:
        Update and render real-time information about the ball's state and prediction results.

    Performance Optimization:
        Ensure efficient rendering and physics calculations to maintain smooth performance.
        Limit the complexity of trajectory predictions to balance accuracy and performance.

Testing and Validation

    Functional Testing:
        Verify that launching the ball with various speed and angle settings behaves as expected.
        Ensure wall height adjustments dynamically affect both the wall's appearance and collision outcomes.
        Test dragging the ball to different positions and confirm proper constraints.

    Collision Testing:
        Confirm that the ball only collides with the wall, ceiling, ground, and boundaries.
        Ensure no unintended collisions occur with prediction lines or aesthetic elements.

    UI Testing:
        Check that sliders and buttons respond accurately to user interactions.
        Validate that informational displays update correctly in real-time.

    Performance Testing:
        Monitor frame rates to ensure consistency.
        Assess trajectory prediction accuracy at high speeds and angles.

Final Notes

    Code Maintainability:
        Write clean, readable code with appropriate comments explaining complex logic sections.
        Organize code into modules or classes to enhance scalability and maintenance.

    User Experience:
        Design an intuitive and visually appealing interface.
        Provide immediate visual feedback for user actions to enhance interactivity.

    Extensibility:
        Structure the code to allow future enhancements, such as adding multiple walls, varying gravity, or additional interactive elements.