diff --git a/res/css/style.css b/res/css/style.css
index d8ddd7b..7c5b8bb 100644
--- a/res/css/style.css
+++ b/res/css/style.css
@@ -3,7 +3,7 @@ body {
height: 100vh;
width: auto;
background-image: url("../img/wall_dark.png");
- pointer-events: none;
+ padding-top: env(safe-area-inset-top);
}
html, body {
@@ -11,7 +11,7 @@ html, body {
margin: 0;
padding: 0;
height: 100%;
- }
+}
#background-video {
@@ -47,10 +47,16 @@ p{
display: none;
}
}
+
+@media (max-width: 1919px) {
+ #clock {
+ display: none;
+ }
+}
#container {
position: relative;
- height: 100vh;
- width: 100%;
+ height: 100dvh;
+ width: 100vw;
margin: 0;
padding: 0;
overflow: hidden;
@@ -85,6 +91,7 @@ p{
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
+ margin-top:5vh;
}
#running_rioter{
position: absolute;
@@ -132,16 +139,16 @@ p{
}
#recommend{
position: absolute;
- bottom: -25px;
+ bottom: 0;
left: 0;
letter-spacing: 2px;
font-family: 'VT323', monospace;
color:white;
transition: 0.2s;
background-color: rgba(0, 0, 0, 0.8);
- border-radius: 0 15px;
+ border-radius: 0 15px 0 0;
text-align: center;
- padding: 5px;
+ padding: 0 20px;
}
#recommend:hover{
color:rgb(194, 194, 194)
@@ -154,21 +161,35 @@ p{
margin-top: -1em;
}
#credits_list{
+ z-index: 6;
background-color: rgb(15, 15, 15);
background-image: url("../img/wall_verydark.png");
- margin-top:1em;
color:white;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
- height: 90%;
+ height: 80%;
width: fit-content;
border:5px solid rgb(0, 0, 0);
+ border-radius: 10px;
font-family: 'VT323', monospace;
box-shadow: 1px -1px 40px 7px rgb(0, 0, 0);
overflow-y: auto;
display:none;
+ cursor: pointer;
+}
+#red_cross_credits{
+ color:white;
+ position: sticky;
+ top: 5%;
+ left: 93%;
+ transform: translate(-50%, -50%);
+ height: auto;
+ width: 2vw;
+ z-index: 4;
+ filter: drop-shadow(1px 1px 0 black) drop-shadow(-1px -1px 0 black) drop-shadow(1px -1px 0 black) drop-shadow(-1px 1px 0 black);
+ cursor: pointer;
}
#credits_list::-webkit-scrollbar{
width: 8px;
@@ -466,14 +487,40 @@ p{
margin-top:-10px;
font-size: 20px;
}
+#myStats{
+ position: absolute;
+ display: flex;
+ flex-direction: column;
+ margin-left:0.2em;
+ margin-right:0.2em;
+}
+#deathCounterShow{
+ color:white;
+ font-family: 'VT323', monospace;
+ font-size: 2.5vw;
+ margin:0;
+ margin-left:0.4vw;
+}
+#deadImage{
+ display: flex;
+ flex-direction: row;
+ justify-content: left;
+ align-items: center;
+ height: fit-content;
+ margin-top: 1vh;
+ margin-left: 1vh;
+}
+#deadImage img{
+ height: 6vh;
+ width: auto;
+ filter: drop-shadow(1px 1px 0 white) drop-shadow(-1px -1px 0 white) drop-shadow(1px -1px 0 white) drop-shadow(-1px 1px 0 white);
+}
#myHp{
display: none;
- position: absolute;
}
#myHp img{
- margin-left:0.2em;
- margin-right:0.2em;
width: 60px;
+ margin-right:5%;
}
#hp {
width: 100%;
@@ -525,24 +572,19 @@ p{
border-radius: 0 0 10px 10px;
width: 100%;
text-align: center;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
color: white;
- font-family: 'VT323', monospace;
+ font-family: 'VT323', monospace;
letter-spacing: 3px;
font-size: 25px;
- margin-top:-15px;
}
#hps {
display: none;
+ flex-direction: column;
width: 30%;
position: absolute;
- top: 7%;
+ top: 4%;
left: 50%;
transform: translate(-50%, -50%);
- height: 100px;
}
#right_buttons{
display: flex;
@@ -951,7 +993,7 @@ p{
#canvas_container {
width: 70%;
- padding-bottom: 39.2%;
+ padding-bottom: 38.8%;
position: absolute;
top: 50%;
left: 50%;
@@ -972,7 +1014,7 @@ p{
background-color: black;
}
#canvas_darkness {
- width: 100%;
+ width: 101%;
height: auto;
position: absolute;
top: 50%;
@@ -980,6 +1022,15 @@ p{
transform: translate(-50%, -50%);
z-index: 2;
}
+#canvas_transition {
+ width: 100%;
+ height: auto;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ z-index: 3;
+}
#esc{
font-family: ' VT323', monospace;
width: 200px;
@@ -1320,16 +1371,6 @@ p{
opacity: 0;
pointer-events: none;
}
-#transition1, #transition2 {
- width: 300%;
- top: 50%;
- left: 50%;
- position: absolute;
- transform: translate(-50%, -50%);
- z-index: 6;
- opacity: 0;
- pointer-events: none;
-}
#text{
width: 50vw;
top: 50%;
@@ -1349,15 +1390,17 @@ p{
display:none;
}
#buttons img{
- max-width: 70px;
- max-height: 70px;
+ max-width: 65px;
+ max-height: 65px;
+ z-index:-1;
+ pointer-events: none;
}
#button_enter{
display: none;
justify-content: center;
align-items: center;
- width: 83px;
- height: 83px;
+ width: 78.5px;
+ height: 78.5px;
margin-left:0.5em;
color:white;
font-size: 15px;
@@ -1396,6 +1439,7 @@ p{
background-color:rgba(0, 0, 0, 0.6);
margin-bottom: 10px;
border-radius: 1em;
+ filter: invert(0.15);
}
#button_right, #button_left {
@@ -1405,6 +1449,7 @@ p{
background-color:rgba(0, 0, 0, 0.6);
margin-left: 10px;
border-radius: 1em;
+ filter: invert(0.15);
}
#button_down img{
transform: rotate(180deg);
@@ -1437,6 +1482,9 @@ p{
#text{
width: 100vw;
}
+ #middleHatImg{
+ margin-bottom: 5vh;
+ }
}
@media (max-height: 650px) {
#canvas_container{
@@ -1472,6 +1520,15 @@ p{
#chooseDungeon img{
width: 10vw;
}
+ #middleHatImg{
+ margin-bottom: 5vh;
+ }
+}
+@media (max-height: 400px) {
+ #canvas_container{
+ width: 50%;
+ padding-bottom: 27%;
+ }
}
@media (max-height: 900px) {
#myHp img{
diff --git a/res/img/dead_rioter.png b/res/img/dead_rioter.png
new file mode 100644
index 0000000..7586186
Binary files /dev/null and b/res/img/dead_rioter.png differ
diff --git a/res/img/dead_ruby.png b/res/img/dead_ruby.png
new file mode 100644
index 0000000..337d0ba
Binary files /dev/null and b/res/img/dead_ruby.png differ
diff --git a/res/js/achievements.js b/res/js/achievements.js
index 811e043..86d29a7 100644
--- a/res/js/achievements.js
+++ b/res/js/achievements.js
@@ -95,7 +95,6 @@ const processNextAchievement = () => {
achievement_img.src = imgSrc;
achievement_text.innerHTML = text;
achievement.style.backgroundImage = `url(${backImgSrc})`;
- console.log(backImgSrc)
showAchievement();
}
}
@@ -237,8 +236,8 @@ const achievementShip = () => {
if (!achievementShipCompleted && player1.flying) {
achievementShipCompleted = true;
localStorage.setItem('achievementShipCompleted', 'true');
- queueAchievement("./res/achievements/ship.png", "I knew that you would wreck the ship", "./res/img/achievement_bronze.png");
- achievementDoneInTheList("I knew that you would wreck the ship");
+ queueAchievement("./res/achievements/ship.png", "Why did I give you a rocket driver's license?", "./res/img/achievement_bronze.png");
+ achievementDoneInTheList("Why did I give you a rocket driver's license?");
}
}
diff --git a/res/js/boss_levels.js b/res/js/boss_levels.js
index 78db623..9a8da49 100644
--- a/res/js/boss_levels.js
+++ b/res/js/boss_levels.js
@@ -33,7 +33,7 @@ const bossLevel = () => {
player1.turnedRight = true;
player2.turnedRight = true;
player1.turnedLeft = false;
- player1.turnedLeft = false;
+ player2.turnedLeft = false;
finalDoorUnlocked = false;
reaperPhase1 = false;
@@ -94,6 +94,14 @@ const bossLevel = () => {
sfx_boss_talk.play();
}, 1500);
setTimeout(() => {
+ spawnCords = () => {
+ player1.x = 485;
+ player1.y = 200;
+ if(playingMultiplayer){
+ player2.x = 515 ;
+ player2.y = 200;
+ }
+ }
inGame = true;
cancelAnimationFrame(CameraMovingId)
reaperBossCamera1 = false;
@@ -240,7 +248,7 @@ const spiderBossLevel = () => {
player1.turnedRight = true;
player2.turnedRight = true;
player1.turnedLeft = false;
- player1.turnedLeft = false;
+ player2.turnedLeft = false;
divider1.style.opacity = 1;
divider2.style.opacity = 1;
@@ -499,7 +507,7 @@ const alienBossLevel = () => {
player1.turnedRight = true;
player2.turnedRight = true;
player1.turnedLeft = false;
- player1.turnedLeft = false;
+ player2.turnedLeft = false;
divider1.style.opacity = 0;
divider2.style.opacity = 0;
@@ -1399,6 +1407,8 @@ const finalSceneSpiderBoss = () => {
player1.y = 376
player1.turnedRight = true;
player2.turnedRight = true;
+ player1.turnedLeft = false;
+ player2.turnedLeft = false;
if(playingMultiplayer){
player2.x = 455;
player2.y = 376
@@ -1441,6 +1451,14 @@ const deadBoss = () => {
localStorage.setItem('castleDungeonCompleted', castleDungeonCompleted.toString());
black.style.transition = "opacity 0s"
black.style.opacity = 1;
+ spawnCords = () => {
+ player1.x = 485;
+ player1.y = 216;
+ if(playingMultiplayer){
+ player2.x = 515 ;
+ player2.y = 216;
+ }
+ }
spawnCords();
bossPunchedNumber = 0;
bossX = 590;
@@ -1454,10 +1472,8 @@ const deadBoss = () => {
bossAttacking = false;
player1.turnedRight = true;
player2.turnedRight = true;
- if(playingMultiplayer){
- player1.turnedLeft = false;
- player2.turnedLeft = false;
- }
+ player1.turnedLeft = false;
+ player2.turnedLeft = false;
setTimeout(() => {
black.style.transition = "opacity 0.6s"
black.style.opacity = 0;
@@ -1567,8 +1583,11 @@ const deadBoss = () => {
cancelAnimationFrame(wallSpiderMovingId);
rightWallX = canvas.width;
leftWallX = -160;
- platformLevel1 = [...map[14]];
- originalPlatform1 = [...platformLevel1];
+ for (let index = 0; index < platformLevel1.length; index++) {
+ if(platformLevel1[index] == 2){
+ platformLevel1[index] = 0;
+ }
+ }
setTimeout(() => {
black.style.opacity = 1;
setTimeout(() => {
diff --git a/res/js/draw.js b/res/js/draw.js
index 22ea4ba..77f2c6c 100644
--- a/res/js/draw.js
+++ b/res/js/draw.js
@@ -810,6 +810,30 @@ const dark = () => {
}
};
+let circleSize = 1500;
+let circleTransitionValue = 0
+let transitionIsEnabled = false;
+
+const circleTransition = () => {
+ c_t.clearRect(0, 0, canvas.width , canvas.height);
+ c_t.fillStyle = "black";
+ c_t.fillRect(0, 0, canvas.width, canvas.height);
+
+ const gradient1 = c_t.createRadialGradient(player1.x + 10, player1.y + 15, 0, player1.x + 10, player1.y + 15, circleSize * 20);
+ gradient1.addColorStop(0, 'rgba(0, 0, 0, 1)');
+ gradient1.addColorStop(1, 'rgba(0, 0, 0, 0)');
+
+ c_t.globalCompositeOperation = 'destination-out';
+
+ c_t.fillStyle = gradient1;
+ c_t.beginPath();
+ c_t.arc(player1.x + 10, player1.y + 15, circleSize, 0, Math.PI * 2);
+ c_t.closePath();
+ c_t.fill();
+
+ c_t.globalCompositeOperation = 'source-over';
+}
+
let smallDarkness = true;
let smallDarknessAlienBoss = false;
let darknessValue = 650;
@@ -1635,7 +1659,7 @@ let deltaPlayer, deltaLava, deltaSpike, deltaPortal, deltaTorch,
deltaLantern, deltaOrb, delta24, delta6, delta8, delta4, deltaGhost,
deltaGhostS, deltaDoor, deltaBoss, deltaMP, deltaSaw, deltaSpiderBoss,
deltaSmoke, deltaWindow, deltaHologram , deltaLaserCannon, deltaComputer,
-deltaDarkness, deltaBg, deltaAlienBoss, deltaShine;
+deltaDarkness, deltaBg, deltaAlienBoss, deltaShine, deltaTransition;
let thenPlayer = Date.now();
let thenLava = Date.now();
@@ -1664,6 +1688,7 @@ let thenDarkness = Date.now();
let thenBg = Date.now();
let thenAlienBoss = Date.now();
let thenShine = Date.now();
+let thenTransition = Date.now();
let drawingId;
@@ -1709,6 +1734,22 @@ const drawing = () => {
deltaPlayer = now - thenPlayer;
if (deltaPlayer > 1) {
thenPlayer = now - (deltaPlayer % 1);
+ if(circleSize >= 0 && circleSize <= 1500){
+ if(circleSize == 0){
+ circleTransitionValue = 0;
+ }
+ circleSize += 15 * circleTransitionValue;
+ if(circleSize == 1501){
+ transitionIsEnabled = false;
+ canEnter = true;
+ }
+ }
+ }
+
+ // Circle Transition
+ deltaTransition = now - thenTransition;
+ if (deltaTransition > 1) {
+ thenTransition = now - (deltaTransition % 1);
drawPlayer();
}
@@ -2215,6 +2256,7 @@ let drawPlayer = () => {
drawHatsOnPLayer("Climbing", player1)
player1.hatX = player1.x + 11;
}else{
+ c.drawImage(playerOneImage, player1.currentFrameRun * sX, 2 * sY, sWidth, sHeight, player1.x, player1.y, frameWidth, frameHeight);
drawHatsOnPLayer("Else", player1);
}
@@ -2306,6 +2348,7 @@ let drawPlayer = () => {
drawHatsOnPLayer("Climbing", player2)
player2.hatX = player2.x + 11;
}else{
+ c.drawImage(playerTwoImage, player2.currentFrameRun * sX, 2 * sY, sWidth, sHeight, player2.x, player2.y, frameWidth, frameHeight);
drawHatsOnPLayer("Else", player2);
}
@@ -2362,4 +2405,7 @@ let drawPlayer = () => {
}
smallDark();
dark();
-};
\ No newline at end of file
+ if(transitionIsEnabled && !player1.inPipe && !player2.inPipe){
+ circleTransition();
+ }
+};
diff --git a/res/js/load_files.js b/res/js/load_files.js
index 69e2599..caa9ee0 100644
--- a/res/js/load_files.js
+++ b/res/js/load_files.js
@@ -83,8 +83,10 @@ const gameFiles = [
"./res/sfx/pipe.mp3",
"./res/sfx/portal_sfx.mp3",
"./res/sfx/punch.mp3",
- "./res/sfx/rioter_attack.mp3",
- "./res/sfx/ruby_attack.mp3",
+ "./res/sfx/rioter_attack1.mp3",
+ "./res/sfx/rioter_attack2.mp3",
+ "./res/sfx/ruby_attack1.mp3",
+ "./res/sfx/ruby_attack2.mp3",
"./res/sfx/shield_hit_alien.mp3",
"./res/sfx/shield_hit.mp3",
"./res/sfx/small_land.mp3",
@@ -94,11 +96,10 @@ const gameFiles = [
"./res/sfx/stone_steps.mp3",
"./res/sfx/wall_break.mp3",
"./res/sfx/wood_steps.mp3",
+ "./res/sfx/metal_steps.mp3",
//Videos
"./res/vid/room.mp4",
- "./res/vid/transition1.webm",
- "./res/vid/transition2.webm",
//Tutorials
"./res/tutorials/booster.mp4",
@@ -151,6 +152,8 @@ const gameFiles = [
"./res/img/correct_transparent.png",
"./res/img/cracked.png",
"./res/img/darkness1.png",
+ "./res/img/dead_rioter.png",
+ "./res/img/dead_ruby.png",
"./res/img/dj.png",
"./res/img/door.png",
"./res/img/doors.png",
diff --git a/res/js/load_json.js b/res/js/load_json.js
index 72c4e91..b189016 100644
--- a/res/js/load_json.js
+++ b/res/js/load_json.js
@@ -55,10 +55,12 @@ const loadCreditsInAlienBoss = async () => {
goldenEgg.src = "./res/img/egg.png";
goldenEgg.alt = "egg";
goldenEgg.draggable = false;
+ goldenEgg.zIndex = 3;
creditsList.appendChild(goldenEgg);
goldenEgg.onclick = () => {
achievementGoldenEgg()
+ goldenEgg.style.display = "none";
};
}
diff --git a/res/js/maps.js b/res/js/maps.js
index a2387a5..4df4cd3 100644
--- a/res/js/maps.js
+++ b/res/js/maps.js
@@ -107,17 +107,17 @@ map[0] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
19, 0, 0, 8, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
19, 0, 31, 8, 26, 0, 0, 0, 0, 0, 32, 0, 16, 0, 0, 17, 0, 0, 0, 0, 17, 0, 0, 0, 16, 0, 0, 0, 6, 0, 30, 0,
19, 7, 7, 7, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 17, 17, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 6, 14, 0, 0,
-19, 17, 17, 19, 0, 0, 36, 19, 0, 0, 32, 0, 0, 2, 9, 9, 17, 14, 17, 17, 9, 2, 0, 0, 0, 0, 18, 1, 1, 1, 1, 1,
+19, 17, 17, 19, 0, 0, 36, 19, 0, 0, 32, 0, 0, 2, 9, 9, 17, 14, 17, 17, 9, 0, 0, 0, 0, 0, 18, 1, 1, 1, 1, 1,
19, 17, 17, 19, 0, 0, 36, 19, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
-19, 9, 17, 37, 0, 0, 19, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 11, 8, 4, 0, 0, 8, 0, 0, 0, 0, 17, 17,
-19, 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------------------------------------- Level 8
@@ -272,12 +272,12 @@ map[7] = [13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 1,
//---------------------------------------------------------- Level 9
map[8] = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13,
-0, 8, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 1, 0, 8, 0, 1, 1, 1, 0, 0, 0, 0, 4, 1, 13, 13, 13, 13, 13,
-31, 8, 0, 0, 0, 0, 17, 0, 0, 19, 0, 0, 0, 0, 1, 0, 8, 0, 1, 4, 4, 0, 0, 0, 0, 0, 1, 13, 13, 13, 13, 13,
-7, 7, 0, 0, 0, 17, 17, 0, 0, 32, 0, 16, 0, 0, 6, 0, 8, 0, 0, 0, 0, 0, 16, 0, 0, 11, 1, 13, 13, 13, 13, 13,
-0, 0, 0, 0, 17, 9, 9, 2, 0, 33, 0, 0, 0, 0, 6, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
-0, 26, 0, 7, 7, 7, 7, 7, 0, 32, 0, 0, 0, 1, 1, 1, 8, 0, 14, 1, 0, 0, 5, 0, 0, 0, 1, 18, 12, 0, 30, 0,
-0, 26, 7, 7, 4, 4, 4, 7, 7, 19, 0, 0, 0, 4, 4, 4, 8, 0, 1, 1, 0, 0, 0, 0, 0, 2, 1, 18, 0, 0, 0, 0,
+0, 8, 0, 0, 0, 0, 0, 0, 0, 19, 8, 0, 0, 0, 1, 0, 8, 0, 1, 1, 1, 0, 0, 0, 0, 4, 1, 13, 13, 13, 13, 13,
+31, 8, 0, 0, 0, 0, 17, 0, 0, 19, 8, 0, 0, 0, 1, 0, 8, 0, 1, 4, 4, 0, 0, 0, 0, 0, 1, 13, 13, 13, 13, 13,
+7, 7, 0, 0, 0, 17, 17, 0, 0, 32, 8, 16, 0, 0, 6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8, 0, 0, 0, 7, 7, 26, 1, 1, 0, 0, 0, 0, 0, 16, 0, 0, 0, 8, 0, 0, 8,
-4, 0, 0, 0, 0, 0, 4, 0, 19, 7, 37, 0, 0, 2, 0, 19, 26, 1, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8,
+7, 0, 7, 7, 7, 7, 7, 0, 8, 0, 8, 26, 0, 0, 7, 7, 26, 1, 1, 0, 0, 0, 0, 0, 16, 0, 0, 0, 8, 0, 0, 8,
+4, 0, 0, 0, 0, 0, 4, 0, 19, 7, 19, 26, 0, 2, 0, 19, 26, 1, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 19, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8,
0, 0, 0, 17, 14, 0, 0, 0, 14, 0, 0, 0, 0, 36, 2, 19, 26, 0, 14, 0, 0, 0, 2, 0, 0, 0, 0, 0, 8, 0, 11, 8,
25, 0, 17, 9, 19, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 8, 0, 0, 8,
@@ -335,12 +335,12 @@ map[10] = [1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 1, 1,
//---------------------------------------------------------- Level 12
map[11] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-1, 4, 4, 4, 2, 0, 19, 0, 0, 0, 0, 0, 0, 0, 8, 25, 0, 8, 1, 4, 4, 4, 0, 0, 0, 15, 0, 8, 0, 8, 0, 1,
-1, 0, 0, 0, 1, 2, 19, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 14, 0, 8, 0, 8,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0, 16, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 18,
+9, 0, 0, 0, 0, 0, 7, 7, 7, 0, 0, 0, 0, 7, 7, 7, 0, 0, 14, 0, 7, 7, 7, 7, 0, 14, 0, 2, 0, 1, 1, 1,
+9, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 18, 0, 1, 13, 13, 1, 0, 18, 0, 1, 0, 1, 13, 1,
+9, 0, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 3, 1, 13, 13, 1, 3, 1, 3, 1, 3, 1, 13, 1,
+7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1]
//---------------------------------------------------------- Level 15 (Boss Fight)
diff --git a/res/js/maps_space.js b/res/js/maps_space.js
index d364869..c9a143b 100644
--- a/res/js/maps_space.js
+++ b/res/js/maps_space.js
@@ -92,8 +92,8 @@ map[1] = [7, 7, 1, 13, 1, 7, 7, 7, 7, 7, 1, 13, 1, 7, 7, 7, 7, 7,
1, 1, 0, 0, 0, 0, 38, 7, 7, 7, 7, 7, 38, 0, 0, 46, 48, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, 26, 40,
13, 1,100,101,101,102, 41, 42, 42, 42, 42, 42, 41, 23, 0, 41, 41, 41, 41, 87, 87, 87, 0, 0, 0, 88, 88, 88, 7, 7, 26, 40,
1, 1, 0, 0, 0, 0, 38, 7, 7, 7, 7, 7, 38, 0, 0, 40, 0, 0, 39, 0, 14, 0, 0, 0, 0, 0, 0, 0, 40, 14, 26, 40,
- 14, 40, 0, 0, 0, 0, 43, 0, 14, 0, 0, 24, 19, 0, 0, 40, 0, 97, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 26, 71,
- 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 19, 0, 0, 40, 0, 46, 48, 45, 45, 0, 17, 0, 17, 0, 17, 0, 40, 95, 26, 71,
+ 14, 40, 0, 0, 0, 0, 43, 0, 14, 0, 0, 24, 19, 0, 0, 40, 0, 97, 39, 0, 0, 0, 0, 0, 0, 0, 26, 0, 40, 0, 26, 71,
+ 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 19, 0, 0, 40, 0, 46, 48, 45, 45, 0, 17, 0, 17, 0, 0, 0, 40, 95, 26, 71,
89, 40, 25, 0, 95, 0, 0, 0, 0, 0, 0, 24, 19, 0, 0, 36, 7, 7, 7, 7, 19, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
71, 40, 0, 0, 38, 90, 92, 92, 92, 92, 92, 91, 38, 0, 0, 36, 42, 42, 42, 42, 19,100,101,101,101,101,101,102, 1, 13, 13, 13,
7, 7, 7, 7, 7, 0, 0, 45, 45, 45, 45, 0, 42, 0, 0, 19, 42, 42, 42, 42, 19, 0, 0, 0, 0, 0, 0, 0, 1, 13, 13, 13,
diff --git a/res/js/maps_steampunk.js b/res/js/maps_steampunk.js
index 0581763..26ac86e 100644
--- a/res/js/maps_steampunk.js
+++ b/res/js/maps_steampunk.js
@@ -143,14 +143,14 @@ map[3] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
map[4] = [1, 1, 1, 1, 1, 1, 1, 1, 71, 71, 71, 71, 71, 71, 71, 1, 1, 1, 1, 19, 28, 28, 28, 19, 1, 1, 1, 1, 1, 1, 1, 1,
0, 65, 0, 0, 0, 1, 0, 0, 71, 0, 0, 8, 0, 0, 71, 0, 0, 1, 0, 19, 28, 28, 28, 19, 30, 0, 8, 0, 0, 66, 0, 1,
0, 7, 7, 7, 0, 1, 69, 69, 71, 0, 0, 8, 0, 0, 71, 69, 69, 1, 0, 19, 28, 28, 28, 19, 0, 0, 8, 26, 0, 0, 0, 1,
- 0, 70, 0, 70, 66, 1, 0, 0, 4, 0, 0, 7, 0, 0, 4, 0, 0, 1, 0, 19, 28, 28, 28, 19, 7, 7, 7, 26, 0, 0, 0, 1,
- 14, 70, 0, 70, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 19, 28, 28, 28, 19, 65, 0, 0, 26, 0, 0, 0, 4,
+ 0, 70, 0, 70, 66, 4, 0, 0, 4, 0, 0, 7, 0, 0, 4, 0, 0, 1, 0, 19, 28, 28, 28, 19, 7, 7, 7, 26, 0, 0, 0, 1,
+ 14, 70, 0, 70, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 19, 28, 28, 28, 19, 65, 4, 4, 26, 0, 0, 0, 4,
68, 68, 68, 70, 0, 0, 84, 72, 72, 72, 72, 72, 72, 72, 72, 72, 85, 0, 14, 19, 28, 28, 28, 19, 0, 0, 84, 72, 72, 72, 72, 72,
- 67, 67, 68, 68, 0, 0, 82, 0, 2, 2, 2, 2, 2, 2, 2, 0, 82, 0, 7, 19, 28, 28, 28, 19, 7, 0, 82, 0, 0, 0, 0, 0,
- 67, 67, 67, 68, 14, 0, 82, 0, 1, 1, 1, 1, 1, 1, 1, 66, 82, 0, 19, 28, 28, 28, 28, 28, 19, 2, 2, 2, 29, 0, 26, 14,
- 68, 68, 68, 68, 68, 23, 82, 24, 1, 13, 70, 13, 70, 13, 1, 0, 82, 0, 19, 28, 28, 28, 28, 28, 19, 4, 4, 4, 1, 1, 26, 18,
- 0, 0, 65, 8, 0, 66, 82, 0, 1, 1, 1, 1, 1, 1, 1, 23, 82, 24, 7, 7, 7, 7, 7, 7, 7, 0, 82, 0, 70, 66, 26, 19,
- 0, 0, 0, 8, 0, 0, 82, 0, 0, 1, 1, 69, 1, 1, 0, 0, 82, 0, 8, 19, 8, 66, 0, 8, 4, 0, 82, 0, 70, 0, 26, 19,
+ 67, 67, 68, 68, 66, 0, 82, 0, 0, 2, 2, 2, 2, 2, 0, 0, 82, 0, 7, 19, 28, 28, 28, 19, 0, 0, 82, 0, 29, 0, 26, 0,
+ 67, 67, 67, 68, 0, 0, 82, 0, 0, 1, 1, 1, 1, 1, 66, 0, 82, 0, 19, 28, 28, 28, 28, 7, 7, 2, 2, 2, 1, 1, 26, 14,
+ 68, 68, 68, 68, 24, 23, 82, 24, 23, 1, 70, 13, 70, 1, 0, 0, 82, 0, 19, 28, 28, 28, 28, 28, 19, 4, 4, 4, 70, 0, 26, 18,
+ 0, 0, 65, 8, 0, 0, 82, 0, 0, 1, 1, 1, 1, 1, 24, 23, 82, 24, 7, 7, 7, 7, 7, 7, 7, 0, 82, 0, 70, 66, 26, 19,
+ 0, 0, 0, 8, 0, 0, 82, 0, 0, 1, 1, 69, 1, 1, 0, 0, 82, 0, 8, 19, 8, 21, 0, 8, 4, 0, 82, 0, 70, 0, 26, 19,
14, 25, 0, 8, 0, 0, 82, 0, 0, 1, 70, 13, 70, 1, 0, 0, 82, 0, 8, 19, 8, 14, 0, 8, 0, 0, 82, 0, 70, 0, 26, 19,
18, 0, 0, 8, 0, 0, 82, 0, 0, 1, 1, 1, 1, 1, 0, 0, 82, 0, 8, 0, 8, 18, 0, 8, 0, 0, 82, 0, 70, 0, 0, 19,
7, 7, 7, 7, 0, 0, 82, 0, 0, 70, 0, 70, 0, 70, 65, 0, 82, 0, 7, 7, 7, 7, 0, 7, 0, 0, 82, 0, 70, 0, 0, 19,
@@ -247,19 +247,19 @@ map[8] =[13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
//---------------------------------------------------------- Level 10
map[9] =[13, 1, 1, 1, 1, 71, 17, 17, 17, 71, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 0, 0, 71, 71, 71, 71, 71, 4, 0, 0, 66, 0, 4, 1, 13, 13, 13, 1, 65, 0, 8, 1, 8, 0, 8, 32, 66, 0, 0,
- 4, 0, 65, 0, 0, 0, 4, 0, 0, 71, 0, 0, 26, 26, 0, 0, 1, 13, 13, 13, 1, 0, 0, 8, 6, 8, 0, 8, 33, 0, 30, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 24, 23, 0, 0, 1, 13, 13, 13, 1, 26, 0, 8, 6, 8, 0, 8, 32, 0, 0, 0,
- 0, 0, 0, 0, 84, 72, 72, 85, 24, 71, 0, 84, 72, 72, 85, 0, 1, 13, 13, 13, 1, 26, 0, 7, 7, 7, 0, 7, 7, 7, 7, 7,
+ 1, 1, 0, 0, 0, 71, 71, 71, 71, 71, 4, 0, 0, 66, 0, 4, 1, 13, 13, 13, 1, 65, 8, 0, 1, 8, 0, 8, 32, 66, 0, 0,
+ 4, 0, 65, 0, 0, 0, 4, 0, 0, 71, 0, 0, 26, 26, 0, 0, 1, 13, 13, 13, 1, 0, 8, 0, 6, 8, 0, 8, 33, 0, 30, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 24, 23, 0, 0, 1, 13, 13, 13, 1, 26, 8, 0, 6, 8, 0, 8, 32, 0, 0, 0,
+ 0, 0, 0, 0, 84, 72, 72, 85, 24, 71, 0, 84, 72, 72, 85, 0, 1, 13, 13, 13, 1, 26, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7,
0, 5, 0, 2, 2, 2, 0, 82, 0, 71, 23, 82, 24, 23, 82, 24, 1, 1, 13, 1, 1, 26, 0, 0, 4, 4, 0, 0, 0, 0, 0, 4,
0, 0, 0, 4, 4, 4, 0, 82, 0, 4, 66, 82, 0, 0, 82, 0, 0, 1, 13, 1, 4, 26, 0, 0, 84, 72, 72, 72, 72, 72, 72, 72,
- 14, 0, 0, 0, 82, 0, 0, 82, 0, 0, 0, 82, 0, 0, 82, 0, 24, 1, 13, 1, 0, 26, 0, 0, 82, 0, 0, 0, 0, 0, 0, 2,
+ 14, 0, 0, 0, 82, 0, 0, 82, 0, 0, 0, 82, 24, 23, 82, 0, 24, 1, 13, 1, 0, 26, 0, 0, 82, 0, 0, 0, 0, 0, 0, 2,
18, 0, 0, 0, 82, 0, 0, 86, 72, 72, 72, 83, 0, 0, 82, 0, 0, 1, 13, 1, 0, 0, 0, 0, 82, 0, 0, 1, 1, 1, 1, 1,
- 1, 1, 1, 0, 82, 0, 2, 0, 2, 14, 2, 0, 0, 0, 82, 0, 0, 1, 1, 1, 23, 24, 1, 0, 82, 24, 7, 1, 13, 13, 13, 13,
- 0, 0, 8, 66, 82, 24, 1, 69, 7, 7, 7, 0, 0, 0, 82, 0, 0, 0, 65, 4, 0, 0, 0, 66, 82, 0, 0, 1, 13, 13, 13, 13,
- 25, 0, 8, 0, 82, 0, 0, 66, 19, 27, 19, 2, 0, 0, 86, 72, 72, 85, 0, 0, 84, 72, 72, 72, 83, 0, 14, 1, 13, 13, 13, 13,
- 0, 0, 8, 0, 82, 0, 0, 7, 7, 27, 7, 7, 0, 0, 0, 0, 0, 82, 24, 23, 82, 0, 2, 2, 2, 0, 18, 1, 13, 13, 13, 13,
- 7, 7, 7, 0, 82, 0, 24, 19, 27, 27, 27, 19, 0, 0, 31, 0, 0, 82, 0, 0, 82, 24, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13,
+ 1, 1, 23, 0, 82, 0, 0, 0, 2, 14, 2, 0, 24, 23, 82, 0, 0, 1, 1, 1, 23, 24, 1, 23, 82, 24, 7, 1, 13, 13, 13, 13,
+ 0, 0, 66, 0, 82, 24, 23, 0, 7, 7, 7, 0, 0, 0, 82, 0, 0, 0, 65, 4, 0, 0, 0, 66, 82, 0, 0, 1, 13, 13, 13, 13,
+ 25, 0, 0, 0, 82, 0, 0, 0, 19, 27, 19, 2, 0, 0, 86, 72, 72, 85, 0, 0, 84, 72, 72, 72, 83, 0, 14, 1, 13, 13, 13, 13,
+ 0, 0, 0, 0, 82, 0, 0, 7, 7, 27, 7, 7, 0, 0, 0, 0, 0, 82, 24, 23, 82, 0, 2, 2, 2, 0, 18, 1, 13, 13, 13, 13,
+ 7, 7, 0, 0, 82, 0, 24, 19, 27, 27, 27, 19, 0, 0, 31, 0, 0, 82, 0, 0, 82, 24, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13,
0, 0, 0, 0, 82, 0, 0, 19, 27, 27, 27, 19, 0, 0, 68, 68, 23, 82, 0, 0, 82, 0, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13,
72, 72, 72, 72, 83, 0, 0, 19, 27, 27, 27, 19, 0, 0, 70, 65, 0, 86, 72, 72, 83, 0, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13,
0, 0, 0, 0, 0, 0, 2, 19, 27, 27, 27, 19, 2, 0, 70, 14, 0, 0, 2, 2, 2, 2, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13,
@@ -370,7 +370,7 @@ map[14] =[1, 1, 1, 1, 1, 19, 28, 19, 71, 17, 17, 17, 71, 68, 67, 67, 67, 67,
1, 13, 1, 13, 1, 13, 1, 1, 1, 28, 1, 71, 17, 71, 17, 71, 71, 17, 71, 17, 71, 1, 28, 1, 1, 1, 13, 1, 13, 1, 13, 1,
1, 13, 1, 13, 1, 13, 1, 13, 1, 28, 1, 71, 17, 71, 17, 71, 71, 17, 71, 17, 71, 1, 28, 1, 13, 1, 13, 1, 13, 1, 13, 1,],
-//---------------------------------------------------------- Level 16 (Trophy Room)
+//---------------------------------------------------------- Level 15 (Trophy Room)
map[15] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 28, 27, 28, 0, 15, 0, 28, 27, 28, 0, 15, 0, 28, 27, 28, 0, 0, 0, 28, 27, 28, 0, 15, 0, 19, 27, 19, 0, 15, 0,
diff --git a/res/js/phone_detected.js b/res/js/phone_detected.js
index 7a4703d..6c968c7 100644
--- a/res/js/phone_detected.js
+++ b/res/js/phone_detected.js
@@ -1,15 +1,42 @@
const buttons = document.getElementById("buttons");
const clock = document.getElementById("clock");
+const button_up = document.getElementById("button_up");
+const button_punch = document.getElementById("button_punch");
+const button_down = document.getElementById("button_down");
+const button_enter = document.getElementById("button_enter");
+const button_left = document.getElementById("button_left");
+const button_right = document.getElementById("button_right");
+
+const goFullScreen = () => {
+ const element = document.documentElement;
+ if (element.requestFullscreen) {
+ element.requestFullscreen();
+ } else if (element.mozRequestFullScreen) { // Firefox
+ element.mozRequestFullScreen();
+ } else if (element.webkitRequestFullscreen) { // Chrome, Safari and Opera
+ element.webkitRequestFullscreen();
+ } else if (element.msRequestFullscreen) { // IE/Edge
+ element.msRequestFullscreen();
+ }
+}
+
const deviceDetect = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
if (deviceDetect) {
- buttons.style.display = "block";
playButton.innerHTML = "PLAY!";
playButtonMulti.style.display = "none";
clock.style.display = "none";
}
+document.body.onclick = () => {
+ if(deviceDetect){
+ goFullScreen();
+ }
+}
+
const go_up = () => {
+ afkAchievementProgress();
+ button_up.style.filter = "invert(0)";
if (player1.canStandUp && inGame && !player1.isJumping && !player1.flying) {
isJumping = true;
if(player1.ladderCol){
@@ -65,6 +92,8 @@ const go_up = () => {
}
const go_up_return = () => {
+ button_up.style.filter = "invert(0.15)";
+ afkAchievementProgress();
if(!player1.flying){
player1.isJumping = false;
player1.jumpIntervalSet = false;
@@ -84,6 +113,8 @@ const go_up_return = () => {
}
const go_punch = () => {
+ button_punch.style.filter = "invert(0)";
+ afkAchievementProgress();
if(!player1.alreadyPunched && !player1.ladderCol && !player1.inPipe && inGame){
punch(player1);
}
@@ -91,10 +122,14 @@ const go_punch = () => {
}
const go_punch_return = () => {
+ button_punch.style.filter = "invert(0.15)";
+ afkAchievementProgress();
player1.alreadyPunched = false;
}
const go_down = () => {
+ button_down.style.filter = "invert(0)";
+ afkAchievementProgress();
if(!player1.crouched && !player1.punched && !player1.downPressed && !player1.ladderCol && inGame){
crouch(player1);
} else if (player1.ladderCol && !player1.alreadyGoingDown){
@@ -105,6 +140,8 @@ const go_down = () => {
}
const go_down_return = () => {
+ button_down.style.filter = "invert(0.15)";
+ afkAchievementProgress();
player1.downPressed = false;
if(player1.velocity <= 0.35 && player1.crouched == true && player1.canStandUp == true && player1.ladderCol == false){
unCrouch(player1);
@@ -123,6 +160,8 @@ const go_down_return = () => {
}
const go_right = () => {
+ button_right.style.filter = "invert(0)";
+ afkAchievementProgress();
if (player1.isMovingRight == false) {
player1.isMovingRight = true;
player1.turnedRight = true;
@@ -133,6 +172,8 @@ const go_right = () => {
}
const go_right_return = () => {
+ button_right.style.filter = "invert(0.15)";
+ afkAchievementProgress();
player1.isMovingRight = false;
if(player1.velocityRight <= player1.velocityLeft && player1.isMovingLeft){ //Fixing switching sides
player1.turnedLeft = true;
@@ -141,6 +182,8 @@ const go_right_return = () => {
}
const go_left = () => {
+ button_left.style.filter = "invert(0)";
+ afkAchievementProgress();
if (player1.isMovingLeft == false) {
player1.isMovingLeft = true;
player1.turnedRight = false;
@@ -151,6 +194,8 @@ const go_left = () => {
}
const go_left_return = () => {
+ button_left.style.filter = "invert(0.15)";
+ afkAchievementProgress();
player1.isMovingLeft = false;
if(player1.velocityRight > player1.velocityLeft && player1.isMovingRight){ //Fixing switching sides
player1.turnedLeft = false;
diff --git a/res/js/players.js b/res/js/players.js
index 0e7bfec..5507144 100644
--- a/res/js/players.js
+++ b/res/js/players.js
@@ -71,6 +71,7 @@ const player1 = {
// Gravity
onRock : false,
onWood : false,
+ onMetal : false,
orbUsed : false,
canOrbJump : false,
gravityId : null,
@@ -83,7 +84,7 @@ const player1 = {
alreadyGoingDown : false,
wPressed : false,
// Jump
- headHit : null,
+ headHit : false,
bounced : false,
jumpInterval : null,
jumpIntervalSet : false,
@@ -223,6 +224,7 @@ const player2 = {
// Gravity
onRock : false,
onWood : false,
+ onMetal : false,
orbUsed : false,
canOrbJump : false,
gravityId : null,
@@ -235,7 +237,7 @@ const player2 = {
alreadyGoingDown : false,
wPressed : false,
// Jump
- headHit : null,
+ headHit : false,
bounced : false,
jumpInterval : null,
jumpIntervalSet : false,
diff --git a/res/js/script.js b/res/js/script.js
index 5e731c4..e27683b 100644
--- a/res/js/script.js
+++ b/res/js/script.js
@@ -1,11 +1,13 @@
const canvas = document.getElementById("canvas");
const canvas_darkness = document.getElementById("canvas_darkness");
+const canvas_transition = document.getElementById("canvas_transition");
const canvas_container = document.getElementById("canvas_container");
const container = document.getElementById("container");
const backgroundVideo = document.getElementById("background-video");
const c = canvas.getContext("2d");
const c_d = canvas_darkness.getContext("2d");
+const c_t = canvas_transition.getContext("2d");
const text = document.getElementById("text");
const characters = document.getElementById("characters");
const man = document.getElementById("man");
@@ -44,10 +46,9 @@ const black = document.getElementById("black");
const fullBlack = document.getElementById("fullBlack");
const recommend = document.getElementById("recommend");
const credits_list = document.getElementById("credits_list");
+const red_cross_credits = document.getElementById("red_cross_credits");
const credits_boss = document.getElementById("credits_boss");
const skip_credits = document.getElementById("skip_credits");
-const transition1 = document.getElementById("transition1");
-const transition2 = document.getElementById("transition2");
const rising = document.getElementById("rising");
const esc = document.getElementById("esc");
const playButton = document.getElementById("playButton");
@@ -98,30 +99,32 @@ const achievement_button = document.getElementById("achievement_button");
const trophy = document.getElementById("trophy");
const first_col = document.getElementById("first_col");
const second_col = document.getElementById("second_col");
-const button_enter = document.getElementById("button_enter");
+const deathCounterShow = document.getElementById("deathCounterShow");
+const deadImg = document.getElementById("deadImg");
let helpNum = 0; //Help Number for level detection (doors)
//Timer in menu
const Clock = () => {
const today = new Date();
-
- const clockFormatter = new Intl.DateTimeFormat('cs-CZ', {
+
+ const clockFormatter = new Intl.DateTimeFormat('en-US', {
hour: '2-digit',
minute: '2-digit',
- second: '2-digit',
- hour12: false
+ hour12: true
});
const clock = clockFormatter.format(today);
document.getElementById("clock").textContent = clock;
};
-setInterval(Clock);
+setInterval(Clock, 1000); // Aktualizace každou sekundu
+
//Alien level completed
const alienLevelCompleted = () => {
+ canvas_transition.style.display = "block";
skip_credits.style.animationName = "midToRight_btn";
skip_credits.style.animationPlayState = "running";
skip_credits.style.pointerEvents = "none";
@@ -136,6 +139,7 @@ let movingCreditsInterval
const movingCredits = () => {
if(!btnBackUsedinAlienLevel){
+ canvas_transition.style.display = "none";
music.currentTime = 0;
music.src = "./res/music_spaceship/ending.mp3";
music.play();
@@ -147,7 +151,7 @@ const movingCredits = () => {
skip_credits.style.pointerEvents = "auto";
fullBlack.style.pointerEvents = "none";
movingCreditsInterval = setInterval(() => {
- locationCreditsY -= 1.005;
+ locationCreditsY -= 1.05;
credits_boss.style.top = locationCreditsY + "%";
if(music.currentTime >= 103){
alienLevelCompleted()
@@ -302,9 +306,6 @@ achievement_button.onclick = () => {
}
}
-let transitionY = 576
-let transitionX = 1024
-
const resizeTimer = () => {
let widthCalculator = window.innerWidth;
let newSize = widthCalculator * 0.02; // Pravidlo pro zmenšení/zvětšení textu můžete upravit podle potřeby
@@ -370,16 +371,6 @@ window.onresize = function() {
}
};
-//Adjusts the position of the transition on you
-const setTransitionCords = () => {
- transitionY = (player1.y / 576) * 100 + 3;
- transitionX = (player1.x / 1024) * 100 + 2;
- transition1.style.top = transitionY + "%";
- transition1.style.left = transitionX + "%";
- transition2.style.top = transitionY + "%";
- transition2.style.left = transitionX + "%";
-}
-
let doorsTime = 0;
let doorTimeout = false;
let setTimeoutDoor;
@@ -411,6 +402,7 @@ playButton.onclick = () => {
playButtonMulti.onclick = () => {
playingMultiplayer = true;
+ deadImg.src = "./res/img/dead_rioter.png";
playButton.style.display = "none";
playButtonMulti.style.animationName = "blink"
playButtonMulti.style.animationPlayState = "running";
@@ -454,13 +446,11 @@ tutorialButton.onclick = () => {
//Credit Button
creditsButton.onclick = () => {
credits_list.style.display = "block";
- recommend.style.display = "none";
turnOffButtons();
}
//Credits List
-credits_list.onclick = () => {
+red_cross_credits.onclick = () => {
credits_list.style.display = "none";
- recommend.style.display = "block";
turnOnButtons();
}
@@ -625,6 +615,7 @@ man.onclick = () => { //Choosing Character - Rioter
heart1.src = "./res/img/heart_rioter.png";
heart2.src = "./res/img/heart_rioter.png";
heart3.src = "./res/img/heart_rioter.png";
+ deadImg.src = "./res/img/dead_rioter.png";
playingAsRioter = true;
playingAsRuby = false;
characters.style.display = "block";
@@ -650,6 +641,7 @@ woman.onclick = () => { //Choosing Character - Ruby
heart1.src = "./res/img/heart_ruby.png";
heart2.src = "./res/img/heart_ruby.png";
heart3.src = "./res/img/heart_ruby.png";
+ deadImg.src = "./res/img/dead_ruby.png";
playingAsRioter = false;
playingAsRuby = true;
characters.style.display = "block";
@@ -756,6 +748,9 @@ const movingCharactersAndFullBlack = () => {
chooseDungeon.style.animationPlayState = "running";
setSkins();
achievementPinkColor();
+ if (deviceDetect) {
+ buttons.style.display = "block";
+ }
}, 1000);
}
@@ -976,13 +971,7 @@ const enterFunction = () => {
inGame = false;
ghostVelocity = 2;
sawVelocity = 1.5;
- setTransitionCords();
fadeInTransition();
- setTimeout(() => {
- transition2.currentTime = 0;
- transition2.style.opacity = "0";
- transition2.pause();
- }, 100);
setTimeout(() => {
inGame = true;
platformLevel1 = [...map[helpNum]];
@@ -1192,7 +1181,7 @@ const enterFunction = () => {
music.play();
spawnGhostCords = () => {
xGhost = 400;
- yGhost = 210;
+ yGhost = 200;
}
spawnGhostCords();
}else if(helpNum == 13){ //Level 14
@@ -1510,7 +1499,7 @@ const enterFunction = () => {
}
spawnSawCords();
spider1X = 19*32;
- spider1Y = -26;
+ spider1Y = -16;
music.src = "./res/music_steampunk/song14_steampunk.mp3";
doorsTime = 51000;
music.play();
@@ -1793,8 +1782,6 @@ const enterFunction = () => {
alienBossLevel();
}
}
-
- setTransitionCords();
fadeOutTransition();
// Save Cords
saveGhostCordsX = xGhost;
@@ -2084,7 +2071,7 @@ const generatorSpiderFunction = () => {
if(music.currentTime < 20.5 && warningNum == 2){ // Soon for big jumps
warningNum = 3;
}
- if(warningNum == 1 && !spiderBossWarning && !smokeActivated && (!spiderBossJumping || !smallSpiderJump)){ // Smoke Attack
+ if(warningNum == 1 && !spiderBossWarning && !smokeActivated && bossY == 336 && (!spiderBossJumping || !smallSpiderJump)){ // Smoke Attack
currentFrameSpiderBoss = 0;
currentFrameSmoke = 0;
spiderBossNumber = 2;
@@ -2296,6 +2283,18 @@ let resetAlienBossLevel = () => {
let deathCounter = 0;
+const deathCounterEffect = () => {
+ deathCounter++;
+ localStorage.setItem('deathCounter', deathCounter);
+ deathCounterShow.style.transition = "0s"
+ deathCounterShow.style.color = "rgb(241, 89, 89)"
+ deathCounterShow.innerHTML = deathCounter + "x";
+ setTimeout(() => {
+ deathCounterShow.style.transition = "1s"
+ deathCounterShow.style.color = "white"
+ }, 10);
+}
+
const dead = () => {
if(!godMode){
if(!goingBackToTheLobby){
@@ -2321,6 +2320,9 @@ const dead = () => {
cancelAnimationFrame(player2.animationIdRight)
cancelAnimationFrame(player2.jumpingId)
}
+ deathCounterEffect();
+ player1.y += 40; //Fix spawn bug - Alien boss
+ player2.y += 40; //Fix spawn bug - Alien boss
}else{
if(yGhost < 2000 && xGhost < 2000){
ghostVelocity = 2;
@@ -2348,8 +2350,7 @@ const dead = () => {
movingPlatformVelocity = 1;
spawnSawCords();
spawnCords();
- deathCounter++;
- localStorage.setItem('deathCounter', deathCounter);
+ deathCounterEffect();
achievementNoob();
achievementTimer();
}
@@ -2360,7 +2361,7 @@ const dead = () => {
frameLaserCannon = 0;
sfx_laser.pause();
laserCannonActivated = false;
- player1.velocity= 0;
+ player1.velocity = 0;
player1.velocityRight = 0;
player1.velocityLeft = 0;
player1.velocityJump = 0;
@@ -2407,6 +2408,9 @@ const dead = () => {
doorTimeout = false;
frameDoor = 0;
}
+ if(player1.flying){
+ achievementShip();
+ }
grayScaleEffect();
restartTimer();
timerFunction();
@@ -2424,16 +2428,9 @@ const dead = () => {
playerFlashing();
}
hearts--;
- player1.velocity = 0;
- player1.velocityRight = 0;
- player1.velocityLeft = 0;
- player1.velocityJump = 0;
- player2.velocity = 0;
- player2.velocityRight = 0;
- player2.velocityLeft = 0;
- player2.velocityJump = 0;
+ cancelPlayerMovement();
if(hearts == 0 || frameDoor == 3 || usedRetry || (risingPercent >= -95 && playingCastle)){
- deathCounter++;
+ deathCounterEffect()
if(escShowed || usedRetry){
escFunction();
}
@@ -2476,6 +2473,9 @@ const dead = () => {
player2.turnedRight = true;
player1.turnedLeft = false;
player2.turnedLeft = false;
+ if(player1.flying){
+ achievementShip();
+ }
clearBossTimeouts();
inGame = false;
black.style.transition = "opacity 0s"
@@ -2494,7 +2494,6 @@ const dead = () => {
}, 100);
if(playingCastle){
bossLevel();
- inGame = true;
}else if(playingSteamPunk){
spawnSawCords = () => {
xSaw = 226;
@@ -2553,6 +2552,7 @@ const dead = () => {
resistence = false
}, 2000);
if(playingCastle){
+ cancelPlayerMovement();
spawnCords();
}
}
@@ -2579,37 +2579,16 @@ const dead = () => {
}
//Fade **IN** Transition Function
-//transition1 = Fade In
const fadeInTransition = () => {
- setTimeout(() => {
- transition2.currentTime = 0;
- }, 30);
- transition2.style.opacity = "0";
- transition2.pause();
- transition1.currentTime = 0;
- setTimeout(() => {
- transition1.style.opacity = "1";
- transition1.play();
- }, 30);
- setTimeout(() => {
- }, 100);
+ transitionIsEnabled = true;
+ circleSize = 1500;
+ circleTransitionValue = -1;
}
//Fade **OUT** Transition Function
-//transition2 = Fade Out
const fadeOutTransition = () => {
- transition2.currentTime = 0;
- setTimeout(() => {
- transition2.style.opacity = "1";
- transition2.play();
- }, 30);
- setTimeout(() => {
- transition1.currentTime = 0;
- setTimeout(() => {
- transition1.style.opacity = "0";
- transition1.pause();
- }, 30);
- }, 100);
+ circleSize = 1;
+ circleTransitionValue = 1;
}
//---------------------------------------- Back to the Lobby (from level)
@@ -2634,9 +2613,6 @@ const backToLobby = () => {
clearAllAlienTimeouts();
restartTimer();
timer.style.top = "-5%"
- transition2.addEventListener("ended", () => {
- canEnter = true;
- });
if(usedRetry){
usedRetry = false;
}
@@ -2659,7 +2635,6 @@ const backToLobby = () => {
music.pause();
music.currentTime = 0;
inGame = false;
- setTransitionCords();
fadeInTransition();
esc.style.display = "none";
escShowed = false;
@@ -2767,17 +2742,17 @@ const backToLobby = () => {
}
}else if(helpNum == 1){
player1.x = 300;
- player1.y = 410;
+ player1.y = 400;
if(playingMultiplayer){
player2.x = 300;
- player2.y = 4095;
+ player2.y = 400;
}
}else if(helpNum == 2){
player1.x = 560;
- player1.y = 370;
+ player1.y = 400;
if(playingMultiplayer){
player2.x = 560;
- player2.y = 370;
+ player2.y = 400;
}
}else if(helpNum == 3){
player1.x = 720;
@@ -3079,7 +3054,6 @@ const backToLobby = () => {
}
}
}
- setTransitionCords();
fadeOutTransition()
backToLobbyEntered = false;
goingBackToTheLobby = false;
@@ -3152,6 +3126,9 @@ button_menu.onclick = () => {
if(!deviceDetect){
playButtonMulti.style.display = "block";
}
+ if (deviceDetect) {
+ buttons.style.display = "none";
+ }
creditsButton.style.display = "block";
achievementsButton.style.display = "block";
skins.style.animationDuration = "0s";
@@ -3366,6 +3343,7 @@ const objectsCollision = (PLAYER) => {
bossCollision(PLAYER);
smokeCollision(PLAYER);
spiderBossCollision(PLAYER);
+ alienBossCollision(PLAYER);
movingWallsSpiderCollision(PLAYER);
meteoriteCollision(PLAYER);
lasersHorizontalInSpace.forEach(laser => {
@@ -3379,10 +3357,10 @@ const objectsCollision = (PLAYER) => {
ghostCollision(PLAYER);
sawCollision(PLAYER);
laserAndDetectorCollision(PLAYER);
+ spidersCollision(PLAYER, spider1X, spider1Y);
spidersCollision(PLAYER, spider2X, spider2Y);
spidersCollision(PLAYER, spider3X, spider3Y);
spidersCollision(PLAYER, spider4X, spider4Y);
- spidersCollision(PLAYER, spider1X, spider1Y);
lasersHorizontal.forEach(laser => {
lasersHorizontalCollision(PLAYER, laser);
});
@@ -3713,6 +3691,7 @@ window.onload = () => {
player2.orbGravityCounter = parseInt(localStorage.getItem('orbCounterP2')) || 0;
deathCounter = parseInt(localStorage.getItem('deathCounter')) || 0;
+ deathCounterShow.innerHTML = deathCounter + "x";;
castleDungeonCompleted = localStorage.getItem('castleDungeonCompleted') === 'true';
steampunkDungeonCompleted = localStorage.getItem('steampunkDungeonCompleted') === 'true';
@@ -3990,7 +3969,8 @@ const movingPlatformCollision = (PLAYER) => {
PLAYER.y = yMovingPlatform - PLAYER.height;
PLAYER.onMovingPlatform = true;
PLAYER.onWood = false;
- PLAYER.onRock = true;
+ PLAYER.onRock = false;
+ PLAYER.onMetal = true;
if(PLAYER.downPressed && !PLAYER.crouched){ //You will still crouch
crouch(PLAYER);
}
@@ -4041,10 +4021,10 @@ const sawCollision = (PLAYER) => {
const spidersCollision = (PLAYER, spiderX, spiderY) => {
if (
- PLAYER.y + PLAYER.height >= spiderY + 352 - 32 &&
- PLAYER.y <= spiderY + 352 &&
- PLAYER.x + PLAYER.width >= spiderX &&
- PLAYER.x <= spiderX + 32
+ PLAYER.y + PLAYER.height >= spiderY + 352 - 28 &&
+ PLAYER.y <= spiderY + 352 + 4 &&
+ PLAYER.x + PLAYER.width >= spiderX + 4 &&
+ PLAYER.x <= spiderX + 28
) {
dead();
}
@@ -4383,16 +4363,40 @@ const bottomCollision = (PLAYER) => {
PLAYER.velocityGoingDown = 0;
PLAYER.orbUsed = false;
PLAYER.slideJumped = false;
- if(platformLevel1[i] == 1 || platformLevel1[i] == 6 || platformLevel1[i] == 32 ||
- platformLevel1[i] == 33 || platformLevel1[i] == 68 || platformLevel1[i] == 71 ||
- platformLevel1[i] == 41 || platformLevel1[i] == 38
- ){ //You are on Rock
- PLAYER.onRock = true;
+ let rockSounds, woodSounds, metalSounds;
+
+ if (playingCastle) {
+ rockSounds = castleRockSounds;
+ woodSounds = castleWoodSounds;
+ metalSounds = castleMetalSounds;
+ } else if (playingSteamPunk) {
+ rockSounds = steampunkRockSounds;
+ woodSounds = steampunkWoodSounds;
+ metalSounds = steampunkMetalSounds;
+ } else if (playingSpace) {
+ rockSounds = spaceshipRockSounds;
+ woodSounds = spaceshipWoodSounds;
+ metalSounds = spaceshipMetalSounds;
+ }
+
+ if (rockSounds.includes(platformLevel1[i])) {
+ PLAYER.onRock = true;
+ PLAYER.onMetal = false;
PLAYER.onWood = false;
- }else if((platformLevel1[i] == 7 || platformLevel1[i] == 19 || platformLevel1[i] == 18 || platformLevel1[i] == 9) && !playingSpace){ //You are on Wood
+ } else if (woodSounds.includes(platformLevel1[i])) {
PLAYER.onRock = false;
+ PLAYER.onMetal = false;
PLAYER.onWood = true;
+ } else if (metalSounds.includes(platformLevel1[i])) {
+ PLAYER.onRock = false;
+ PLAYER.onMetal = true;
+ PLAYER.onWood = false;
+ } else {
+ PLAYER.onRock = true;
+ PLAYER.onMetal = false;
+ PLAYER.onWood = false;
}
+
if(PLAYER.downPressed && !PLAYER.crouched){ //You will still crouch
crouch(PLAYER);
}
@@ -4415,6 +4419,19 @@ const bottomCollision = (PLAYER) => {
}
}
+let castleRockSounds = [1, 6]
+let castleWoodSounds = [7, 9, 18, 19, 36, 37]
+let castleMetalSounds = [32, 33]
+
+let steampunkRockSounds = [1, 68]
+let steampunkWoodSounds = [7, 19]
+let steampunkMetalSounds = [18, 71, 73, 74, 75, 76, 77, 78, 79, 80]
+
+let spaceshipRockSounds = [1, 6, 71, 87]
+let spaceshipWoodSounds = [46, 47, 48]
+let spaceshipMetalSounds = [7, 19, 32, 33, 36, 37, 38, 41, 68]
+
+
//---------------------------------------- Hitting your head to the block Collision
const upCollision = (PLAYER) => {
@@ -4516,6 +4533,7 @@ const boostCollision = (PLAYER) => {
PLAYER.boostCollision = true;
PLAYER.onWood = false;
PLAYER.onRock = false;
+ PLAYER.onMetal = false;
if(PLAYER.crouched){
unCrouch(PLAYER);
}
@@ -4550,6 +4568,7 @@ const ladderCollision = (PLAYER) => {
}
PLAYER.onRock = false;
PLAYER.onWood = false;
+ PLAYER.onMetal = false;
PLAYER.ladderCol = true;
cancelAnimationFrame(PLAYER.gravityId)
PLAYER.canGravityActivate = true;
@@ -4563,8 +4582,8 @@ const ladderCollision = (PLAYER) => {
if(PLAYER.ladderCol == false) {
cancelAnimationFrame(PLAYER.goingUpId);
cancelAnimationFrame(PLAYER.goingDownId);
- if(PLAYER.canGravityActivate == true){
- PLAYER.velocity= 0;
+ if(PLAYER.canGravityActivate){
+ PLAYER.velocity = 0;
gravity(PLAYER);
PLAYER.canGravityActivate = false
}
@@ -4739,6 +4758,19 @@ const alienBulletCollision = (PLAYER) => {
}
}
+//----------------------------------------Alien Boss Collision (UFO MODE)
+const alienBossCollision = (PLAYER) => {
+ if (
+ PLAYER.y <= bossY - 50 + 180 &&
+ PLAYER.y + PLAYER.height >= bossY - 50 &&
+ PLAYER.x + PLAYER.width >= bossX - 50 &&
+ PLAYER.x <= bossX - 50 + 180
+ && player1.flying && currentHp >= 1
+ ) {
+ dead();
+ }
+}
+
let nowAlienMoveY;
let thenAlienMoveY = Date.now();
let deltaAlienMoveY;
@@ -4912,13 +4944,13 @@ const goingUp = (PLAYER) => {
if (PLAYER.deltaGoingUp > interval) {
PLAYER.thenGoingUp = PLAYER.nowGoingUp - (PLAYER.deltaGoingUp % interval);
if(PLAYER == player1){
- if(sfx_climb.paused && PLAYER.ladderCol && (!PLAYER.onWood || !PLAYER.onRock)){
+ if(sfx_climb.paused && PLAYER.ladderCol && (!PLAYER.onWood || !PLAYER.onRock || !PLAYER.onMetal)){
sfx_walk.pause();
sfx_climb.src = "./res/sfx/ladder.mp3"
sfx_climb.play();
}
}else{
- if(sfx_climb2.paused && PLAYER.ladderCol && (!PLAYER.onWood || !PLAYER.onRock)){
+ if(sfx_climb2.paused && PLAYER.ladderCol && (!PLAYER.onWood || !PLAYER.onRock || !PLAYER.onMetal)){
sfx_walk2.pause();
sfx_climb2.src = "./res/sfx/ladder.mp3"
sfx_climb2.play();
@@ -4969,20 +5001,24 @@ const goingDown = (PLAYER) => {
const sfxWalkFunction = (PLAYER) => {
if(!PLAYER.flying){
if(PLAYER == player1){
- if(sfx_walk.paused && sfx_jump.paused && (PLAYER.onWood || PLAYER.onRock) && (PLAYER.velocityRight > 2 || PLAYER.velocityLeft > 2) && !PLAYER.crouched && !PLAYER.ladderCol && PLAYER.velocity< 0.3 && !PLAYER.isJumping && (PLAYER.currentFrameRun % 2 == 0)) {
+ if(sfx_walk.paused && sfx_jump.paused && (PLAYER.onWood || PLAYER.onRock || PLAYER.onMetal) && (PLAYER.velocityRight > 2 || PLAYER.velocityLeft > 2) && !PLAYER.crouched && !PLAYER.ladderCol && PLAYER.velocity< 0.3 && !PLAYER.isJumping && (PLAYER.currentFrameRun % 2 == 0)) {
if(PLAYER.onWood && !PLAYER.ladderCol){
sfx_walk.src = "./res/sfx/wood_steps.mp3"; //Walking on wood SFX
}else if(PLAYER.onRock && !PLAYER.ladderCol){
sfx_walk.src = "./res/sfx/stone_steps.mp3"; //Walking on rock SFX
+ }else if(PLAYER.onMetal && !PLAYER.ladderCol){
+ sfx_walk.src = "./res/sfx/metal_steps.mp3"; //Walking on metal SFX
}
sfx_walk.play();
}
}else{
- if(sfx_walk2.paused && sfx_jump2.paused && (PLAYER.onWood || PLAYER.onRock) && (PLAYER.velocityRight > 2 || PLAYER.velocityLeft > 2) && !PLAYER.crouched && !PLAYER.ladderCol && PLAYER.velocity< 0.3 && !PLAYER.isJumping && (PLAYER.currentFrameRun % 2 == 0)) {
+ if(sfx_walk2.paused && sfx_jump2.paused && (PLAYER.onWood || PLAYER.onRock || PLAYER.onMetal) && (PLAYER.velocityRight > 2 || PLAYER.velocityLeft > 2) && !PLAYER.crouched && !PLAYER.ladderCol && PLAYER.velocity< 0.3 && !PLAYER.isJumping && (PLAYER.currentFrameRun % 2 == 0)) {
if(PLAYER.onWood && !PLAYER.ladderCol){
sfx_walk2.src = "./res/sfx/wood_steps.mp3"; //Walking on wood SFX
}else if(PLAYER.onRock && !PLAYER.ladderCol){
sfx_walk2.src = "./res/sfx/stone_steps.mp3"; //Walking on rock SFX
+ }else if(PLAYER.onMetal && !PLAYER.ladderCol){
+ sfx_walk2.src = "./res/sfx/metal_steps.mp3"; //Walking on metal SFX
}
sfx_walk2.play();
}
@@ -5010,11 +5046,11 @@ let gravity = (PLAYER) => {
}
}
if(PLAYER == player1){
- if(!sfx_walk.paused && PLAYER.velocityRight <= 2 && PLAYER.velocityLeft <= 2 && (!PLAYER.onWood || !PLAYER.onRock) || PLAYER.crouched || PLAYER.ladderCol || PLAYER.velocity>= 0.3 || PLAYER.isJumping && PLAYER.currentFrameRun != 1){
+ if(!sfx_walk.paused && PLAYER.velocityRight <= 2 && PLAYER.velocityLeft <= 2 && (!PLAYER.onWood || !PLAYER.onRock || !PLAYER.onMetal) || PLAYER.crouched || PLAYER.ladderCol || PLAYER.velocity>= 0.3 || PLAYER.isJumping && PLAYER.currentFrameRun != 1){
sfx_walk.pause();
}
}else{
- if(!sfx_walk2.paused && PLAYER.velocityRight <= 2 && PLAYER.velocityLeft <= 2 && (!PLAYER.onWood || !PLAYER.onRock) || PLAYER.crouched || PLAYER.ladderCol || PLAYER.velocity>= 0.3 || PLAYER.isJumping && PLAYER.currentFrameRun != 1){
+ if(!sfx_walk2.paused && PLAYER.velocityRight <= 2 && PLAYER.velocityLeft <= 2 && (!PLAYER.onWood || !PLAYER.onRock || !PLAYER.onMetal) || PLAYER.crouched || PLAYER.ladderCol || PLAYER.velocity>= 0.3 || PLAYER.isJumping && PLAYER.currentFrameRun != 1){
sfx_walk2.pause();
}
}
@@ -5057,6 +5093,7 @@ let jump = (PLAYER) => {
}
PLAYER.onRock = false;
PLAYER.onWood = false;
+ PLAYER.onMetal = false;
PLAYER.onMovingPlatform = false;
if(PLAYER == player1){
sfx_walk.currentTime = 0;
@@ -5177,6 +5214,9 @@ let moveRight = (PLAYER) => {
//Crouched
if(PLAYER.crouched == true && PLAYER.velocityRight >= 1){
PLAYER.velocityRight -= 0.12;
+ if(PLAYER.velocityRight < 0){
+ PLAYER.velocityRight = 0
+ }
cancelAnimationFrame(PLAYER.gravityId);
if(!PLAYER.onMovingPlatform){
gravity(PLAYER);
@@ -5190,8 +5230,8 @@ let moveRight = (PLAYER) => {
PLAYER.velocityRight += 0.12;
cancelAnimationFrame(PLAYER.gravityId);
gravity(PLAYER);
- }else if(PLAYER.velocityRight + 0.12 >= 4){
- PLAYER.velocityRight = 4;
+ }else if(PLAYER.velocityRight + 0.12 >= 3.9){
+ PLAYER.velocityRight = 3.9;
}else if(PLAYER.velocityRight >= 2 && PLAYER.velocityLeft >= 2){//If you walk to two sides at once, you won't move
PLAYER.velocityRight = 0;
PLAYER.velocityLeft = 0;
@@ -5199,6 +5239,9 @@ let moveRight = (PLAYER) => {
}else if(PLAYER.isMovingRight == false){
PLAYER.velocityRight -= 0.2;
+ if(PLAYER.velocityRight < 0){
+ PLAYER.velocityRight = 0
+ }
if(PLAYER.velocityRight <= 0.1){
if(PLAYER.velocityRight > PLAYER.velocityLeft && PLAYER.isMovingRight){ //Fixing switching sides
PLAYER.turnedLeft = false;
@@ -5255,7 +5298,7 @@ let moveRight = (PLAYER) => {
}
PLAYER.x += PLAYER.velocityRight;
if(PLAYER.x >= canvas.width - PLAYER.width && !PLAYER.inPipe && !PLAYER.flying) {
- PLAYER.x = canvas.width - PLAYER.width;
+ PLAYER.x = canvas.width - PLAYER.width - 1;
PLAYER.velocityRight = 0;
cancelAnimationFrame(PLAYER.animationIdRight);
}else if(PLAYER.x + 15 >= canvas.width - PLAYER.width && PLAYER.flying) {
@@ -5291,6 +5334,9 @@ let moveLeft = (PLAYER) => {
//Crouched
if(PLAYER.crouched == true && PLAYER.velocityLeft >= 1){
PLAYER.velocityLeft -= 0.12;
+ if(PLAYER.velocityLeft < 0){
+ PLAYER.velocityLeft = 0
+ }
cancelAnimationFrame(PLAYER.gravityId);
gravity(PLAYER);
}else{ //Not Crouched
@@ -5302,14 +5348,17 @@ let moveLeft = (PLAYER) => {
PLAYER.velocityLeft += 0.12;
cancelAnimationFrame(PLAYER.gravityId);
gravity(PLAYER);
- }else if(PLAYER.velocityLeft + 0.12 >= 4){
- PLAYER.velocityLeft = 4;
+ }else if(PLAYER.velocityLeft + 0.12 >= 3.9){
+ PLAYER.velocityLeft = 3.9;
}else if(PLAYER.velocityRight >= 2 && PLAYER.velocityLeft >= 2){ //If you walk to two sides at once, you won't move
PLAYER.velocityRight = 0;
PLAYER.velocityLeft = 0;
}
}else if(PLAYER.isMovingLeft == false){
PLAYER.velocityLeft -= 0.2;
+ if(PLAYER.velocityLeft < 0){
+ PLAYER.velocityLeft = 0
+ }
if(PLAYER.velocityLeft <= 0.1){
if(PLAYER.velocityRight <= PLAYER.velocityLeft && PLAYER.isMovingLeft){ //Fixing switching sides
PLAYER.turnedLeft = true;
@@ -5427,6 +5476,37 @@ const sidesCollision = (PLAYER) => {
//--------------------------PUNCH Function
+const soundRandomGenerator = (PLAYER) => {
+ const soundsRioter = [
+ "./res/sfx/rioter_attack1.mp3",
+ "./res/sfx/rioter_attack2.mp3"
+ ];
+
+ const soundsRuby = [
+ "./res/sfx/ruby_attack1.mp3",
+ "./res/sfx/ruby_attack2.mp3"
+ ];
+
+ const randomIndex = Math.floor(Math.random() * soundsRioter.length);
+
+ if(playingMultiplayer){
+ if(PLAYER == player1){
+ sfx_player.src = soundsRioter[randomIndex];
+ sfx_player.play();
+ }else{
+ sfx_player2.src = soundsRuby[randomIndex];
+ sfx_player2.play();
+ }
+ }else{
+ if(playingAsRuby){
+ sfx_player.src = soundsRuby[randomIndex];
+ }else if(playingAsRioter){
+ sfx_player.src = soundsRioter[randomIndex];
+ }
+ sfx_player.play();
+ }
+};
+
let canPlayBreakSound = true;
let currentHp = 100;
@@ -5442,22 +5522,7 @@ const punch = (PLAYER) => {
//-------------------------------
if(!PLAYER.canUseButton){
if(!PLAYER.flying){
- if(playingMultiplayer){
- if(PLAYER == player1){
- sfx_player.src = "./res/sfx/rioter_attack.mp3";
- sfx_player.play();
- }else{
- sfx_player2.src = "./res/sfx/ruby_attack.mp3";
- sfx_player2.play();
- }
- }else{
- if(playingAsRuby){
- sfx_player.src = "./res/sfx/ruby_attack.mp3";
- }else if(playingAsRioter){
- sfx_player.src = "./res/sfx/rioter_attack.mp3";
- }
- sfx_player.play();
- }
+ soundRandomGenerator(PLAYER)
if(PLAYER == player1){
sfx_miss.src = "./res/sfx/miss.mp3";
sfx_miss.play();
@@ -5688,12 +5753,16 @@ let space = " ";
let escShowed = false;
let inGame = false;
-window.addEventListener("keydown", (event) => {
+const afkAchievementProgress = () => {
if(inGame && !achievementAfkCompleted){
clearInterval(afkTimerInterval);
afkTimeCounter = 0;
afkTimer();
}
+}
+
+window.addEventListener("keydown", (event) => {
+ afkAchievementProgress();
// W - Jumping / Climbing Up
if ((event.key == up || event.key == UP) && player1.canStandUp && inGame && !player1.isJumping && !player1.flying) {
isJumping = true;
@@ -6013,7 +6082,7 @@ doorsTime = 10000000;
selectedRioter = true;
selectedRuby = false;
currentIndexHatsRioter = 0;
- setDungeonToSpace();
+ setDungeonToSteamPunk();
//movingCharactersAndFullBlack();
//darkness = true;
menuToLobby();
@@ -6031,5 +6100,7 @@ doorsTime = 10000000;
player1.hatNumber = 0;
playerOneImage.src = "./res/skins/rioter.png"
setSkins();
+ helpNum = 13
+ enterFunction()
}, 200);
- */
\ No newline at end of file
+*/
\ No newline at end of file
diff --git a/res/json/credits.json b/res/json/credits.json
index 4a1e136..7ecd67d 100644
--- a/res/json/credits.json
+++ b/res/json/credits.json
@@ -274,6 +274,11 @@
"name": "Footsteps running in stiletto heels",
"author": "By Glitchedtones"
},
+ {
+ "object": "Walking on Metal",
+ "name": "Sound Effects - Walking on Solid Metal",
+ "author": "By Hush Angel"
+ },
{
"object": "Enter the level",
"name": "Door opened in bedroom",
@@ -330,12 +335,22 @@
"author": "By Joshua Chivers"
},
{
- "object": "Rioter Attack (male)",
+ "object": "Rioter Attack 1 (male)",
"name": "Attacking grunt male",
"author": "By SmartSound FX"
},
{
- "object": "Ruby Attack (female)",
+ "object": "Rioter Attack 2 (male)",
+ "name": "Attacking grunt soft (Male)",
+ "author": "By SmartSound FX"
+ },
+ {
+ "object": "Ruby Attack 1 (female)",
+ "name": "Fierce Female Combat: Attack Grunts and Fight",
+ "author": "By Femelodia"
+ },
+ {
+ "object": "Ruby Attack 2 (female)",
"name": "Fierce Female Combat: Attack Grunts and Fight",
"author": "By Femelodia"
},
@@ -398,15 +413,5 @@
"object": "Alien Explosion",
"name": "Explosion & rumble",
"author": "By Jeff Kaale"
- },
- {
- "object": "Paper in tutorial",
- "name": "Free paper textured background",
- "author": "By rawpixel.com on Freepik"
- },
- {
- "object": "Fade IN/OUT Circle Transition",
- "name": "Green Screen Circle Animation Full HD",
- "author": "By dangraf art"
}
]
\ No newline at end of file
diff --git a/res/sfx/metal_steps.mp3 b/res/sfx/metal_steps.mp3
new file mode 100644
index 0000000..1622a2f
Binary files /dev/null and b/res/sfx/metal_steps.mp3 differ
diff --git a/res/sfx/rioter_attack.mp3 b/res/sfx/rioter_attack1.mp3
similarity index 100%
rename from res/sfx/rioter_attack.mp3
rename to res/sfx/rioter_attack1.mp3
diff --git a/res/sfx/rioter_attack2.mp3 b/res/sfx/rioter_attack2.mp3
new file mode 100644
index 0000000..b337d2c
Binary files /dev/null and b/res/sfx/rioter_attack2.mp3 differ
diff --git a/res/sfx/ruby_attack.mp3 b/res/sfx/ruby_attack1.mp3
similarity index 100%
rename from res/sfx/ruby_attack.mp3
rename to res/sfx/ruby_attack1.mp3
diff --git a/res/sfx/ruby_attack2.mp3 b/res/sfx/ruby_attack2.mp3
new file mode 100644
index 0000000..0b29269
Binary files /dev/null and b/res/sfx/ruby_attack2.mp3 differ
diff --git a/res/vid/rioter_scene.mp4 b/res/vid/rioter_scene.mp4
deleted file mode 100644
index 14ccd9e..0000000
Binary files a/res/vid/rioter_scene.mp4 and /dev/null differ
diff --git a/res/vid/ruby_scene.mp4 b/res/vid/ruby_scene.mp4
deleted file mode 100644
index 66c7f65..0000000
Binary files a/res/vid/ruby_scene.mp4 and /dev/null differ
diff --git a/res/vid/scene.mp4 b/res/vid/scene.mp4
deleted file mode 100644
index 2cd5b67..0000000
Binary files a/res/vid/scene.mp4 and /dev/null differ
diff --git a/res/vid/transition1.webm b/res/vid/transition1.webm
deleted file mode 100644
index bffe4c6..0000000
Binary files a/res/vid/transition1.webm and /dev/null differ
diff --git a/res/vid/transition2.webm b/res/vid/transition2.webm
deleted file mode 100644
index 1dd9354..0000000
Binary files a/res/vid/transition2.webm and /dev/null differ