Private
Public Access
1
0

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

This commit is contained in:
Sebastian Unterschütz
2026-01-05 19:22:17 +01:00
parent daf8261aa9
commit 0ae6c58eb9
6 changed files with 22 additions and 18 deletions

View File

@@ -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
}

View File

@@ -234,7 +234,7 @@ window.onWasmReady = function() {
};
// Cache Management - Version wird bei jedem Build aktualisiert
const CACHE_VERSION = 1767636391983; // Wird durch Build-Prozess ersetzt
const CACHE_VERSION = 1767637179526; // Wird durch Build-Prozess ersetzt
// Fetch mit Cache-Busting
async function fetchWithCache(url) {

View File

@@ -291,7 +291,7 @@
<!-- WASM Execution -->
<script>
// Cache-Busting für JavaScript-Dateien (wird beim Build aktualisiert)
const BUILD_VERSION = 1767636391983;
const BUILD_VERSION = 1767637179526;
document.write('<script src="wasm_exec.js?v=' + BUILD_VERSION + '"><\/script>');
document.write('<script src="game.js?v=' + BUILD_VERSION + '"><\/script>');
</script>

Binary file not shown.