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
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m3s
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user