Private
Public Access
1
0

Refine player movement and physics constants for improved 20 TPS gameplay, add reusable config values, enhance button loading states, and prevent duplicate game starts. Update cache-busting version for client assets.
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m3s

This commit is contained in:
Sebastian Unterschütz
2026-01-05 21:04:39 +01:00
parent dc5136ca21
commit 66d7b6d2a5
7 changed files with 106 additions and 32 deletions

View File

@@ -21,8 +21,8 @@ func (g *Game) ApplyInput(input InputState) {
}
// Geschwindigkeit skaliert mit Joystick-Intensität
// war 4.0 bei 60 TPS (4.0 * 3 = 12.0)
speed := config.RunSpeed + (moveX * 12.0)
// Bewegung relativ zum Scroll (symmetrisch)
speed := config.RunSpeed + (moveX * config.PlayerSpeed)
g.predictedX += speed
// Gravitation
@@ -33,12 +33,12 @@ func (g *Game) ApplyInput(input InputState) {
// Fast Fall
if input.Down {
g.predictedVY = 45.0 // war 15.0 bei 60 TPS (15.0 * 3)
g.predictedVY = config.FastFall
}
// Sprung
if input.Jump && g.predictedGround {
g.predictedVY = -30.0 // Reduziert für besseres Spielgefühl bei 20 TPS
g.predictedVY = -config.JumpVelocity
g.predictedGround = false
}