INIT_HUD amb temps de les animacions per percentatge
ordenats en subcarpetes els fitxers d'audio corregit typo LIFES a LIVES
This commit is contained in:
@@ -80,18 +80,18 @@ constexpr float DEATH_DURATION = 3.0f; // Seconds of death ani
|
||||
constexpr float GAME_OVER_DURATION = 5.0f; // Seconds to display game over
|
||||
constexpr float COLLISION_SHIP_ENEMY_AMPLIFIER = 0.80f; // 80% hitbox (generous)
|
||||
// Transición LEVEL_START (mensajes aleatorios PRE-level)
|
||||
constexpr float LEVEL_START_DURATION = 3.0f; // Duración total
|
||||
constexpr float LEVEL_START_TYPING_RATIO = 0.3f; // 30% escribiendo, 70% mostrando
|
||||
constexpr float LEVEL_START_DURATION = 3.0f; // Duración total
|
||||
constexpr float LEVEL_START_TYPING_RATIO = 0.3f; // 30% escribiendo, 70% mostrando
|
||||
|
||||
// Transición LEVEL_COMPLETED (mensaje "GOOD JOB COMMANDER!")
|
||||
constexpr float LEVEL_COMPLETED_DURATION = 3.0f; // Duración total
|
||||
constexpr float LEVEL_COMPLETED_TYPING_RATIO = 0.0f; // 0.0 = sin typewriter (directo)
|
||||
constexpr float LEVEL_COMPLETED_DURATION = 3.0f; // Duración total
|
||||
constexpr float LEVEL_COMPLETED_TYPING_RATIO = 0.0f; // 0.0 = sin typewriter (directo)
|
||||
|
||||
// Transición INIT_HUD (animación inicial del HUD)
|
||||
constexpr float INIT_HUD_DURATION = 3.0f; // Duración total del estado
|
||||
constexpr float INIT_HUD_RECT_DURATION = 2.0f; // Duración animación rectángulo
|
||||
constexpr float INIT_HUD_SCORE_DURATION = 2.5f; // Duración animación marcador
|
||||
constexpr float INIT_HUD_SHIP_DURATION = 2.5f; // Duración animación nave
|
||||
constexpr float INIT_HUD_DURATION = 3.0f; // Duración total del estado
|
||||
constexpr float INIT_HUD_RECT_RATIO = 0.67f; // Proporción animación rectángulo (67% del total)
|
||||
constexpr float INIT_HUD_SCORE_RATIO = 0.83f; // Proporción animación marcador (83% del total)
|
||||
constexpr float INIT_HUD_SHIP_RATIO = 0.83f; // Proporción animación nave (83% del total)
|
||||
|
||||
// Posición inicial de la nave en INIT_HUD (75% de altura de zona de juego)
|
||||
constexpr float INIT_HUD_SHIP_START_Y_RATIO = 0.75f; // 75% desde el top de PLAYAREA
|
||||
@@ -126,7 +126,7 @@ constexpr float FRICCIO_ANGULAR = 0.5f; // Desacceleració angular (rad/s²
|
||||
// Angular velocity cap for trajectory inheritance
|
||||
// Excess above this threshold is converted to tangential linear velocity
|
||||
// Prevents "vortex trap" problem with high-rotation enemies
|
||||
constexpr float VELOCITAT_ROT_MAX = 1.5f; // rad/s (~86°/s)
|
||||
constexpr float VELOCITAT_ROT_MAX = 1.5f; // rad/s (~86°/s)
|
||||
} // namespace Debris
|
||||
} // namespace Physics
|
||||
|
||||
@@ -194,11 +194,12 @@ constexpr int FADE_DURATION_MS = 1000; // Fade out duration
|
||||
|
||||
// Efectes de so (sons puntuals)
|
||||
namespace Sound {
|
||||
constexpr float VOLUME = 1.0F; // Volumen efectos
|
||||
constexpr bool ENABLED = true; // Sonidos habilitados
|
||||
constexpr const char* EXPLOSION = "explosion.wav"; // Explosión
|
||||
constexpr const char* LASER = "laser_shoot.wav"; // Disparo
|
||||
constexpr const char* GOOD_JOB_COMMANDER = "good_job_commander.wav"; // Voz: "Good job, commander"
|
||||
constexpr float VOLUME = 1.0F; // Volumen efectos
|
||||
constexpr bool ENABLED = true; // Sonidos habilitados
|
||||
constexpr const char* EXPLOSION = "effects/explosion.wav"; // Explosión
|
||||
constexpr const char* LASER = "effects/laser_shoot.wav"; // Disparo
|
||||
constexpr const char* LOGO = "effects/logo.wav"; // Logo
|
||||
constexpr const char* GOOD_JOB_COMMANDER = "voices/good_job_commander.wav"; // Voz: "Good job, commander"
|
||||
} // namespace Sound
|
||||
|
||||
// Enemy type configuration (tipus d'enemics)
|
||||
@@ -225,11 +226,11 @@ constexpr const char* SHAPE_FILE = "enemy_square.shp";
|
||||
|
||||
// Molinillo (agressiu - fast straight lines, proximity spin-up)
|
||||
namespace Molinillo {
|
||||
constexpr float VELOCITAT = 50.0f; // px/s (fastest)
|
||||
constexpr float CANVI_ANGLE_PROB = 0.05f; // 5% per wall hit (rare direction change)
|
||||
constexpr float CANVI_ANGLE_MAX = 0.3f; // Small angle adjustments
|
||||
constexpr float DROTACIO_MIN = 3.0f; // Base rotation (rad/s) [+50%]
|
||||
constexpr float DROTACIO_MAX = 6.0f; // [+50%]
|
||||
constexpr float VELOCITAT = 50.0f; // px/s (fastest)
|
||||
constexpr float CANVI_ANGLE_PROB = 0.05f; // 5% per wall hit (rare direction change)
|
||||
constexpr float CANVI_ANGLE_MAX = 0.3f; // Small angle adjustments
|
||||
constexpr float DROTACIO_MIN = 3.0f; // Base rotation (rad/s) [+50%]
|
||||
constexpr float DROTACIO_MAX = 6.0f; // [+50%]
|
||||
constexpr float DROTACIO_PROXIMITY_MULTIPLIER = 3.0f; // Spin-up multiplier when near ship
|
||||
constexpr float PROXIMITY_DISTANCE = 100.0f; // Distance threshold (px)
|
||||
constexpr const char* SHAPE_FILE = "enemy_pinwheel.shp";
|
||||
@@ -256,36 +257,36 @@ constexpr float ROTACIO_ACCEL_MULTIPLIER_MAX = 4.0f; // Max speed multiplier [m
|
||||
|
||||
// Spawn safety and invulnerability system
|
||||
namespace Spawn {
|
||||
// Safe spawn distance from player
|
||||
constexpr float SAFETY_DISTANCE_MULTIPLIER = 3.0f; // 3x ship radius
|
||||
constexpr float SAFETY_DISTANCE = Defaults::Entities::SHIP_RADIUS * SAFETY_DISTANCE_MULTIPLIER; // 36.0f px
|
||||
constexpr int MAX_SPAWN_ATTEMPTS = 50; // Max attempts to find safe position
|
||||
// Safe spawn distance from player
|
||||
constexpr float SAFETY_DISTANCE_MULTIPLIER = 3.0f; // 3x ship radius
|
||||
constexpr float SAFETY_DISTANCE = Defaults::Entities::SHIP_RADIUS * SAFETY_DISTANCE_MULTIPLIER; // 36.0f px
|
||||
constexpr int MAX_SPAWN_ATTEMPTS = 50; // Max attempts to find safe position
|
||||
|
||||
// Invulnerability system
|
||||
constexpr float INVULNERABILITY_DURATION = 3.0f; // Seconds
|
||||
constexpr float INVULNERABILITY_BRIGHTNESS_START = 0.3f; // Dim
|
||||
constexpr float INVULNERABILITY_BRIGHTNESS_END = 0.7f; // Normal (same as Defaults::Brightness::ENEMIC)
|
||||
constexpr float INVULNERABILITY_SCALE_START = 0.0f; // Invisible
|
||||
constexpr float INVULNERABILITY_SCALE_END = 1.0f; // Full size
|
||||
// Invulnerability system
|
||||
constexpr float INVULNERABILITY_DURATION = 3.0f; // Seconds
|
||||
constexpr float INVULNERABILITY_BRIGHTNESS_START = 0.3f; // Dim
|
||||
constexpr float INVULNERABILITY_BRIGHTNESS_END = 0.7f; // Normal (same as Defaults::Brightness::ENEMIC)
|
||||
constexpr float INVULNERABILITY_SCALE_START = 0.0f; // Invisible
|
||||
constexpr float INVULNERABILITY_SCALE_END = 1.0f; // Full size
|
||||
} // namespace Spawn
|
||||
|
||||
// Scoring system (puntuació per tipus d'enemic)
|
||||
namespace Scoring {
|
||||
constexpr int PENTAGON_SCORE = 100; // Pentàgon (esquivador, 35 px/s)
|
||||
constexpr int QUADRAT_SCORE = 150; // Quadrat (perseguidor, 40 px/s)
|
||||
constexpr int MOLINILLO_SCORE = 200; // Molinillo (agressiu, 50 px/s)
|
||||
constexpr int PENTAGON_SCORE = 100; // Pentàgon (esquivador, 35 px/s)
|
||||
constexpr int QUADRAT_SCORE = 150; // Quadrat (perseguidor, 40 px/s)
|
||||
constexpr int MOLINILLO_SCORE = 200; // Molinillo (agressiu, 50 px/s)
|
||||
} // namespace Scoring
|
||||
|
||||
} // namespace Enemies
|
||||
|
||||
// Floating score numbers (números flotants de puntuació)
|
||||
namespace FloatingScore {
|
||||
constexpr float LIFETIME = 2.0f; // Duració màxima (segons)
|
||||
constexpr float VELOCITY_Y = -30.0f; // Velocitat vertical (px/s, negatiu = amunt)
|
||||
constexpr float VELOCITY_X = 0.0f; // Velocitat horizontal (px/s)
|
||||
constexpr float SCALE = 0.75f; // Escala del text (0.75 = 75% del marcador)
|
||||
constexpr float SPACING = 0.0f; // Espaiat entre caràcters
|
||||
constexpr int MAX_CONCURRENT = 15; // Pool size (= MAX_ORNIS)
|
||||
constexpr float LIFETIME = 2.0f; // Duració màxima (segons)
|
||||
constexpr float VELOCITY_Y = -30.0f; // Velocitat vertical (px/s, negatiu = amunt)
|
||||
constexpr float VELOCITY_X = 0.0f; // Velocitat horizontal (px/s)
|
||||
constexpr float SCALE = 0.75f; // Escala del text (0.75 = 75% del marcador)
|
||||
constexpr float SPACING = 0.0f; // Espaiat entre caràcters
|
||||
constexpr int MAX_CONCURRENT = 15; // Pool size (= MAX_ORNIS)
|
||||
} // namespace FloatingScore
|
||||
|
||||
} // namespace Defaults
|
||||
|
||||
Reference in New Issue
Block a user