Skip to content

Commit

Permalink
Merge pull request #2183 from pallasivasai/ballfall89434
Browse files Browse the repository at this point in the history
Ball Fall Game is added
  • Loading branch information
Sulagna-Dutta-Roy committed Jul 7, 2024
2 parents 09390bd + 80207a1 commit 4542e36
Show file tree
Hide file tree
Showing 13 changed files with 629 additions and 0 deletions.
Binary file added Ball Fall Game/Chopsic.ttf
Binary file not shown.
7 changes: 7 additions & 0 deletions Ball Fall Game/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ball Fall Game

"The ball is lost in the extremeties of space while exploring.If its touches the extreme of space,it will lose it life.Manage to save the ball's life by drawing it towards the bottom and extending its life time....Lets Start!! "

# How to play

Use keyboard keys or on screen keys
Binary file added Ball Fall Game/bg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Ball Fall Game/bricktouch.wav
Binary file not shown.
Binary file added Ball Fall Game/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Ball Fall Game/fonts/Chopsic.ttf
Binary file not shown.
48 changes: 48 additions & 0 deletions Ball Fall Game/front.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ball Fall</title>
<link rel="stylesheet" href="index.css" />
<link
rel="icon"
type="imagectx.fillText:/x-icon"
href="favicon-32x32.png"
/>
</head>
<body>
<div class="group">
<div class="main-container">
<canvas
id="canvas"
height="500"
width="500"
style="border: 3px solid grey"
>
</canvas>
<script src="index.js"></script>
</div>
<div class="btn-container">
<div class="btnbox">
<button onclick="myfunction1()" class="btn" id="left">
<img src="left.png" />
</button>
<button onclick="myfunction2()" class="btn" id="right">
<img src="right.png" />
</button>
</div>
</div>
</div>
<script>
function myfunction1() {
moveleftbtn();
}

function myfunction2() {
moverightbtn();
}
</script>
</body>
</html>
Binary file added Ball Fall Game/gameover.wav
Binary file not shown.
245 changes: 245 additions & 0 deletions Ball Fall Game/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
@font-face {
font-family: "chopsic";
src: url("Chopsic.ttf");
}

body {
margin: 0;
padding: 0;
background-image: url("bg.gif");
overflow-y: hidden;
overflow-x: hidden;
}

.btn img{
border: 3px solid whitesmoke;
}
@media screen and (width:280px){
#canvas{
height: 250px;
width:250px;
}

.group {
display: flex;
flex-direction: column;
justify-content: center;
}

.main-container {
font-family: chopsic, serif;
font-size: 4vh;
justify-content: center;
align-items: center;
color: antiquewhite;
width: 100vw;
height: 75vh;
border: black 1px solid;
display: flex;
}

.btn-container {
display: inline-block;
justify-content: center;
}

.btnbox {
display: flex;
width: 100vw;
justify-content: center;
}

.btn {
background-color: transparent;
padding: 15px;
justify-content: center;
align-items: center;

}
}

@media screen and (min-width:281px) and (max-width:500px) {
#canvas {
height: 300px;
width: 300px;
}

.group {
display: flex;
flex-direction: column;
justify-content: center;
}

.main-container {
font-family: chopsic, serif;
font-size: 4vh;
justify-content: center;
align-items: center;
color: antiquewhite;
width: 100vw;
height: 75vh;
border: black 1px solid;
display: flex;
}

.btn-container {
display: inline-block;
justify-content: center;
}

.btnbox {
display: flex;
width: 30vw;
padding-left: 140px;
justify-content: center;
}

.btn {
background-color: transparent;
padding: 15px;
justify-content: center;
align-items: center;

}

}

@media screen and (min-width:501px) and (max-width:850px) {
#canvas {
height: 500px;
width: 500px;
}

.group {
display: flex;
flex-direction: column;
justify-content: center;
}

.main-container {
font-family: chopsic, serif;
font-size: 4vh;
justify-content: center;
align-items: center;
color: antiquewhite;
width: 100vw;
height: 75vh;
border: black 1px solid;
display: flex;
}

.btn-container {
display: inline-block;
justify-content: center;
}

.btnbox {
display: flex;
width: 60vw;
padding-left: 140px;
justify-content: center;
}

.btn {
background-color: transparent;
padding: 15px;
justify-content: center;
align-items: center;

}

}

@media screen and (min-width:851px) and (max-height:850px) {
#canvas {
height:600px;
width: 600px;
}

.group {
display: flex;
flex-direction: row;
justify-content: center;
padding: 0px;
}

.main-container {
font-family: chopsic, serif;
font-size: 4vh;
justify-content: center;
align-items: center;
color: antiquewhite;
width: 50vw;
height: 90vh;
padding: 80px;
border: black 1px solid;
display: flex;
}

.btn-container {
display: flex;
justify-content: center;
align-items: center;
height:90vh;
}

.btnbox {
display: flex;
justify-content: center;
}

.btn {
background-color: transparent;
padding: 15px;
justify-content: center;
align-items: center;

}

}

@media screen and (min-width:851px) and (min-height:851px) {
#canvas {
height: 600px;
width: 600px;
}

.group {
display: flex;
flex-direction: column;
justify-content: center;
}

.main-container {
font-family: chopsic, serif;
font-size: 4vh;
justify-content: center;
align-items: center;
color: antiquewhite;
width: 100vw;
height: 75vh;
border: black 1px solid;
display: flex;
}

.btn-container {
display: inline-block;
justify-content: center;
}

.btnbox {
display: flex;
width: 60vw;
padding-left: 140px;
justify-content: center;
}

.btn {
background-color: transparent;
padding: 15px;
justify-content: center;
align-items: center;

}

}
Loading

0 comments on commit 4542e36

Please sign in to comment.