Adjust physics constants and movement logic for 20 TPS, scale velocities and gravity by a factor of 3, and update cache-busting version for client assets.
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m0s
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m0s
This commit is contained in:
@@ -21,7 +21,8 @@ func (g *Game) ApplyInput(input InputState) {
|
||||
}
|
||||
|
||||
// Geschwindigkeit skaliert mit Joystick-Intensität
|
||||
speed := config.RunSpeed + (moveX * 4.0)
|
||||
// war 4.0 bei 60 TPS (4.0 * 3 = 12.0)
|
||||
speed := config.RunSpeed + (moveX * 12.0)
|
||||
g.predictedX += speed
|
||||
|
||||
// Gravitation
|
||||
@@ -32,12 +33,12 @@ func (g *Game) ApplyInput(input InputState) {
|
||||
|
||||
// Fast Fall
|
||||
if input.Down {
|
||||
g.predictedVY = 15.0
|
||||
g.predictedVY = 45.0 // war 15.0 bei 60 TPS (15.0 * 3)
|
||||
}
|
||||
|
||||
// Sprung
|
||||
if input.Jump && g.predictedGround {
|
||||
g.predictedVY = -14.0
|
||||
g.predictedVY = -42.0 // war -14.0 bei 60 TPS (-14.0 * 3)
|
||||
g.predictedGround = false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user