Compare commits

...

7 Commits

Author SHA1 Message Date
chocomett
c13cd2dc88 feat: add sounds after game end 2025-12-15 22:22:03 +07:00
chocomett
020022c910 feat: add icon all file 2025-12-15 21:16:34 +07:00
chocomett
2bd0410139 feat: change name file 2025-12-15 21:16:34 +07:00
chocomett
c8ce8197ce fix: trying change border 2025-12-15 21:16:34 +07:00
MRMARCABLE
f60b2c55e3 feat:mini-cave-icon-newmodif 2025-12-15 21:16:34 +07:00
MRMARCABLE
9acd5dc30f feat:mini-cave-icon 2025-12-15 21:16:34 +07:00
ac3a0d5f7b style: score notif 2025-12-15 20:23:39 +07:00
15 changed files with 68 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

View File

@ -4,7 +4,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<link rel="stylesheet" href="/css/global.css">
<link rel="stylesheet" href="/css/style.css">

View File

@ -130,9 +130,7 @@
padding: 10px;
display: flex;
flex-direction: column;
border-radius: 10px;
border: 10px solid white;
z-index: 1;
}
.container-first .content .quiz h2 {
@ -214,3 +212,28 @@
transform: translate(-50%, -50%);
z-index: 999;
}
.floating-points {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #ffdf12;
font-size: 3rem;
font-weight: bold;
text-shadow: 2px 2px 0px #000;
pointer-events: none;
z-index: 999;
animation: floatUp 1s ease-out forwards;
}
@keyframes floatUp {
0%{
opacity: 1;
transform: translate(-50%,-50%) scale(1);
}
100%{
opacity: 0;
transform: translate(-50%, -150%) scale(1.5)
}
}

View File

@ -1,4 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Jersey+15&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
*{
font-family: "Jersey 15", sans-serif;
margin: 0;

View File

@ -4,7 +4,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>firstperson</title>
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
<link rel="stylesheet" href="/css/global.css">
<link rel="stylesheet" href="/css/game.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
@ -15,6 +16,7 @@
<audio id="bgm" src="/assets/music/game.mp3" loop autoplay></audio>
<audio id="sfx" src="/assets/music/slash.mp3"></audio>
<audio id="sfxhrt" src="/assets/music/hurt.mp3"></audio>
<audio id="win" src="/assets/music/Super Mario Bros. Music - Level Complete.mp3"></audio>
<div class="container-first">
<div class="content">
<div class="boss">

View File

@ -4,7 +4,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loading ...</title>
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
<link rel="stylesheet" href="/css/global.css">
<link rel="stylesheet" href="/css/game.css">
</head>

View File

@ -3,7 +3,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>thirdperson</title>
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<link rel="stylesheet" href="/css/global.css">
<link rel="stylesheet" href="/css/game.css">

View File

@ -46,7 +46,8 @@ if (isset($_POST['login'])) {
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>login</title>
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<link rel="stylesheet" href="/css/global.css">
<link rel="stylesheet" href="/css/style.css">

View File

@ -91,6 +91,9 @@ function selectAnswer(e){
if(isCorrect){
selectedBtn.classList.add("correct");
score += 10;
showFloatingText();
shake(document.getElementById("boss"))
dmg();
const bgm = document.getElementById("sfx");
@ -104,9 +107,7 @@ function selectAnswer(e){
bgm.play()
if(wrongCount >= maxWrong){
setTimeout(()=>{
showScore();
}, 500);
showScore();
return;
}
}
@ -124,13 +125,15 @@ function showScore(){
document.getElementById("h1").remove();
document.getElementById("h2").remove();
document.getElementById("h3").remove();
const bgm = document.getElementById("win");
bgm.play()
setTimeout(()=> {
const bgm = document.getElementById("sfxhrt");
bgm.play()
const alerts = document.getElementById("scoreAlert")
alerts.textContent = `you scored ${score} out of 200 !`;
}, 600);
postScore(score);
}, 200);
setTimeout(()=> {
postScore(score);
}, 3200);
}
function handleNextBtn(){
@ -175,4 +178,17 @@ function postScore(score){
alert("Terjadi kesalahan koneksi.");
});
}
function showFloatingText(){
const bossContainer = document.querySelector(".boss");
const point = document.createElement("div");
point.textContent = "+10";
point.classList.add("floating-points");
bossContainer.appendChild(point);
setTimeout(()=>{
point.remove();
}, 800);
}
startQuiz()

View File

@ -37,7 +37,8 @@ if($result){
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>leaderboard</title>
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/style.css">
</head>

View File

@ -3,7 +3,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
</head>
<style>
.notif {

View File

@ -7,7 +7,8 @@ session_start();
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>onboard</title>
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/style.css">

View File

@ -52,6 +52,7 @@ if(isset($_POST['register'])){
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>codebeater</title>
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave-new.png">
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/style.css">