Billiards Engine 2.0 is a comprehensive Unity solution for creating professional billiards games. Built with modern Unity features and optimized for the High Definition Render Pipeline (HDRP), this engine provides everything you need to create realistic, engaging billiards experiences.
Key Features
Multiple Game Types
Support for 8-Ball, 9-Ball, 15-Ball, Straight Pool, and One Pocket with customizable rules and scoring systems.
- 8-Ball Pool (Solids vs Stripes)
- 9-Ball Pool (Lowest Ball First)
- 15-Ball Pool (Point Scoring)
- Straight Pool (Continuous Play)
- One Pocket (Strategic Play)
Realistic Physics
Advanced physics simulation with accurate ball movement, collision detection, and realistic friction effects.
- Precise collision detection
- Realistic ball physics
- Customizable friction
- Spin effects
Visual Excellence
High-quality 3D models, materials, and lighting optimized for HDRP with stunning visual effects.
- HDRP optimized materials
- Realistic lighting
- High-quality textures
- Post-processing effects
Developer Friendly
Clean, well-documented codebase with customization options for easy integration.
- Comprehensive documentation
- Modular architecture
- Easy integration
Technical Specifications
Unity Version
2022.3.46f1 LTS or newer
Render Pipeline
High Definition Render Pipeline (HDRP)
Scripting
C# with .NET 6.0+ support
Platforms
Windows, macOS, Linux, Mobile
System Requirements
Before installing Billiards Engine 2.0, ensure your development environment meets the following requirements. These specifications are designed to provide optimal performance and compatibility.
Unity Requirements
Unity Version
Minimum: Unity 2022.3.46f1 (LTS)
Recommended: Unity 2022.3.x LTS or newer
Note: This asset is optimized for Unity 2022.3 LTS and may not work with older versions
Render Pipeline
Required: High Definition Render Pipeline (HDRP)
Version: HDRP 17.0.4 or newer
Note: The asset is specifically designed for HDRP and includes optimized materials
Development Environment
Code Editor
Recommended: Visual Studio Code with C# Extension
Alternative: Visual Studio, Rider, or any C# editor
Note: Proper C# support is required for script editing
.NET Requirements
- .NET Core 6.0.404 or newer
- .NET Framework 4.7.1 or newer
- Mono runtime for Unity compatibility
Hardware Requirements
Development
- CPU: Intel i5 or AMD equivalent (4+ cores recommended)
- RAM: 8GB minimum, 16GB recommended
- GPU: DirectX 11 compatible graphics card with 2GB+ VRAM
- Storage: 5GB free space for project and assets
- Display: 1920x1080 minimum resolution
Runtime
- CPU: Intel i3 or AMD equivalent (2+ cores)
- RAM: 4GB minimum, 8GB recommended
- GPU: DirectX 11 compatible graphics card with 1GB+ VRAM
- Storage: 2GB free space for game installation
- Display: 1280x720 minimum resolution
Installation Guide
Follow this comprehensive installation guide to set up Billiards Engine 2.0 in your Unity project. The process is straightforward and includes verification steps to ensure everything works correctly.
Quick Installation
Download and Import
Download the Billiards Engine 2.0 package and import it into your Unity project using the Package Manager or Asset Store.
- Open Unity Package Manager (Window > Package Manager)
- Click the "+" button and select "Add package from disk"
- Navigate to the downloaded package and select the .unitypackage file
- Click "Open" to import all assets
Verify HDRP Setup
Ensure your project is using the High Definition Render Pipeline (HDRP) as required by this asset.
- Check Project Settings > Graphics > Scriptable Render Pipeline Settings
- Verify HDRP is assigned as the render pipeline
- If not, follow the HDRP setup guide in the documentation
Import Sample Scene
Import the provided sample scene to see the system in action and understand the setup.
- Navigate to Assets > GrownAssets > Billiards Engine 2.0 > Scenes
- Open the "Game.unity" scene
- Review the scene hierarchy and component setup
- Press Play to test the basic functionality
Configure Your Project
Set up the billiards system in your own scene with the provided prefabs and components.
- Add the Table prefab to your scene
- Configure the Ball prefabs and physics materials
- Set up the camera system and UI components
- Test the basic gameplay mechanics
Troubleshooting Installation
HDRP Compatibility Issues
If you see material or shader errors:
- Ensure your project is using HDRP (not URP or Built-in)
- Check that HDRP materials are properly assigned
- Verify HDRP package is installed in Package Manager
- Try reimporting the assets if issues persist
Missing Dependencies
If components or scripts are missing:
- Check that all assets were imported successfully
- Verify no import errors in the Console window
- Reimport the package if necessary
- Ensure Unity version compatibility (2022.3.46f1+)
Performance Issues
If you experience performance problems:
- Check your graphics settings and quality levels
- Verify HDRP settings are optimized for your target platform
- Consider reducing shadow quality or post-processing effects
- Test on your target platform to ensure compatibility
Quick Start Guide
Get your first billiards game running in under 5 minutes with this quick start guide. This tutorial covers the essential setup steps to get you playing immediately.
Getting Started in 5 Minutes
Follow this quick guide to get your first game running immediately:
1. Open Sample Scene
Navigate to Assets > GrownAssets > Billiards Engine 2.0 > Scenes and open Game.unity
2. Press Play
Click the Play button in Unity to start the game. You should see a fully functional billiards table.
3. Test Controls
Use Mouse to aim, Left Click to shoot, and R to reset the rack.
4. Customize Settings
Select the GameRules object and modify game type, rules, and physics settings in the Inspector.
5. Save and Build
Save your scene and build your project. The billiards system is now ready for your game!
Basic Controls
Mouse Movement
Aim the cue by moving the mouse around the table
Left Click
Shoot the cue ball with the current power setting
Right Click
Hold to adjust shot power (drag up/down)
R Key
Reset the rack and start a new game
Space
Toggle between players (in multiplayer mode)
ESC
Pause the game and access menu options
Component Setup Guide
Main Game Object Setup
Start by configuring the main game object that contains the GameManager component:
Required Components
GameManager
- Main game controller and state managementGameplayManager
- Gameplay logic and flow controlGameRules
- Game rules engine and enforcementMultiplayerManager
- Multiplayer functionality and player managementBallCollisionDetector
- Ball collision detection and physics
Component References
Component | Field | Reference | Required |
---|---|---|---|
GameManager | m_gameplayManager | GameplayManager component | ✅ Yes |
GameManager | m_gameRules | GameRules component | ✅ Yes |
GameManager | m_multiplayerManager | MultiplayerManager component | ✅ Yes |
MultiplayerManager | gameRules | GameRules component | ✅ Yes |
MultiplayerManager | playerController | Player component | ✅ Yes |
MultiplayerManager | shootController | ShootController component | ✅ Yes |
ShootController | m_gameRules | GameRules component | ✅ Yes |
ShootController | m_ballCollisionDetector | BallCollisionDetector component | ✅ Yes |
Pocket Setup
Configure all 6 pockets around the table:
For Each Pocket:
- Select the pocket GameObject
- Add
BallPocketingDetector
component - Set the pocket number (1-6) in the inspector
- Drag the GameRules component to the
gameRules
field - Ensure the pocket has a Collider component set as trigger
Cue Ball Setup
Configure the cue ball for proper collision detection:
Cue Ball Configuration:
- Select the cue ball GameObject
- Add
BallCollisionDetector
component - Drag the GameRules component to the
gameRules
field - Drag the GameplayManager component to the
gameplayManager
field - Ensure the cue ball has a Rigidbody and Collider
Player Setup
Configure the player object for proper gameplay:
Player Configuration:
- Select the Player GameObject
- Ensure
Player
component is attached - Add
ShootController
component - Add
CueBallPositionController
component - Add
Aimer
component for aiming system - Configure all component references
Camera Setup
Configure the camera system for proper viewing:
Camera Configuration:
- Select the CameraManager GameObject
- Assign the top view camera to
m_topViewCamera
- Assign rail cameras to
m_railCameras
array - Set the cue ball as the
m_lookAtTarget
- Configure camera settings (FOV, zoom, etc.)
UI Setup
Configure the user interface elements:
UI Configuration:
- Select the UI Canvas
- Ensure
GameplayUI
component is attached - Assign the Player reference
- Configure UI elements (score displays, buttons, etc.)
- Test UI responsiveness and functionality
Scene Setup
Scene Structure
The main game scene should be organized with the following structure:
Required GameObjects
- GameManager: Main game controller object
- Table: Pool table with proper colliders
- Pockets: 6 pocket objects with trigger colliders
- Cue Ball: White ball with physics components
- Rack Area: Designated area for ball racking
- Cameras: Main camera and rail cameras
- UI Canvas: User interface elements
- Lights: Proper lighting setup for HDRP
Scene Configuration
Basic Setup
- Import the Game.unity scene from the asset package
- Ensure all GameObjects are properly positioned
- Check that lighting is configured for HDRP
- Verify camera positions and settings
- Test the scene by pressing Play
Material Setup
HDRP Materials
The asset includes optimized HDRP materials for all game elements. These materials are pre-configured for the High Definition Render Pipeline.
Material Types
- Ball Materials: HDRP materials for all 15 balls
- Table Materials: Cloth and wood materials for the table
- Rail Materials: Cushion materials with proper physics
- UI Materials: Materials for UI elements and effects
Material Configuration
Setup Steps
- Ensure HDRP is properly configured in your project
- Import all materials from the Materials folder
- Assign materials to the appropriate GameObjects
- Check that materials render correctly in the scene
- Test materials under different lighting conditions
Physics Setup
Physics Materials
The asset includes custom physics materials optimized for realistic billiards gameplay.
Physics Material Types
- Ball Physics: Optimized for realistic ball movement and collisions
- Rail Physics: Proper bounce and cushion behavior
- Table Surface: Realistic cloth friction and effects
Physics Configuration
Setup Steps
- Import physics materials from the Physics folder
- Assign Ball Physics material to all ball GameObjects
- Assign Rail Physics material to table rails
- Assign Table Surface material to the table cloth
- Test physics behavior by shooting the cue ball
9-Ball Pool
Overview
9-Ball is a fast-paced pool game where players must hit the lowest numbered ball first. The objective is to pocket the 9-ball legally to win the game.
Rules
- Players must hit the lowest numbered ball on the table first
- Any ball can be pocketed after the legal hit
- Pocketing the 9-ball legally wins the game
- Push-out rule is available after the break (configurable)
- Call shots are optional (configurable)
Setup
- Open the GameRules component in the Inspector
- Set
currentGameType
toNineBall
- Configure
enablePushOut
as desired - Set
requireCallShots
to true/false - Reset the rack to apply changes
8-Ball Pool
Overview
8-Ball is the most popular pool game. Players are assigned either solids (1-7) or stripes (9-15) and must pocket all their balls before legally pocketing the 8-ball.
Rules
- Players are assigned solids (1-7) or stripes (9-15)
- Must pocket all assigned balls before the 8-ball
- 8-ball must be pocketed last to win
- Solids first rule (configurable)
- Call shots are optional (configurable)
Setup
- Open the GameRules component in the Inspector
- Set
currentGameType
toEightBall
- Configure
solidsFirst
as desired - Set
requireCallShots
to true/false - Reset the rack to apply changes
15-Ball Pool
Overview
15-Ball is a traditional pool game using all 15 balls. Players score points by pocketing balls, with the 15-ball worth the most points.
Rules
- All 15 balls are used
- Balls 1-14 are worth their number in points
- Ball 15 is worth 15 points
- First player to reach target score wins
- Call shots are optional (configurable)
Setup
- Open the GameRules component in the Inspector
- Set
currentGameType
toFifteenBall
- Set
pointsToWin
to desired target score - Set
requireCallShots
to true/false - Reset the rack to apply changes
Straight Pool
Overview
Straight Pool is a continuous game where any ball can be pocketed for points. Players must call their shots and reach a target score to win.
Rules
- Any ball can be pocketed for 1 point
- Call shots are required
- First player to reach target score wins
- Rack is reset when 14 balls are pocketed
- Continuous play until target score is reached
Setup
- Open the GameRules component in the Inspector
- Set
currentGameType
toStraightPool
- Set
pointsToWin
to desired target score - Set
requireCallShots
to true - Reset the rack to apply changes
One Pocket
Overview
One Pocket is a strategic game where each player has one designated corner pocket. Players can only score by pocketing balls in their assigned pocket.
Rules
- Each player has one corner pocket
- Can only score in assigned pocket
- First player to reach target score wins
- Strategic gameplay with defensive shots
- Call shots are optional (configurable)
Setup
- Open the GameRules component in the Inspector
- Set
currentGameType
toOnePocket
- Set
pointsToWin
to desired target score - Set
requireCallShots
to true/false - Reset the rack to apply changes
Core Scripts Reference
GameManager
The main game controller that manages global game state and coordinates between other systems.
Key Methods
StartNewGame()
- Initialize a new gamePauseGameplay()
- Pause the current gameResumeGameplay()
- Resume paused gameRestartGameplay()
- Restart the current game
Required References
m_gameplayManager
- GameplayManager componentm_gameRules
- GameRules componentm_multiplayerManager
- MultiplayerManager component
GameplayManager
Manages gameplay flow, turn switching, and game state transitions.
GameRules
Enforces game rules, detects fouls, and manages game logic for different game types.
GameSettingsManager
Manages game settings, configuration, and user preferences.
Ball Scripts Reference
BallCollisionDetector
Handles ball collision detection and physics interactions.
BallPocketingDetector
Detects when balls are pocketed and manages pocket interactions.
CueBall
Specialized behavior for the cue ball including positioning and state management.
RackGenerator
Generates ball racks for different game types with proper positioning.
Player Scripts Reference
Player
Base player class with common functionality and state management.
Aimer
Handles aiming system, visual feedback, and shot direction calculation.
ShootController
Manages shooting mechanics, power control, and shot execution.
AISystem
AI logic and decision making for computer opponents.
Helper Scripts Reference
AimLineTracker
Manages the aiming line visualization and tracking.
AITableAnalyzer
Analyzes table state for AI decision making.
BallTypeHelper
Utility functions for ball type identification and management.
CueBallHitTracker
Tracks cue ball hits and collision events.
OverlappingChecker
Checks for ball overlapping and positioning issues.
UI Scripts Reference
GameplayUI
Main UI controller for gameplay interface elements.
BallStatusIndicator
Displays ball status and state information.
GameplayUIManager
Manages UI state and transitions during gameplay.
Common Issues & Solutions
Setup Issues
Components Not Working
Problem: Game doesn't start or components show errors
Solution: Ensure all component references are properly set in the Inspector. Check that GameManager, GameplayManager, GameRules, and MultiplayerManager are all connected.
Balls Not Moving
Problem: Balls don't respond to shots or physics
Solution: Check that balls have Rigidbody components and proper physics materials. Ensure BallCollisionDetector is attached to the cue ball.
Pockets Not Working
Problem: Balls don't get detected when pocketed
Solution: Ensure BallPocketingDetector is attached to all pockets with proper trigger colliders. Set pocket numbers 1-6.
Performance Issues
Low Frame Rate
Problem: Game runs slowly or stutters
Solution: Check Unity's profiler for performance bottlenecks. Optimize lighting, reduce shadow quality, or simplify materials if needed.
Memory Issues
Problem: High memory usage or crashes
Solution: Ensure proper cleanup of game objects. Check for memory leaks in custom scripts.
Error Messages & Solutions
Common Error Messages
NullReferenceException
Cause: Component references not set in Inspector
Solution: Check all component references in GameManager, GameplayManager, and other scripts
MissingComponentException
Cause: Required components not attached to GameObjects
Solution: Ensure all required components are attached to the correct GameObjects
Physics Material Not Found
Cause: Physics materials missing or incorrectly referenced
Solution: Check that physics materials are in the correct folder and properly assigned
Performance Optimization
Optimization Tips
- Lighting: Use baked lighting where possible to reduce real-time calculations
- Shadows: Reduce shadow resolution or use distance-based shadow culling
- Materials: Use optimized HDRP materials and reduce texture sizes
- Physics: Limit the number of active physics objects
- Scripts: Optimize Update() methods and use object pooling for frequently created objects
Quality Settings
Adjust Unity's quality settings based on target platform:
- High End: Maximum quality for PC builds
- Medium: Balanced quality for most platforms
- Low: Optimized for mobile and lower-end devices
Frequently Asked Questions
General Questions
Q: What Unity version is required?
A: Unity 2022.3.46f1 (LTS) or newer is required. The asset is optimized for Unity 2022.3 LTS.
Q: Does this work with URP or Built-in pipeline?
A: No, this asset is specifically designed for HDRP (High Definition Render Pipeline) and requires HDRP to function properly.
Q: Can I modify the game rules?
A: Yes, the GameRules component allows you to configure various game settings including call shots, fouls, and game-specific rules.
Q: How do I add custom ball textures?
A: Replace the ball texture files in the Materials folder and update the material references in the RackGenerator component.
Q: Can I use this for commercial projects?
A: Yes, this asset can be used in commercial projects. Please refer to the license terms included with the asset.
Contact Support
Get Help
If you need assistance with Billiards Engine 2.0, our support team is here to help.
Email Support
Email: grownassets@gmail.com
For technical support, bug reports, or general questions
Response Time: Usually within 24-48 hours
Before Contacting Support
- Check this documentation for solutions to common issues
- Ensure you're using the correct Unity version (2022.3.46f1+)
- Verify HDRP is properly configured in your project
- Test with a fresh Unity project to isolate issues
- Include Unity version, error messages, and steps to reproduce the issue
Bug Reports
When reporting bugs, please include:
- Unity version and platform
- Detailed description of the issue
- Steps to reproduce the problem
- Screenshots or videos if applicable
- Console error messages