+ client prediction
This commit is contained in:
LuckyLaszlo
2022-11-22 00:06:07 +01:00
parent 04203f4f9d
commit 2b9058ad49
43 changed files with 53 additions and 15 deletions

View File

@@ -1,3 +1,4 @@
import {gc} from "./global.js";
import * as d from "./draw.js";
import {handleInput} from "./handleInput.js";
@@ -19,7 +20,7 @@ function gameLoop()
handleInput(delta_time);
// prediction
// gc.ball.moveAndBounce(delta_time, [gc.wallTop, gc.wallBottom, gc.playerLeft, gc.playerRight]);
gc.ball.moveAndBounce(delta_time, [gc.wallTop, gc.wallBottom, gc.playerLeft, gc.playerRight]);
d.draw();
}