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
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user