I make the game and I have a problem with loading it. If I refresh the page a couple of times, it all loads, but without this, as I did not try to do, nothing works. If I need javascript code, I will add, there’s just a lot.
body{ width: 100%; height: 100%; position: fixed; top: 0; left: 0; display: flex; align-items: center; justify-content: center; overflow: auto; background: url("image/bg.png") repeat; } p{ color: white; font-size: 50; margin-bottom: 0px; } <!DOCTYPE html> <html> <head> <meta charset="Utf-8"> <title> Sietra </title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <canvas width="960" height="576" id="canvas" style="z-index: 0;"><p>Ваша версия браузера не поддерживает Canvas.<br>Обновите браузер!</p></canvas> <script src="image.js"></script> <script src="variable.js"></script> <script src="engine.js"></script> <script src="character.js"></script> <script src="enemy.js"></script> <script src="game.js"></script> </body> </html>