You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BalatroBot includes a comprehensive Makefile that provides a convenient interface for all development tasks. Use `make help` to see all available commands:
121
114
122
-
# Type checking
123
-
basedpyright
115
+
```bash
116
+
# Show all available commands with descriptions
117
+
make help
124
118
```
125
119
126
-
### Testing Requirements
127
-
128
-
!!! warning
129
-
130
-
All tests require Balatro to be running in the background. Use `./balatro.sh --status` to check if the game is running.
131
-
132
-
#### Single Instance Testing
120
+
#### Installation & Setup
133
121
134
122
```bash
135
-
# Start Balatro with default port (12346)
136
-
./balatro.sh -p 12346
137
-
138
-
# Run all tests
139
-
pytest
140
-
141
-
# Run specific test file
142
-
pytest tests/lua/test_api_functions.py
143
-
144
-
# Run with verbose output and stop on first failure
make install-dev # Install with development dependencies
149
125
```
150
126
151
-
#### Parallel Testing with Multiple Balatro Instances
152
-
153
-
The test suite supports running tests in parallel across multiple Balatro instances. This dramatically reduces test execution time by distributing tests across multiple game instances.
154
-
155
-
**Setup for Parallel Testing:**
156
-
157
-
1. **Check existing instances and start multiple Balatro instances on different ports**:
158
-
159
-
```bash
160
-
# First, check if any instances are already running
161
-
./balatro.sh --status
162
-
163
-
# If you need to kill all existing instances first:
164
-
./balatro.sh --kill
165
-
```
166
-
167
-
```bash
168
-
# Start two instances with a single command
169
-
./balatro.sh -p 12346 -p 12347
170
-
171
-
# With performance optimizations for faster testing
172
-
./balatro.sh --fast -p 12346
173
-
174
-
# Headless mode for server environments
175
-
./balatro.sh --headless -p 12346
176
-
177
-
# Fast Headless mode on 4 instances (recommended configuration)
- **Resource Usage**: Minimal CPU/GPU usage for pure game logic execution
318
-
- **Server Deployment**: Ideal for cloud-based bot training
319
-
320
-
#### Implementation Details
321
-
322
-
The configuration system is implemented in`src/lua/settings.lua` and provides:
213
+
### Environment Variables
323
214
324
-
- **Environment Detection**: Reads environment variables on mod initialization
325
-
- **Love2D Patches**: Modifies game engine behavior for performance optimization
326
-
- **Balatro Integration**: Configures game-specific settings through global variables
327
-
- **Fallback Handling**: Graceful degradation when graphics context is unavailable
215
+
Configure BalatroBot behavior with these environment variables:
328
216
329
-
This configuration system enables BalatroBot to run efficiently in diverse environments, from local development with full graphics to high-performance server deployments with headless operation.
217
+
- **`BALATROBOT_HEADLESS=1`**: Disable graphics for server environments
218
+
- **`BALATROBOT_FAST=1`**: Enable 10x speed with disabled effects for testing
219
+
- **`BALATROBOT_PORT`**: TCP communication port (default: "12346")
0 commit comments