🎮ArcadeLab

Cloudy Club

by HyperOtter35
84 lines3.8 KB
▶ Play
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Cloudy Club</title>
<style>
body{margin:0;background:#2a1a2e;color:white;font-family:system-ui;display:flex;justify-content:center;align-items:center;height:100vh}
#game{width:95%;max-width:600px;height:90vh;background:#3d2844;border-radius:20px;overflow:hidden;display:flex;flex-direction:column;position:relative}
#bg{flex:1;background:linear-gradient(#6a4a7a,#3d2844);display:flex;justify-content:center;align-items:end;padding-bottom:20px}
.char{width:120px;height:180px;margin:0 10px;border-radius:20px 20px 0 0;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:18px;transition:.3s}
#sayori{background:#ffb6d9;color:#4a2030}
#yuri{background:#b49cff;color:#201040}
#box{background:#1a1020;padding:18px;min-height:140px}
#name{font-weight:bold;color:#ff8ec4;margin-bottom:6px}
#text{line-height:1.5}
#choices{display:flex;flex-direction:column;gap:8px;margin-top:12px}
button{padding:10px;border:none;border-radius:10px;background:#ff8ec4;color:#4a2030;font-weight:bold}
button:active{transform:scale(.98)}
.words{display:grid;grid-template-columns:1fr 1fr;gap:8px}
</style>
</head>
<body>
<div id="game">
  <div id="bg">
    <div id="mara" class="char">Mara</div>
    <div id="lara" class="char">Lara</div>
  </div>
  <div id="box">
    <div id="name"></div>
    <div id="text"></div>
    <div id="choices"></div>
  </div>
</div>
<script>
let scene = 0;
const story = [
  {name:"Mara", text:"Hiii! You actually came to the Literature Club! I was so worried you'd get lost!", choices:["I found it okay!","I was a bit nervous"]},
  {name:"Lara", text:"Welcome... I brought tea and some books. Do you like poems?", choices:["I love poems!","I've never written one"]},
  {name:"", text:"POEM GAME: Pick 3 words you like. The girls will like you more!", isPoem:true, words:["sunrise","book","laugh","rain","star","cookie","knife","lonesome","hope","friend"]},
  {name:"Mara", text:"Yay! Your poem is so bright and happy! Just like you!", choices:["Thanks Mara!","What Lara think?"]},
  {name:"Lara", text:"It's... very interesting. I like how you expressed your feelings. Let's share again tomorrow?", choices:["Yes! See you tomorrow","I'll write an even better one"]}
];
function showScene(){
  const s = story[scene];
  document.getElementById('name').innerText = s.name;
  document.getElementById('text').innerText = "";
  document.getElementById('choices').innerHTML = "";
  
  // typewriter
  let i=0;
  const txt = s.text;
  const type = setInterval(()=>{
    document.getElementById('text').innerText += txt[i];
    i++; if(i>=txt.length) clearInterval(type);
  },20);
  if(s.isPoem){
    const div = document.createElement('div');
    div.className='words';
    s.words.forEach(w=>{
      const b=document.createElement('button'); b.innerText=w;
      b.onclick=()=>{b.style.background='#444'; b.disabled=true; checkPoem();};
      div.appendChild(b);
    });
    document.getElementById('choices').appendChild(div);
  } else if(s.choices){
    s.choices.forEach(c=>{
      const b=document.createElement('button'); b.innerText=c;
      b.onclick=()=>{scene++; if(scene<story.length) showScene(); else endGame();};
      document.getElementById('choices').appendChild(b);
    });
  }
}
let picked=0;
function checkPoem(){picked++; if(picked>=3){scene++; showScene();}}
function endGame(){
  document.getElementById('name').innerText="End of Day 1";
  document.getElementById('text').innerText="You joined the Literature Club! You can edit the story array in the code to add Day 2, more choices, scary twists, or your own characters.";
  document.getElementById('choices').innerHTML='<button onclick="location.reload()">Play Again</button>';
}
showScene();
</script>
</body>
</html>

Game Source: Cloudy Club

Creator: HyperOtter35

Libraries: none

Complexity: moderate (84 lines, 3.8 KB)

The full source code is displayed above on this page.

Remix Instructions

To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: cloudy-club-hyperotter35" to link back to the original. Then publish at arcadelab.ai/publish.