diff --git a/assets/island.ase b/assets/island.ase index a244e348e70e435d563df2e58b28f6ba40783f7c..7be2c8cb8cb163fa002f8deeb8e8ad7387749e0b 100644 Binary files a/assets/island.ase and b/assets/island.ase differ diff --git a/assets/person.ase b/assets/person.ase new file mode 100644 index 0000000000000000000000000000000000000000..7679464ea0c4edfbfea2aaae3273052c92ed7684 Binary files /dev/null and b/assets/person.ase differ diff --git a/src/img/island.webp b/src/img/island.webp index 5f54c45c02ef64355f75ec4b117de7f11d9579a7..b683e0976de9ccf76897872f64a411077ad4dd9c 100644 Binary files a/src/img/island.webp and b/src/img/island.webp differ diff --git a/src/js/game.js b/src/js/game.js index 5094891e8613be47ddc2b7074b4257ea8eb7a526..21191496dec721bef89f17eabd6da9057a98650d 100644 --- a/src/js/game.js +++ b/src/js/game.js @@ -249,7 +249,8 @@ gameRoom.boatCount = 0; gameRoom.boatSpeed = 0; gameRoom.boatAvoid = [ - {x: 35, y: 100, w: 32, h: 75} + {x: 73, y: 102, w: 83, h: 67}, + {x: 186, y: 42, w: 39, h: 31} ]; console.log(typeof(gameRoom.remove)) @@ -390,12 +391,10 @@ let main = () => { // main game loop let init = () => { // begin loading all the assets. - currentRoom.updateStatus("Loading images..."); let errors = []; const imagesToLoad = Object.keys(assets.images).length; let imagesLoaded = 0; for (let image in assets.images) { - currentRoom.updateStatus("Loading image " + image); let img = new Image(); img.src = imgPrefix + assets.images[image]; img.onerror = (err) => { @@ -404,24 +403,24 @@ let init = () => { } img.onload = () => { - console.log("Loaded "+ image); + currentRoom.updateStatus("Loaded "+ image); assets.images[image] = img; imagesLoaded++; - errors.push("Loaded "+ image); } } - currentRoom.updateStatus("Loading complete!"); let waitingForLoadingToFinish = setInterval(() => { if (imagesLoaded === imagesToLoad) { clearInterval(waitingForLoadingToFinish); + let splashTime; + getParameter("skipsplash") ? splashTime = 0 : splashTime = 1000; setTimeout(() => { console.log(assets.images); (getParameter("room") ? changeRoom(searchForRoom(getParameter("room"))) : changeRoom(searchForRoom("menu"))); currentRoom.init(); main(); - }, 1000); + }, splashTime); } if (errors.length > 0) { for (let i = 0; i < errors.length; i++) {