feat: Convertir BOIDS a sistema time-based (independiente de framerate)
- Conversión completa de físicas BOIDS de frame-based a time-based - Velocidades: ×60 (px/frame → px/s) - Aceleraciones (Separation, Cohesion): ×3600 (px/frame² → px/s²) - Steering proporcional (Alignment): ×60 - Límites de velocidad: ×60 Constantes actualizadas en defines.h: - BOID_SEPARATION_WEIGHT: 1.5 → 5400.0 (aceleración) - BOID_COHESION_WEIGHT: 0.001 → 3.6 (aceleración) - BOID_ALIGNMENT_WEIGHT: 1.0 → 60.0 (steering) - BOID_MAX_SPEED: 2.5 → 150.0 px/s - BOID_MIN_SPEED: 0.3 → 18.0 px/s - BOID_MAX_FORCE: 0.05 → 3.0 px/s Física ahora consistente en 60Hz, 144Hz, 240Hz screens. Transiciones BOIDS↔PHYSICS preservan velocidad correctamente. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -277,6 +277,27 @@ void UIManager::renderDebugHUD(const Engine* engine,
|
||||
text_renderer_debug_->printAbsolute(margin, left_y, simmode_text.c_str(), {0, 255, 255, 255}); // Cian
|
||||
left_y += line_height;
|
||||
|
||||
// Número de pelotas (escenario actual)
|
||||
size_t ball_count = scene_manager->getBallCount();
|
||||
std::string balls_text;
|
||||
if (ball_count >= 1000) {
|
||||
// Formatear con separador de miles (ejemplo: 5,000 o 50,000)
|
||||
std::string count_str = std::to_string(ball_count);
|
||||
std::string formatted;
|
||||
int digits = count_str.length();
|
||||
for (int i = 0; i < digits; i++) {
|
||||
if (i > 0 && (digits - i) % 3 == 0) {
|
||||
formatted += ',';
|
||||
}
|
||||
formatted += count_str[i];
|
||||
}
|
||||
balls_text = "Balls: " + formatted;
|
||||
} else {
|
||||
balls_text = "Balls: " + std::to_string(ball_count);
|
||||
}
|
||||
text_renderer_debug_->printAbsolute(margin, left_y, balls_text.c_str(), {128, 255, 128, 255}); // Verde claro
|
||||
left_y += line_height;
|
||||
|
||||
// V-Sync
|
||||
text_renderer_debug_->printAbsolute(margin, left_y, vsync_text_.c_str(), {0, 255, 255, 255}); // Cian
|
||||
left_y += line_height;
|
||||
|
||||
Reference in New Issue
Block a user