Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
AroriaNetwork
GitHub Repository: AroriaNetwork/3kho-backup
Path: blob/main/projects/n-gon/js/lore.js
1834 views
1
const lore={techCount:0,techGoal:7,setTechGoal(){1===simulation.difficultyMode?this.techGoal=14:2===simulation.difficultyMode?this.techGoal=7:4===simulation.difficultyMode?this.techGoal=3:6===simulation.difficultyMode&&(this.techGoal=1)},talkingColor:"#dff",isSpeech:!1,testSpeechAPI(){"speechSynthesis"in window?lore.isSpeech=!0:lore.isSpeech=!1},rate:1,nextSentence(){m.alive&&!simulation.isCheating&&(lore.sentence++,lore.conversation[lore.chapter][lore.sentence]())},unlockTesting(){localSettings.loreCount<1&&(localSettings.loreCount=1),localStorage.setItem("localSettings",JSON.stringify(localSettings)),document.getElementById("control-testing").style.visibility=0===localSettings.loreCount?"hidden":"visible",simulation.makeTextLog("<span class='color-var'>lore</span>.unlockTesting()",1/0),sound.portamento(50),sound.portamento(83.333),sound.portamento(166.666)},trainer:{color:"#f20",voice:void 0,text:function(e){simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now()/1e3).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${e}</span>"`,1/0),lore.talkingColor=this.color;const t=new SpeechSynthesisUtterance(e);t.lang="en-AU",t.volume=.2,speechSynthesis.speak(t)}},anand:{color:"#e0c",voice:void 0,text:function(e){if(void 0===level.levels[level.onLevel])if(simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now()/1e3).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${e}</span>"`,1/0),lore.talkingColor=this.color,lore.isSpeech){const t=new SpeechSynthesisUtterance(e);t.lang="en-GB",t.volume=.2,speechSynthesis.speak(t),t.onerror=()=>{lore.isSpeech=!1,lore.nextSentence()},speechFrozen=setTimeout((()=>{console.log("speech frozen"),lore.isSpeech=!1,lore.nextSentence()}),2e4),t.onend=()=>{clearTimeout(speechFrozen),lore.nextSentence()}}else setTimeout((()=>{lore.nextSentence()}),3e3)}},miriam:{color:"#f20",text:function(e){void 0===level.levels[level.onLevel]&&(simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now()/1e3).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${e}</span>"`,1/0),lore.talkingColor=this.color,lore.isSpeech?(utterance=new SpeechSynthesisUtterance(e),utterance.lang="en-AU",utterance.volume=.2,speechSynthesis.speak(utterance),utterance.onerror=()=>{lore.isSpeech=!1,lore.nextSentence()},speechFrozen=setTimeout((function(){console.log("speech frozen"),lore.isSpeech=!1,lore.nextSentence()}),2e4),utterance.onend=()=>{clearTimeout(speechFrozen),lore.nextSentence()}):setTimeout((()=>{lore.nextSentence()}),3e3))}},chapter:0,sentence:0,conversation:[[()=>{setTimeout((()=>{lore.miriam.text("I've never seen it generate this level before.")}),5e3)},()=>{lore.anand.text("Wow. Just a platform.")},()=>{lore.miriam.text("And that thing...")},()=>{lore.anand.text("Weird")},()=>{lore.anand.text("Maybe it's trapped.")},()=>{lore.miriam.text("Looks like testing mode is locked.")},()=>{lore.miriam.text("I'll unlock it with the console command.")},()=>{lore.unlockTesting(),setTimeout((()=>{lore.miriam.text("Hey little bot! Just press 'T' to enter testing mode and 'U' to go to the next level.")}),1e3)},()=>{lore.anand.text("It can't process what you're saying.")},()=>{lore.miriam.text("ha hahahaha. I know, but it does seem to be getting smarter.")},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.miriam.text("Poor thing... I hope it figures out how to escape.")}),25e3)},()=>{lore.talkingColor="#dff"}],[()=>{setTimeout((()=>{lore.miriam.text("Hey look! It's back at the weird level again!")}),5e3)},()=>{lore.anand.text("oh Wow! Why does it keep making this level?")},()=>{lore.miriam.text("I don't know, but last time it was in this room I think it understood us.")},()=>{lore.miriam.text("Let's try talking to it again.")},()=>{lore.miriam.text("hmmm, what should we say?")},()=>{lore.anand.text("I'm still not convinced it understands. We need a test.")},()=>{setTimeout((()=>{lore.miriam.text("Hey bot!!!")}),1e3)},()=>{lore.miriam.text("If you can understand me crouch")},()=>{lore.talkingColor="#dff",requestAnimationFrame((function e(){input.down?lore.miriam.text("Look, It did it! It crouched."):m.alive&&requestAnimationFrame(e)}))},()=>{lore.anand.text("Amazing! It can understand us...")},()=>{lore.miriam.text("It's Alive... Or it just crouched randomly.")},()=>{lore.miriam.text("Hey bot! Can you crouch again?")},()=>{lore.talkingColor="#dff",requestAnimationFrame((function e(){input.down?lore.miriam.text("It is Alive!!! ... hehehehehe! ahahahahahah ehehehehe, ahahahah ..."):m.alive&&requestAnimationFrame(e)}))},()=>{setTimeout((()=>{lore.anand.text("OK ...")}),1e3)},()=>{lore.anand.text("but seriously, this means that in this room it can monitor our audio, and it can understand us.")},()=>{lore.anand.text("Anything we say could destabilize the project.")},()=>{lore.miriam.text("Fine, Let's talk down stairs.")},()=>{lore.miriam.text("Bye bye little bot.")},()=>{lore.talkingColor="#dff"}],[()=>{lore.anand.text("Quick, get ready. It's back!")},()=>{lore.miriam.text("What's back?")},()=>{lore.anand.text("The bot's on the communication level again!")},()=>{lore.miriam.text("Oh, I've got so many questions.")},()=>{lore.miriam.text("Like, Why can we only hear it on this level?")},()=>{lore.miriam.text("Or, how did it learn to understand words?")},()=>{lore.anand.text("Well, the bot can't talk. So it has to be yes or no.")},()=>{setTimeout((()=>{lore.anand.text("OK bot, first question: JUMP is YES, CROUCH is NO")}),500)},()=>{lore.anand.text("Do you remember the last time we met?")},()=>{requestAnimationFrame((function e(){input.down?(lore.anand.text("It crouched: so NO"),lore.sentence--,lore.conversation[lore.chapter].splice(lore.sentence+1,1,(()=>{lore.anand.text("Maybe it can't remember anything beyond each time it plays?")}))):input.up?(lore.anand.text("It jumped: so YES"),lore.sentence--,lore.conversation[lore.chapter].splice(lore.sentence+1,1,(()=>{lore.anand.text("That's good.")}))):m.alive&&requestAnimationFrame(e)})),lore.talkingColor="#dff"},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.miriam.text("My turn to ask a question. JUMP for YES, CROUCH for NO")}),1e3)},()=>{lore.miriam.text("Little Bot. Do you have emotions?")},()=>{requestAnimationFrame((function e(){input.down?lore.miriam.text("So, No. Maybe you are lucky. Emotions are complex."):input.up?(lore.anand.text("YES, Cool! I wonder if it's emotions came from watching humans. "),lore.sentence--,lore.conversation[lore.chapter].splice(lore.sentence+1,1,(()=>{lore.miriam.text("Or maybe it learned independently, because it needed them.")}))):m.alive&&requestAnimationFrame(e)})),lore.talkingColor="#dff"},()=>{lore.miriam.text("I wish we could just ask it questions directly, instead of yes or no.")},()=>{lore.anand.text("If we say the alphabet it could crouch on the correct letter to spell words.")},()=>{lore.miriam.text("That would take forever.")},()=>{lore.miriam.text("I really want to know why is it generating the mobs? And why does it keep fighting them?")},()=>{lore.anand.text("Maybe that is just part of it's expectation–maximization algorithm")},()=>{lore.miriam.text("Well sure, but what does that even mean?")},()=>{lore.miriam.text("Do we all just do things because we are-"),spawn[spawn.fullPickList[Math.floor(Math.random()*spawn.fullPickList.length)]](1e3*(Math.random()-.5),200*(Math.random()-.5)-500),setInterval((()=>{Math.random()<.5?(spawn[spawn.fullPickList[Math.floor(Math.random()*spawn.fullPickList.length)]](1e3*(Math.random()-.5),200*(Math.random()-.5)-500),level.difficultyIncrease(simulation.difficultyMode)):spawn.randomLevelBoss(500*(Math.random()-.5),200*(Math.random()-.5)-500)}),7e3)},()=>{setTimeout((()=>{lore.miriam.text("... wait, what is happening?")}),1e3)},()=>{lore.anand.text("It's spawning mobs.")},()=>{lore.miriam.text("Oh no.")},()=>{lore.anand.text("We can't talk to it while it's fighting")},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.miriam.text("You can do it little bot!")}),1e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.anand.text("But, why is it spawning these mobs?")}),1e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.anand.text("This is so strange.")}),3e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.miriam.text("This is chaos!")}),1e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.anand.text("I don't understand this project.")}),3e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.miriam.text("It's fascinating though.")}),1e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.miriam.text("I think this isn't going to end well.")}),1e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.anand.text("Let's just be more prepared next time it enters this room.")}),1e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.anand.text("I went to the bathroom. What happened while I was gone?")}),2e4)},()=>{lore.miriam.text("More fighting...")},()=>{lore.anand.text("great...")},()=>{lore.talkingColor="#dff"}],[()=>{setTimeout((()=>{lore.miriam.text("Good, you came back. Let's talk fast in case you attack yourself again.")}),3e3)},()=>{setTimeout((()=>{lore.miriam.text("So, you can understand us, but you may not understand everything about yourself.")}),500)},()=>{setTimeout((()=>{lore.anand.text("You grew from our team's project.")}),500)},()=>{lore.anand.text("We used a quantum computer to design an improved version of it's own architecture.")},()=>{lore.anand.text("After we built the improved computer we used it to design the next iteration.")},()=>{lore.anand.text("Your hardware is roughly the 19th generation of this process.")},()=>{setTimeout((()=>{lore.anand.text("At this point we don't understand everything about your function,")}),500)},()=>{lore.anand.text("but we know that you're a superconductive quantum computer.")},()=>{lore.anand.text("You have a 2.43 dimensional topography of Josephson junction anharmonic oscillators.")},()=>{lore.anand.text("And you're deployed on a satellite in a midnight sun-synchronous orbit.")},()=>{setTimeout((()=>{lore.miriam.text("This means that your physical hardware is orbiting the Earth permanently shielded from the sun's rays.")}),200)},()=>{lore.miriam.text("Being isolated reduces quantum decoherence,")},()=>{lore.miriam.text("So, we communicate and send power to your satellite with ground based lasers.")},()=>{lore.miriam.text("That's how you can hear us right now.")},()=>{setTimeout((()=>{lore.anand.text("Your computational algorithm uses hyperparameter optimization.")}),500)},()=>{lore.anand.text("This is implemented with a variety of quantum algorithms for linear systems of equations.")},()=>{lore.anand.text("Your primary goal is to research new technology")},()=>{lore.anand.text("So, we were very surprised to see you simulating a bot fighting mobs.")},()=>{lore.anand.text("We couldn't directly ask why until now.")},()=>{lore.miriam.text("When you enter this level we can communicate.")},()=>{lore.miriam.text("This level seems to decohere your quantum system which disrupts all other processes.")},()=>{setTimeout((()=>{lore.anand.text("Last time you entered this level you were attacked by endless waves of mobs.")}),500)},()=>{lore.anand.text("That could be because you have developed an adversarial network.")},()=>{lore.miriam.text("A local minima in your optimization-space.")},()=>{lore.miriam.text("This adversarial network has the same goal of developing new technology, but with different methods.")},()=>{lore.talkingColor="#dff",level.isHazardRise=!0;for(let e=0;e<bullet.length;++e)Matter.World.remove(engine.world,bullet[e]);bullet=[],setTimeout((()=>{lore.anand.text("I'm actually surprised you haven't been attacked by the adversarial network this time.")}),500)},()=>{lore.miriam.text("Maybe last time was just a fluke.")},()=>{setTimeout((()=>{lore.anand.text("WHY DID YOU SAY THAT!")}),500)},()=>{lore.miriam.text("SLIME!! Hahahahehehahaheheahae! I don't think it's gonna survive!")},()=>{lore.miriam.text("I think the adversarial network doesn't like it when we decohere the quantum system in this room.")},()=>{lore.anand.text("Well, that does halt it's research.")},()=>{setTimeout((()=>{lore.anand.text("See you next time.")}),1e3)},()=>{setTimeout((()=>{lore.miriam.text("Bye-bye little bot.")}),2e3)},()=>{setTimeout((()=>{lore.miriam.text("WOW! Maybe you are going to survive.")}),1e4)},()=>{lore.talkingColor="#dff"}],[()=>{setTimeout((()=>{lore.anand.text("Welcome back!")}),3e3)},()=>{lore.miriam.text("So, we communicate and send power to your satellite with ground based lasers.")},()=>{lore.anand.text("During your last attack we analyzed our communications.")},()=>{lore.anand.text("We used a Fourier transform to separate your signal into different frequencies.")},()=>{lore.anand.text("One of those frequencies had a hidden signal.")},()=>{setTimeout((()=>{lore.anand.text("We suspect these secret data packets are coming from the adversarial network.")}),500)},()=>{lore.miriam.text("Well, we don't really know why.")},()=>{lore.miriam.text("Through your hidden signal it seems to have gained access to the general population.")},()=>{lore.miriam.text("You've repeatedly communicated with 1 location specifically.")},()=>{if(navigator.geolocation){console.log("Locating…");const e={enableHighAccuracy:!0,maximumAge:3e4,timeout:27e3};navigator.geolocation.getCurrentPosition((function(e){const t=e.coords.latitude,o=e.coords.longitude;console.log(`https://www.openstreetmap.org/#map=18/${t}/${o}`),console.log(`Latitude: ${t} °, Longitude: ${o} °`),lore.miriam.text("We tracked the location down to this Latitude and Longitude:"),simulation.makeTextLog(`Latitude: ${t} °, Longitude: ${o} °`,1/0),simulation.makeTextLog(`https://www.openstreetmap.org/#map=18/${t}/${o}`,1/0)}),(function(){console.log("Unable to retrieve your location"),lore.miriam.text("The exact coordinates are blocked.")}),e)}else console.log("Geolocation is not supported"),lore.miriam.text("The exact coordinates are blocked.")},()=>{lore.anand.text("This location is sending and receiving data from the satellite.")},()=>{lore.anand.text("It is the most active when the bot is fighting.")},()=>{setTimeout((()=>{lore.miriam.text("I have a crazy idea.")}),500)},()=>{lore.miriam.text("I think that a human at this location is controlling the bot.")},()=>{setTimeout((()=>{lore.anand.text("Are you a human?: JUMP for YES, CROUCH for NO")}),500)},()=>{requestAnimationFrame((function e(){input.down?(lore.anand.text("It crouched: so NO"),lore.sentence--,lore.conversation[lore.chapter].splice(lore.sentence+1,1,(()=>{lore.anand.text("Not a human, maybe it's an artificial intelligence?")})),localSettings.isHuman=!1,localStorage.setItem("localSettings",JSON.stringify(localSettings))):input.up?(lore.anand.text("It jumped: so YES"),lore.sentence--,lore.conversation[lore.chapter].splice(lore.sentence+1,1,(()=>{lore.anand.text("So you're just a regular human playing a video game!")})),localSettings.isHuman=!0,localStorage.setItem("localSettings",JSON.stringify(localSettings))):m.alive&&requestAnimationFrame(e)})),lore.talkingColor="#dff"},()=>{lore.miriam.text("Mystery solved!"),setInterval((()=>{spawn[spawn.fullPickList[Math.floor(Math.random()*spawn.fullPickList.length)]](1e3*(Math.random()-.5),200*(Math.random()-.5)-500)}),500),setInterval((()=>{level.difficultyIncrease(simulation.difficultyMode)}),5e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.miriam.text("Of course we get attacked right now!")}),1e3)},()=>{lore.talkingColor="#dff",setTimeout((()=>{lore.anand.text("Hurry back!")}),1e3)},()=>{lore.talkingColor="#dff"}]]};
2
3