Reduce tick rate and TPS to 20 for improved performance and consistency; update cache-busting version for client assets.
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m51s
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m51s
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
ebiten.SetWindowSize(ScreenWidth, ScreenHeight)
|
ebiten.SetWindowSize(ScreenWidth, ScreenHeight)
|
||||||
ebiten.SetWindowTitle("Escape From Teacher")
|
ebiten.SetWindowTitle("Escape From Teacher")
|
||||||
ebiten.SetTPS(60)
|
ebiten.SetTPS(20)
|
||||||
ebiten.SetVsyncEnabled(true)
|
ebiten.SetVsyncEnabled(true)
|
||||||
if err := ebiten.RunGame(NewGame()); err != nil {
|
if err := ebiten.RunGame(NewGame()); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ func main() {
|
|||||||
|
|
||||||
ebiten.SetWindowSize(ScreenWidth, ScreenHeight)
|
ebiten.SetWindowSize(ScreenWidth, ScreenHeight)
|
||||||
ebiten.SetWindowTitle("Escape From Teacher")
|
ebiten.SetWindowTitle("Escape From Teacher")
|
||||||
ebiten.SetTPS(60)
|
ebiten.SetTPS(20)
|
||||||
ebiten.SetVsyncEnabled(true)
|
ebiten.SetVsyncEnabled(true)
|
||||||
|
|
||||||
if err := ebiten.RunGame(game); err != nil {
|
if err := ebiten.RunGame(game); err != nil {
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ window.onWasmReady = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Cache Management - Version wird bei jedem Build aktualisiert
|
// Cache Management - Version wird bei jedem Build aktualisiert
|
||||||
const CACHE_VERSION = 1767555402485; // Wird durch Build-Prozess ersetzt
|
const CACHE_VERSION = 1767636391983; // Wird durch Build-Prozess ersetzt
|
||||||
|
|
||||||
// Fetch mit Cache-Busting
|
// Fetch mit Cache-Busting
|
||||||
async function fetchWithCache(url) {
|
async function fetchWithCache(url) {
|
||||||
|
|||||||
@@ -291,7 +291,7 @@
|
|||||||
<!-- WASM Execution -->
|
<!-- WASM Execution -->
|
||||||
<script>
|
<script>
|
||||||
// Cache-Busting für JavaScript-Dateien (wird beim Build aktualisiert)
|
// Cache-Busting für JavaScript-Dateien (wird beim Build aktualisiert)
|
||||||
const BUILD_VERSION = 1767555402485;
|
const BUILD_VERSION = 1767636391983;
|
||||||
document.write('<script src="wasm_exec.js?v=' + BUILD_VERSION + '"><\/script>');
|
document.write('<script src="wasm_exec.js?v=' + BUILD_VERSION + '"><\/script>');
|
||||||
document.write('<script src="game.js?v=' + BUILD_VERSION + '"><\/script>');
|
document.write('<script src="game.js?v=' + BUILD_VERSION + '"><\/script>');
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ func NewRoom(id string, nc *nats.Conn, w *game.World) *Room {
|
|||||||
|
|
||||||
func (r *Room) RunLoop() {
|
func (r *Room) RunLoop() {
|
||||||
// 60 Tick pro Sekunde
|
// 60 Tick pro Sekunde
|
||||||
ticker := time.NewTicker(time.Second / 60)
|
ticker := time.NewTicker(time.Second / 20)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
|||||||
Reference in New Issue
Block a user