tune(debris): N=1, shrink completo y sin herencia angular en enemigos

This commit is contained in:
2026-05-21 17:11:08 +02:00
parent 87b96b8226
commit 2869c63517
2 changed files with 4 additions and 5 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ namespace Defaults::Physics {
constexpr float ROTACIO_MAX = 0.3F; // Rotación màxima (rad/s ~17.2°/s) constexpr float ROTACIO_MAX = 0.3F; // Rotación màxima (rad/s ~17.2°/s)
constexpr float TEMPS_VIDA = 2.0F; // Vida mínima garantida (s) — després pot morir per velocitat baixa constexpr float TEMPS_VIDA = 2.0F; // Vida mínima garantida (s) — després pot morir per velocitat baixa
constexpr float TEMPS_VIDA_NAU = 3.0F; // Ship debris min lifetime (matches DEATH_DURATION) constexpr float TEMPS_VIDA_NAU = 3.0F; // Ship debris min lifetime (matches DEATH_DURATION)
constexpr float SHRINK_RATE = 0.5F; // Reducció de mida (factor sobre min_lifetime) constexpr float SHRINK_RATE = 1.0F; // Reducció de mida (1.0 = encoge a 0 al final del min_lifetime)
// Política de mort: passat el min_lifetime, el fragment mor quan la // Política de mort: passat el min_lifetime, el fragment mor quan la
// seva velocity cau per sota d'aquest llindar. Així els fragments // seva velocity cau per sota d'aquest llindar. Així els fragments
@@ -53,9 +53,9 @@ namespace Defaults::Physics {
// Tuneig específic de l'explosió d'enemic (overrides als defaults // Tuneig específic de l'explosió d'enemic (overrides als defaults
// que es passen com a paràmetres opcionals a explode()). // que es passen com a paràmetres opcionals a explode()).
constexpr float ENEMY_LIFETIME = 4.5F; // Vida mínima del debris (s) — els que segueixen movent-se viuen més constexpr float ENEMY_LIFETIME = 2.5F; // Vida mínima del debris (s) — els que segueixen movent-se viuen més
constexpr float ENEMY_FRICTION = -30.0F; // Fricció més suau perquè s'estenguin més constexpr float ENEMY_FRICTION = -30.0F; // Fricció més suau perquè s'estenguin més
constexpr int ENEMY_SEGMENT_MULTIPLIER = 3; // Còpies de cada segment (5 cares × 3 = 15 trossos) constexpr int ENEMY_SEGMENT_MULTIPLIER = 1; // Sense còpies (5 cares = 5 trossos); >1 produeix grups sincronitzats
// Angular velocity sin for trajectory inheritance // Angular velocity sin for trajectory inheritance
// Excess above this threshold is converted to tangential linear velocity // Excess above this threshold is converted to tangential linear velocity
+1 -2
View File
@@ -45,7 +45,6 @@ namespace Systems::Collision {
void explodeNow(Context& ctx, Enemy& enemy, uint8_t shooter_id) { void explodeNow(Context& ctx, Enemy& enemy, uint8_t shooter_id) {
const Vec2 ENEMY_POS = enemy.getCenter(); const Vec2 ENEMY_POS = enemy.getCenter();
const Vec2 ENEMY_VEL = enemy.getVelocityVector(); const Vec2 ENEMY_VEL = enemy.getVelocityVector();
const float DROTACIO = enemy.getRotationDelta();
const float BRIGHTNESS = enemy.getBrightness(); const float BRIGHTNESS = enemy.getBrightness();
const auto SHAPE = enemy.getShape(); const auto SHAPE = enemy.getShape();
const EnemyType TYPE = enemy.getType(); const EnemyType TYPE = enemy.getType();
@@ -70,7 +69,7 @@ namespace Systems::Collision {
VELOCITAT_EXPLOSIO, VELOCITAT_EXPLOSIO,
BRIGHTNESS, BRIGHTNESS,
INHERITED_VEL, INHERITED_VEL,
DROTACIO, 0.0F, // sense herència angular: evita que els 5 trossos curvin en bloc
0.0F, // sin herencia visual 0.0F, // sin herencia visual
Defaults::Sound::EXPLOSION, Defaults::Sound::EXPLOSION,
COLOR, COLOR,