- Migrar de fisica frame-based (60 FPS fijo) a time-based - Convertir velocidades: x60 multiplicador (pixeles/frame → pixeles/segundo) - Convertir gravedad: x3600 multiplicador (pixeles/frame² → pixeles/segundo²) - Añadir calculateDeltaTime() con limitador de saltos grandes - Actualizar Ball::update() para recibir deltaTime como parametro - Implementar debug display con valores de fisica en tiempo real - Documentar proceso completo de migracion en README.md - Conseguir velocidad consistente entre diferentes refresh rates - V-Sync independiente: misma velocidad con V-Sync ON/OFF 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
17 lines
361 B
C++
17 lines
361 B
C++
#pragma once
|
|
|
|
constexpr char WINDOW_CAPTION[] = "vibe1_delta";
|
|
|
|
constexpr int SCREEN_WIDTH = 320;
|
|
constexpr int SCREEN_HEIGHT = 240;
|
|
constexpr int WINDOW_SIZE = 3;
|
|
constexpr int BALL_SIZE = 10;
|
|
constexpr float GRAVITY_FORCE = 0.2f;
|
|
|
|
// DEMO_SPEED eliminado - ya no se usa con delta time
|
|
constexpr Uint64 TEXT_DURATION = 2000;
|
|
|
|
struct Color
|
|
{
|
|
int r, g, b;
|
|
}; |