Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
thatkookooguy authored Dec 11, 2024
1 parent f117b03 commit 8f31178
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 2 deletions.
41 changes: 40 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>achievibit - Boss Battle</title>
<link rel='stylesheet' href='https://csshake.surge.sh/csshake.min.css'><link rel="stylesheet" href="./style.css">

</head>
<body>
<!-- partial:index.partial.html -->
<canvas id="canvas"></canvas>

<div class="game">
Expand All @@ -23,4 +33,33 @@
<div class="rpg-text-box visible" id="textbox2" style="display: none;">
I REALLY HOPE YOU DO...
</div>
</div>
</div>
<!-- partial -->
<script src='https://unpkg.co/gsap@3/dist/gsap.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/CSSRulePlugin.min.js'></script>
<script src='https://assets.codepen.io/16327/CustomBounce3.min.js'></script>
<script src='https://assets.codepen.io/16327/CustomEase3.min.js'></script>
<script src='https://assets.codepen.io/16327/CustomWiggle3.min.js'></script>
<script src='https://assets.codepen.io/16327/DrawSVGPlugin3.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/Draggable.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/EaselPlugin.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/EasePack.min.js'></script>
<script src='https://assets.codepen.io/16327/Flip.min.js'></script>
<script src='https://assets.codepen.io/16327/GSDevTools3.min.js'></script>
<script src='https://assets.codepen.io/16327/InertiaPlugin.min.js'></script>
<script src='https://assets.codepen.io/16327/MorphSVGPlugin3.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/MotionPathPlugin.min.js'></script>
<script src='https://assets.codepen.io/16327/MotionPathHelper.min.js'></script>
<script src='https://assets.codepen.io/16327/PhysicsPropsPlugin3.min.js'></script>
<script src='https://assets.codepen.io/16327/Physics2DPlugin3.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/PixiPlugin.min.js'></script>
<script src='https://assets.codepen.io/16327/ScrambleTextPlugin3.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/ScrollToPlugin.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/ScrollTrigger.min.js'></script>
<script src='https://assets.codepen.io/16327/SplitText3.min.js'></script>
<script src='https://unpkg.com/gsap@3/dist/TextPlugin.min.js'></script>
<script src='https://assets.codepen.io/16327/ScrollSmoother.min.js'></script>
<script src='https://unpkg.com/gsap/dist/Observer.min.js'></script><script src="./script.js"></script>

</body>
</html>
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,4 @@ var cw = (c.width = window.innerWidth);
var ch = (c.height = window.innerHeight);
var cl = new canvasLightning(c, cw, ch);

cl.init();
cl.init();
162 changes: 162 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@700&family=Press+Start+2P&family=Righteous&display=swap");
:root {
--bar-fill: #57e705;
--bar-top: #6aff03;
--pixel-size: 7;
}

.healthbar {
z-index: 10;
position: fixed;
left: 0;
right: 0;
width: calc(30px * var(--pixel-size));
margin: 0 auto calc(2px * var(--pixel-size)) auto;
display: block;
}

.healthbar_fill {
width: 0%;
fill: var(--bar-fill);
transition: width 0.1s ease-in, fill 0.2s linear;
}

.healthbar_fill-top {
width: 0%;
fill: var(--bar-top);
}

.fill-bar-animation {
animation: fill-bar 4s ease-out forwards;
}

html,
body {
margin: 0;
padding: 0;
}

body {
font-family: Avenir, sans-serif;
background-color: #212121;
color: #fffce1;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
flex-direction: column;
}

p {
max-width: 70ch;
font-size: 1.4rem;
text-align: center;
line-height: 1.3;
}

.game {
position: absolute;
width: 100dvw;
height: 100dvh;
overflow: hidden;
bottom: 0;
}

.rpg-text-box {
color: #ff3860;
height: 100px;
left: 50%;
position: absolute;
bottom: 0;
transform: translate(-50%, calc(100% + 50px + 50px));
max-width: 500px;
width: 80vw;
line-height: 1.5em;
margin: 2em 0;
background: white;
border: 1px solid white;
padding: 1em;
font-size: 0.7rem;
font-family: "Press Start 2P", cursive;
font-weight: bolder;
border-radius: 0.2em;
box-shadow: 0 1px 0 1px black, inset 0 1px 0 1px black, 0 0 0 1px black, inset 0 0 0 1px black, 3px 5px 0px 1px rgba(0, 0, 0, 0.25);
opacity: 0;
transition: all 250ms;
z-index: 10;
}

.rpg-text-box.visible {
opacity: 1;
transform: translate(-50%);
}

.code-editor {
position: absolute;
top: 0;
/* bottom: 0; */
left: 0;
right: 0;
background: black;
transition: all 500ms cubic-bezier(0.47, 1.64, 0.41, 0.8);
height: 0;
}

.code-editor.reveal {
height: 100%;
}

.monster {
width: 100%;
height: 100%;
position: absolute;
bottom: 25px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
/* Keep relative positioning for better layout control */
animation: rise-up 4s ease-out forwards, shake-constant 2s infinite;
}
.monster img {
width: 100%;
max-width: 700px;
}

@keyframes fill-bar {
from {
width: 0%;
}
to {
width: 100%;
}
}
/* Keyframes for rising up */
@keyframes rise-up {
from {
transform: translateY(100%);
/* Start below the original position */
}
to {
transform: translateY(0);
/* End at the original position */
}
}
.monster .shake-constant {
animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
/* Smooth timing */
animation-duration: 2s;
/* Slower shake timing */
}

#textbox2 {
display: flex;
align-items: center;
justify-content: center;
}

#canvas {
position: fixed;
z-index: 5;
pointer-events: none;
}

0 comments on commit 8f31178

Please sign in to comment.