lava rush v1.1.0
code and software by gael
code and software created by gael on khan academy coded in procesing js
/** { _ | | | | __ ___ ____ _ | | / _` \ \ / / _` | | |___| (_| |\ V / (_| | |______\__,_| \_/_\__,_| | __ \ | | | |__) | _ ___| |__ | _ / | | / __| '_ \ | | \ \ |_| \__ \ | | | |_| \_\__,_|___/_| |_| }
Welcome to my first ever game, Lava Rush! I hope you enjoy!
Devlog:
{ 7/22/2023, 20:34 Base Game Finished, With 2 Secret Places, A Debug menu, And A leaderboard. Planning on making a secret "level system". Good Night, Khan Academy. 7/24/2023, 17:11 Level 1 In Development. Currently, I need to type coordinates 10 times for 1 row/column. I think I might A Way To Change That Though. 8/7/2023, 16:12 School is starting. Progress on the game might slow down. I will still try to update constantly. Although progress will slow down, I have Completed v1.1.0! there might be some bugs with the level transition, but for now, the update is complete! 11/28/2023, 17:52 Guess who's baaack! Working on new movers that slide across screen, from the top and left in the main game, and all sort of directions in story mode. Might come in early to Mid Diecember. on the topic of story mode, I'm also working on a new set of 5 levels to test your skill with them. coming near the turn of the new year. } News: { Past Updates: { v1.0.0: RELEASE DAY! Welcome To Lava Rush! My First Ever Game Is A Big Deal To Me. More Updates Are Soon To Come! } Current Version: { v1.1.0: NEW LEVELS! Welcome to the level update! guess what I added name-wise. Yep, levels! type "Level" to unlock. } Future Updates: { None Right Now. } Cancelled Updates: { None so far. } } Secret Codes: { "CODE" - Sound Test Area Alt Button - Sprites "LEVEL" - Level Selection Shift button - testing Area Note - all codes are accessed through the main menu } */ { random(); var//This is just here to stop oh noes. try removing the random();. player1 = function(x, y, size){ stroke(0); strokeWeight(10*size); point(x, (y)+50*size*cos(x+(-(millis()/20)))); point((x)+50*size*cos(x+(-(millis()/20))), y); point(x, (y)-size*50*cos(x+(-(millis()/20)))); point((x)-50*size*cos(x+(-(millis()/20))), y); strokeWeight(1.75*size); fill(0, 0, 255); arc(x, y, 50*size, 50*size, 0, 180); fill(255, 255, 175); arc(x, y, 50*size, 50*size, 180, 360); strokeWeight(3.75*size); line(x+(10*size), y-(15*size), x+(10*size), y-(5*size)); line(x-(10*size), y-(15*size), x-(10*size), y-(5*size)); }, player2 = function(x, y, size){ stroke(0); strokeWeight(10*size); point(x, (y)+50*size*cos(x+(-(millis()/20)))); point((x)+50*size*cos(x+(-(millis()/20))), y); point(x, (y)-50*size*cos(x+(-(millis()/20)))); point((x)-50*size*cos(x+(-(millis()/20))), y); strokeWeight(1.75*size); fill(0, 205, 0); arc(x, y, 50*size, 50*size, 0, 180); fill(255, 0, 0); fill(255, 255, 175); arc(x, y, 50*size, 50*size, 180, 360); strokeWeight(3.75*size); line(x+(10*size), y-(15*size), x+(10*size), y-(5*size)); line(x-(10*size), y-(15*size), x-(10*size), y-(5*size)); }, LavaPerson = function(x, y, size){ stroke(127.5, 0, 0); strokeWeight(10*size); point(x, (y)+35*size*cos(x+(-(millis()/20)))); point((x)+35*size*cos(x+(-(millis()/20))), y); point(x, (y)-35*size*cos(x+(-(millis()/20)))); point((x)-35*size*cos(x+(-(millis()/20))), y); strokeWeight(1.75*size); fill(87.5, 0, 0); arc(x, y, 50*size, 50*size, 0, 180); fill(255, 0, 0); fill(255, 127.5, 0); arc(x, y, 50*size, 50*size, 180, 360); strokeWeight(3.75*size); line(x+(10*size), y-(15*size), x+(10*size), y-(5*size)); line(x-(10*size), y-(15*size), x-(10*size), y-(5*size)); }, enemy = function(x, y, size){ strokeWeight(1.75*size); stroke(255, 0, 0); fill(255, 0, 0); rectMode(CENTER); rect(x, y, 50*size, 50*size, sin(frameCount*3)*15*size); }, mover = function(x, y){ enemy(x, y, 1); }, logo = function(x, y){ fill(75); stroke(0); strokeWeight(7.5); triangle(x, y, x+75, y, x+25, y-75); ellipse(x, y, 95, 95);}, workInProgress = function(dd, mm, yyyy){ _clearLogs(); println("Sorry For The Inconvenience! You Can Expect This Feature By:\n"+mm+"/"+dd+"/"+yyyy+". Today Is "+month()+"/"+day()+"/"+year()+"."); background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); strokeWeight(37.5); stroke(85); line(0, 200, 600, 400); line(0, 400, 600, 200); textSize(42.5); fill(0); textAlign(CENTER, CENTER); text("Hmm... Something's Not Right!", 300, 265); textSize(30); text("Sorry, This Feature Is Incomplete!", 300, 300); textSize(17.5); text("To Access This Feature, Type 'SHIFT' On The Main Menu.", 300, 325); text("Press CTRL To Exit.", 300, 345); }, z3 = { x: [random(0, 600), random(0, 600), random(0, 600), random(0, 600), random(0, 600), random(0, 600), random(0, 600), random(0, 600), random(0, 600), random(0, 600),], y: [random(200, 400), random(200, 400), random(200, 400), random(200, 400), random(200, 400), random(200, 400), random(200, 400), random(200, 400), random(200, 400), random(200, 400), ], z: [random(0.75, 0.99), random(0.75, 0.99), random(0.75, 0.99), random(0.75, 0.99), random(0.75, 0.99), random(1, 1.25), random(1, 1.25), random(1, 1.25), random(1, 1.25), random(1, 1.25), ] }; { var x = width/2, y = height/2, v = width/2, w = height/2, z=0, debug1 = false, noClip, stage = 1; var xPos = [], yPos = [], size2 = []; var t = 150, rx, ry, play2 = false, play1 = true, score = 0, rz, scene = 'menu', play3 = false, z = true, size1 = 1; var r1 = floor(random(0.5, 4.5)), r2 = floor(random(0.5, 4.5)), r3 = floor(random(0.5, 4.5)), time = 0, Play = 0, P1move = "None", P2move = "None";} { var deathMessage = [ "Oooh...", "AGGHH!!!", "Ouch!", "YAAGH!", "...Wha?!" ]; var death = [ "Don't climb up Mount Overflow!", "Note to self; RUN WHEN LAVA.", "The burn's only third degree?!", "Is it me or is it a little hot?", "We should've stayed home..." ]; var start = [ "https://m.youtube.com/watch?v=dQw4w9WgXcQ", "- .... . / ... --- ...- .. . - / ..- -. .. --- -. / .. ... / - .... . / -... . ... - / ..- -. .. --- -. -.-.--\n.- -- . .-. .. -.-. .- / ... ..- -.-. -.- ... -.-.--", "\"I was bored\" - Gael, 2023", "[Insert Splash Text Here]", "...NANI?! BUT HOW?!" ];} { var moverX1 = [ random(0, 600), random(0, 600), random(0, 600), random(0, 600), random(0, 600) ]; var moverY1 = [ -25, -25, -25, -25, -25 ]; var moverX2 = [ -25, -25, -25, -25, -25 ]; var moverY2 = [ random(0, 600), random(0, 600), random(0, 600), random(0, 600), random(0, 600) ]; } {var Menu = getSound("retro/hit2"), How = getSound("retro/hit1"), Play = getSound("retro/jump2"), Lead = getSound("retro/laser2"), Point = getSound("retro/coin"), Dead = getSound("retro/boom2"), Fail = getSound("retro/whistle2"), Intro = getSound("retro/boom1"), DebugOpen = getSound("rpg/hit-clop"), DebugClose = getSound("rpg/hit-splat"), CodeEnter = getSound("rpg/battle-swing"), CodeComplete = getSound("rpg/battle-spell"); } { var Encryption = [], Encryption2 = 0;}} draw = function() { time+=1; if(millis() < 2500){ background(155); strokeWeight(37.5); stroke(87.5); line(0, 300, 600, 300); for(var z = -300+(time*2); z < 650; z+=75){ strokeWeight(25); point(z, 350); point(600-z, 250); } textSize(50); textAlign(CENTER, CENTER); fill(0); text("XenonOmega Presents...", 300, 300); fill(75); stroke(0); strokeWeight(7.5); logo(500, 525); } if(millis() === 2500){ playSound(Intro); } if(millis() > 2500){ { if(scene === "menu"){ keyPressed = function(){ if(scene === "menu"){ Encryption.push(key); if(key.toString() === "c"){Encryption2 += 1;} else if(key.toString() === "o"){Encryption2 += 2;} else if(key.toString() === "d"){Encryption2 += 3;} else if(key.toString() === "e"){Encryption2 += 4;} else if(key.toString() === "s"){Encryption2 += 5;} else if(key.toString() === "p"){Encryption2 += 6;} else if(key.toString() === "r"){Encryption2 += 7;} else if(key.toString() === "i"){Encryption2 += 8;} else if(key.toString() === "t"){Encryption2 += 9;} _clearLogs(); println(Encryption); println(Encryption2); println(Encryption.length); if(keyCode === ALT){ playSound(CodeComplete); scene = "Sprites";} else if(Encryption2 === 10 && Encryption.length === 4){scene = "Sound Test"; playSound(CodeComplete); } else if(Encryption2 === 12 && Encryption.length === 5){scene = "Color"; playSound(CodeComplete); } else if(Encryption2 === 8 && Encryption.length === 5){scene = "level 1"; playSound(CodeComplete); } else if(keyCode === SHIFT){ x = 25; y = 300; scene = "test"; playSound(CodeComplete); } else{ playSound(CodeEnter);}} }; background(255, 0, 0); noStroke(); fill(255, 255, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(255, 127.5, 0); line(0, 300, 600, 300); fill(255, 127.5, 0); ellipse(300, 300, 150, 150); fill(127.5); noStroke(); triangle(235, 355, 300, 225, 365, 355); textSize(100); fill(0); textAlign(CENTER, CENTER); text("Lava Rush", 300, 75); textSize(62.5); textSize(37.5); text("A XenonOmega Production", 300, 135); fill(255, 127.5, 0); stroke(255, 0, 0); strokeWeight(15); rect(15, 450, 250, 100, 5); rect(315, 450, 250, 100, 5); fill(0); text("How To Play", 137.5, 500); text("Climb Mount\nOverflow", 437.5, 500); if(r3 !== 1 && r3 !== 0){ textSize(30);} else if(r3 === 1){ textSize(15); } else{ textSize(25); } text(start[r3], 300, 175); mouseClicked = function(){ if(mouseX > 15 && mouseX < 265 && mouseY > 450 && mouseY < 550 && scene !== 'play'){ scene = "How"; playSound(How); } else if(mouseX > 315 && mouseX < 565 && mouseY > 450 && mouseY < 550 && play3){ scene = "play"; Play = millis(); playSound(Play); } if(mouseX > 315 && mouseX < 565 && mouseY > 450 && mouseY < 550 && !play3){ _clearLogs(); println("You need to read \"How To Play\" first!"); playSound(Fail); } }; } if(scene === "How"){ play3 = true; r3 = floor(random(0.5, 4.5)); background(255, 0, 0); noStroke(); fill(255, 255, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(255, 127.5, 0); line(0, 300, 600, 300); fill(255, 127.5, 0); ellipse(300, 300, 150, 150); fill(0); textSize(27.5); textAlign(CENTER, TOP); text("You and a friend decided to climb up Mount\nOverflow, Oxonia's tourist hotspot place. After\nA while, you and your friend settle at the\nvolcano's salt flat, but before you realize it,\nMount Overflow has erupted. you cannot\nrun, but only hide.\n\nUse WASD to control Player 1, and arrow keys\nto control Player 2. Speaking of, Player 2 is\nenabled with Ctrl and disabled with 0. To enable\nDebug, Press Shift And Press Alt To Disable The\nDebug Menu. finally, From the Debug Menu,\nYou Can Enable NoClip. Ready To Climb?", 300, 25); textAlign(CENTER, CENTER); textSize(37.5); text("Click To Return To Menu", 300, 560); mouseClicked = function(){ if(scene === "How"){scene = "menu"; playSound(Menu); } }; } if(scene === "play"){ {t++; if(score >= 50){t++; if(score <= 99){stage = 2;} } if(score >= 100){t++; if(score <= 149){stage = 3;} } if(score >= 150){t++; if(score <= 199){stage = 4;} } if(score >= 200){t++; if(score <= 249){stage = 5;} } if(score >= 250){t++; stage = "👑"; } rx = random(0, 12); ry = random(0, 12); background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); } { keyPressed = function(){ if(play1 && scene === 'play'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}} if(play2 && scene === 'play'){ if(keyCode === UP){w-=25; P2move = "Up";} if(keyCode === LEFT){v-=25; P2move = "Left";} if(keyCode === DOWN){w+=25; P2move = "Down";} if(keyCode === RIGHT){v+=25; P2move = "Right";}} { if(keyCode === SHIFT){z = 25; debug1 = true; playSound(DebugOpen);} if(keyCode === ALT){z = 5; debug1 = false; playSound(DebugClose);}} { if(keyCode === CONTROL){play2 = true; } if(key.toString() === '0'){ play2 = false; }} { if(key.toString() === "9"){noClip = true; } if(key.toString() === "1"){noClip = false; }} { if(key.toString() === "i"){size1+=0.1; } if(key.toString() === "o"){size1-=0.1; }} }; { if(x <= -50){x = 625;} if(x >= 650){x = -25;} if(y <= -50){y = 625;} if(y >= 650){y = -25;} if(v <= -50){v = 625;} if(v >= 650){v = -25;} if(w <= -50){w = 625;} if(w >= 650){w = -25;} }} { if(play1){ stroke(0); player1(x, y, size1);} if(play2){ stroke(0); player2(v, w, size1);} for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){play1 = false;} if( xPos[x1] + 45 > v && xPos[x1] - 45 < v && yPos[x1] + 45 > w && yPos[x1] - 45 < w && !noClip){play2 = false;} }} {mover(300, 300, 1); if(t >= 150){ t = 0; score++; xPos.push(round(rx)*50); yPos.push(round(ry)*50); size2.push(rz); playSound(Point); } textSize(37.5); fill(0); if(debug1){ textAlign(LEFT, TOP); text("Debug: Enabled", 0, 0); textSize(22.5); text("Seconds Elapsed (Program): "+millis()/1000, 0, 37.5); text("Seconds Elapsed (Game): "+(millis()-Play)/1000, 0, 60); text("P1: "+x+", "+y, 0, 82.5); text("P2: "+v+", "+w, 0, 105); if(noClip){text("NoClip: Enabled", 0, 127.5);} else{text("NoClip: Disabled", 0, 127.5);} text("P1's Last Move: "+P1move, 0, 150); text("P2's Last Move: "+P2move, 0, 172.5); text("X Position Of Lava: "+xPos[score-1], 0, 195); text("Y Position Of Lava: "+yPos[score-1], 0, 217.5); text("Current Size: "+size1, 0, 240); text("NoClip Enabled With 9,", 0, 262.5); text("Disabled With 1", 0, 285); text("Size Up with I,", 0, 307.5); text("Size Down with O", 0, 330); } else {textAlign(LEFT, TOP); text("Debug: Disabled", 0, 0);} textAlign(LEFT, BOTTOM); textSize(37.5); text(floor(t/30), 0, 525); text("Stage: "+stage, 0, 562.5); text("Score: "+score, 0, 600); if(!play1 && !play2){scene = 'death'; playSound(Dead); } }} if(scene === "death"){ background(255, 0, 0); noStroke(); fill(255, 255, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(255, 127.5, 0); line(0, 300, 600, 300); fill(255, 127.5, 0); ellipse(300, 300, 150, 150); fill(0); textAlign(CENTER, CENTER); textSize(125); text(deathMessage[r1], 300, 100); textSize(25); text("You and your friend burnt to a crisp trying to\ndodge lava.", 300, 212.5); textSize(50); text("Your Final Score: "+ score, 300, 300); textSize(35); if(score < 100){ text(death[r2], 7.5, 250, 600, 200);} else{ text("A Suprise Awaits You In The Leaderboard...", 7.5, 250, 600, 200);} stroke(255, 0, 0); fill(255, 127.5, 0); strokeWeight(15); rect(150, 450, 300, 125, 5); fill(0); textSize(50); text("Leaderboard", 300, 512.5); mouseClicked = function(){ if(scene === 'death' && mouseX > 150 && mouseX < 450 && mouseY > 450 && mouseY < 575 ){ scene = 'lead'; playSound(Lead); } }; } if(scene === "lead"){ background(255, 0, 0); noStroke(); fill(255, 255, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(255, 127.5, 0); line(0, 300, 600, 300); fill(255, 127.5, 0); ellipse(300, 300, 150, 150); textSize(100); fill(0); textAlign(CENTER, TOP); text("Leaderboard", 300, 0); textSize(35); textAlign(CENTER, CENTER); textSize(20); if(score < 100){ text("Submit Your Score\nTo The T&T To Get\nOn The Leaderboard", 300, 300);} else{ text("Type 'Code' On The\nMain Menu For A\nSecret Untold...", 300, 300);} textSize(35); textAlign(LEFT, TOP); text("1. Brother - 211\n2. Me - 39\n3. -----\n4. -----\n5. -----\n6. -----\n7. -----\n8. -----\n9. -----\n10. -----", 25, 105); textAlign(RIGHT, TOP); text("11. -----\n12. -----\n13. -----\n14. -----\n15. -----\n16. -----\n17. -----\n18. -----\n19. -----\n20. -----", 575, 105); }} { if(scene === "Sound Test"){ {background(255); _clearLogs(); println("Welcome To The Sound Test Area! Press Any Number/Letter Assigned To A Sound To Hear\nIt! Thank You For Playing My Game!"); textSize(37.5); fill(0); textAlign(LEFT, TOP); text("1 - Menu\n2 - How\n3 - Play\n4 - Lead\n5 - Point\n6 - Dead\n7 - Fail\n8 - Intro\n9 - DebugOpen", 0, 0); text("0 - DebugClose\nA - CodeEnter\nB - CodeComplete\n\nPress Control To Exit", 175, 0); logo(500, 425); } keyPressed = function(){ if(scene === "Sound Test"){ if(key.toString() === "1"){playSound(Menu);} if(key.toString() === "2"){playSound(How);} if(key.toString() === "3"){playSound(Play);} if(key.toString() === "4"){playSound(Lead);} if(key.toString() === "5"){playSound(Point);} if(key.toString() === "6"){playSound(Dead);} if(key.toString() === "7"){playSound(Fail);} if(key.toString() === "8"){playSound(Intro);} if(key.toString() === "9"){playSound(DebugOpen);} if(key.toString() === "0"){playSound(DebugClose);} if(key.toString() === "a"){playSound(CodeEnter);} if(key.toString() === "b"){playSound(CodeComplete);} if(keyCode === CONTROL){scene = "menu"; Encryption = []; Encryption2 = 0; _clearLogs(); println("Try The Alt Button This Time!"); } } }; } if(scene === "Sprites"){ {background(255, 150, 150); noStroke(); fill(255, 255, 150); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(255, 0, 150); line(0, 300, 600, 300); fill(255, 0, 150); ellipse(300, 300, 150, 150); player1(100, 100, 1); player2(200, 100, 1); enemy(300, 100, 1); logo(425, 100); rectMode(CORNER); fill(255, 127.5, 0); stroke(255, 0, 0); strokeWeight(15); rect(15, 250, 250, 100, 5); _clearLogs(); println("Welcome To The Sprite Area! Press Control To Exit.");} keyPressed = function(){ if(scene === "Sprites" && keyCode === CONTROL){scene = "menu";} }; {textAlign(CENTER, CENTER); textSize(20); fill(0); text("Player 1", 100, 175); text("Player 2", 200, 175); text("Lava", 300, 135); text("My Logo", 425, 165); textSize(50); text("Buttons", 137.5, 300);} }} { if(scene === "level 1"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 50, 100, 200, 350, 400, 500, 600, 50, 400, 600, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 200, 200, 200, 200, 200, 200, 200, 250, 250, 250, ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); if(play1){ player1(x, y, 1);} if(x === 600){ x = 0; scene = "level 2"; } keyPressed = function(){ if(play1 && scene === 'level 1'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } for(var x5 = 2500; x5 > 250; x5-=15){ noFill(); stroke(0); strokeWeight(15); ellipse(x, y, x5, x5); } strokeWeight(37.5); fill(255); textAlign(CENTER, CENTER); textSize(40); text("A Dark Corridor Lies Ahead...", 300, 75); text("What Do I Do? What CAN I Do?", 300, 525); } if(scene === "level 2"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 50, 100, 200, 350, 400, 500, 600, 50, 400, 600, 300, 300, 300, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 200, 200, 200, 200, 200, 200, 200, 250, 250, 250, 300, 350, 400, ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); strokeWeight(37.5); fill(0); textAlign(CENTER, CENTER); textSize(40); text("I Have Found A Flashlight...", 300, 75); text("Where Do I Go?", 300, 525); if(play1){ player1(x, y, 1);} if(x === 600){ x = 0; scene = "level 3"; } keyPressed = function(){ if(play1 && scene === 'level 2'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } } if(scene === "level 3"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 300, 300, 300, 300, 150, 150, 150, 150, 450, 450, 450, 450, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 300, 350, 400, 200, 200, 250, 300, 400, 200, 250, 350, 400, ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); strokeWeight(37.5); fill(0); textAlign(CENTER, CENTER); textSize(40); text("Forward is my only option", 300, 75); text("Who am I? Why am I here?", 300, 525); if(play1){ player1(x, y, 1);} if(x === 600){ x = 0; scene = "level 4"; } keyPressed = function(){ if(play1 && scene === 'level 3'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } } if(scene === "level 4"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 150, 150, 150, 150, 50, 50, 50, 50, 250, 250, 250, 250, 350, 350, 350, 350, 450, 450, 450, 450, 550, 550, 550, 550, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 300, 350, 400, 200, 200, 250, 300, 400, 200, 250, 350, 400, 250, 300, 350, 400, 200, 250, 300, 350, 200, 250, 350, 400 ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); strokeWeight(37.5); fill(0); textAlign(CENTER, CENTER); textSize(40); text("The Terrain seems similar.", 300, 75); text("What is happening?", 300, 525); if(play1){ player1(x, y, 1);} if(x === 600){ x = 300; scene = "level 5"; } keyPressed = function(){ if(play1 && scene === 'level 4'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } } if(scene === "level 5"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); strokeWeight(37.5); if(play1){ player1(x, y, 1);} if(x === 600){ x = 0; scene = "menu"; } if(x === 0){ x = 600; scene = "level 6"; } keyPressed = function(){ if(play1 && scene === 'level 5'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } for(var zzz = 0; zzz < 510; zzz++){ if(x < 500){ stroke(255, 5);} else{ stroke(255, 0, 0, 5);} strokeWeight(500); line(3000-zzz*5, 0, 3000-zzz*5, 600); } fill(0); textAlign(CENTER, CENTER); textSize(40); text("A bright light shines ahead!", 300, 75); if(x < 500){ text("I have found my world!", 300, 525);} else{ text("I have found my world... ?", 300, 525);} } if(scene === "level 6"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 150, 150, 150, 150, 50, 50, 50, 50, 250, 250, 250, 250, 350, 350, 350, 350, 450, 450, 450, 450, 550, 550, 550, 550, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 300, 350, 400, 200, 200, 250, 300, 400, 200, 250, 350, 400, 250, 300, 350, 400, 200, 250, 300, 350, 200, 250, 350, 400 ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); strokeWeight(37.5); fill(0); textAlign(CENTER, CENTER); textSize(40); text("I have found my true world.", 300, 75); text("Where I belong.", 300, 525); if(play1){ player1(x, y, 1);} if(x === 0){ x = 600; scene = "level 7"; } keyPressed = function(){ if(play1 && scene === 'level 6'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } } if(scene === "level 7"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 300, 300, 300, 300, 150, 150, 150, 150, 450, 450, 450, 450, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 300, 350, 400, 200, 200, 250, 300, 400, 200, 250, 350, 400, ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); strokeWeight(37.5); fill(0); textAlign(CENTER, CENTER); textSize(40); text("Not in the plains,", 300, 75); text("Or the desert.", 300, 525); if(play1){ player1(x, y, 1);} if(x === 0){ x = 600; scene = "level 8"; } keyPressed = function(){ if(play1 && scene === 'level 7'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } } if(scene === "level 8"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 50, 100, 200, 350, 400, 500, 600, 50, 400, 600, 300, 300, 300, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 200, 200, 200, 200, 200, 200, 200, 250, 250, 250, 300, 350, 400, ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); strokeWeight(37.5); fill(0); textAlign(CENTER, CENTER); textSize(40); text("It's not very far, actually.", 300, 75); text("Not at all.", 300, 525); if(play1){ player1(x, y, 1);} if(x === 0){ x = 600; scene = "level 9"; } keyPressed = function(){ if(play1 && scene === 'level 8'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } } if(scene === "level 9"){ xPos = [ 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 50, 100, 200, 350, 400, 500, 600, 50, 400, 600, ]; yPos = [ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 200, 200, 200, 200, 200, 200, 200, 250, 250, 250, ]; background(175, 0, 0); noStroke(); fill(175, 175, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(175, 47.5, 0); line(0, 300, 600, 300); fill(175, 47.5, 0); ellipse(300, 300, 150, 150); for(var qwey = 0; qwey < z3.x.length; qwey++){ if(z3.z[qwey] < 1){ LavaPerson(z3.x[qwey], z3.y[qwey], z3.z[qwey]);} } if(play1){ player1(x, y, 1);} for(var qwey = 0; qwey < z3.x.length; qwey++){ if(z3.z[qwey] >= 1){ LavaPerson(z3.x[qwey], z3.y[qwey], z3.z[qwey]);} } if(x === 0){ x = 600; scene = "menu"; } keyPressed = function(){ if(play1 && scene === 'level 9'){ if(key.toString() === 'w'){y-=25; P1move = "Up";} if(key.toString() === 'a'){x-=25; P1move = "Left";} if(key.toString() === 's'){y+=25; P1move = "Down";} if(key.toString() === 'd'){x+=25; P1move = "Right";}}}; for(var x1 = 0; x1 < xPos.length; x1++){ enemy(xPos[x1], yPos[x1], 1); if( xPos[x1] + 45 > x && xPos[x1] - 45 < x && yPos[x1] + 45 > y && yPos[x1] - 45 < y && !noClip){scene = "menu";} } strokeWeight(37.5); fill(0); textAlign(CENTER, CENTER); textSize(40); text("It is here. In the volcano.", 300, 75); text("Thank you for playing my game.", 300, 525); } } { if(scene === "Color"){ workInProgress(25, 9, 2023); } } if(scene === "test"){ background(255, 0, 0); noStroke(); fill(255, 255, 0); rectMode(CORNER); rect(0, 300, 600, 300); strokeWeight(75); stroke(255, 127.5, 0); line(0, 300, 600, 300); fill(255, 127.5, 0); ellipse(300, 300, 150, 150); fill(127.5); textAlign(CENTER, CENTER); } } };more code and software will be added soon!