Refonte totale#36
Hidden character warning
Conversation
Refonte complète du moteur Voir readme Archtecture.MD
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aafa53a7d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| player.vx = moveX * player.runtimeStats.speed; | ||
| player.vy = moveY * player.runtimeStats.speed; | ||
| player.x += player.vx; | ||
| player.y += player.vy; |
There was a problem hiding this comment.
Scale player translation with deltaTime
handlePlayerControls receives deltaTime from the game loop but updates player.x/y by raw per-frame velocity. This makes movement speed depend on frame rate (players on 120+ FPS move much faster than intended, while low-FPS players move slower), which directly changes game difficulty and control feel. Multiply displacement by deltaTime (or convert stats to frame units consistently) so movement remains time-based.
Useful? React with 👍 / 👎.
| p.x += p.vx; | ||
| p.y += p.vy; | ||
| p.distanceTraveled += Math.sqrt(p.vx * p.vx + p.vy * p.vy); |
There was a problem hiding this comment.
Scale projectile travel with deltaTime
updatePhysics takes deltaTime but projectile position and distanceTraveled are advanced by fixed per-frame amounts. As a result, projectile speed/range and hit timing vary by client FPS, causing balance regressions (high FPS yields faster, farther projectiles; low FPS does the opposite). Use deltaTime when applying velocity and traveled distance.
Useful? React with 👍 / 👎.
| // 3. Couche ARMURE (Armor) | ||
| if (defense.armor > 0) { | ||
| const armorEfficiency = (packet.type === DamageType.KINETIC || packet.type === DamageType.EXPLOSIVE) ? 1.2 : 0.7; | ||
| remainingDamage *= (1 - stats.armorHardness); |
There was a problem hiding this comment.
Honor packet penetration in armor mitigation
The damage model defines DamagePacket.penetration and several attacks set non-zero values (for example sniper shots and tactical nova), but armor reduction always applies full stats.armorHardness and never reads packet.penetration. This means penetration-based tuning has no gameplay effect, so those attacks underperform against armor compared to their configured stats.
Useful? React with 👍 / 👎.
Refonte complète du moteur
Voir readme
Archtecture.MD