Skip to content

Commit a148d69

Browse files
Add files via upload
1 parent c89e130 commit a148d69

13 files changed

Lines changed: 911 additions & 0 deletions

File tree

Old_BulletHell_Engine/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
EBF stands for entity boss fight, a secret project in development, These are old beta prototypes of me learning how to make the game-engine, though its shit tbh
2+
3+
Play the versions here:
4+
- [EBF v0.0.1-alpha](https://definetlynotai.github.io/Code_DUMP/Old_BulletHell_Engine/ebf-v0.0.1/)
5+
- [EBF v0.0.2-alpha](https://definetlynotai.github.io/Code_DUMP/Old_BulletHell_Engine/ebf-v0.0.2/)
6+
- [EBF v0.0.3-alpha](https://definetlynotai.github.io/Code_DUMP/Old_BulletHell_Engine/ebf-v0.0.3/)
7+
- [EBF v0.1.0-alpha](https://definetlynotai.github.io/Code_DUMP/Old_BulletHell_Engine/ebf-v0.1.0/)
8+
9+
> [!NOTE]
10+
> This is by no means complete, playable or even proper... In fact the buttons do absolutely nothing
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
body {
3+
margin: 0;
4+
background-color: black;
5+
color: white;
6+
font-family: 'Courier New', monospace;
7+
overflow: hidden;
8+
}
9+
10+
canvas {
11+
display: block;
12+
margin: 0 auto;
13+
background-color: #111;
14+
border: 2px solid red;
15+
}
16+
17+
#ui-overlay {
18+
position: absolute;
19+
top: 10px;
20+
left: 10px;
21+
width: calc(100% - 20px);
22+
text-align: center;
23+
z-index: 10;
24+
}
25+
26+
#textbox {
27+
margin-bottom: 10px;
28+
font-size: 1.2em;
29+
color: crimson;
30+
}
31+
32+
#commands button {
33+
margin: 5px;
34+
padding: 10px 20px;
35+
background-color: #222;
36+
border: 1px solid red;
37+
color: white;
38+
cursor: pointer;
39+
}
40+
41+
#commands button:hover {
42+
background-color: crimson;
43+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Final Stand | Entity Fight</title>
7+
<link rel="stylesheet" href="css/style.css">
8+
</head>
9+
<body>
10+
<canvas id="battleCanvas" width="800" height="600"></canvas>
11+
<div id="ui-overlay">
12+
<div id="textbox">The air is still. Something is coming...</div>
13+
<div id="commands">
14+
<button onclick="playerAction('resist')">[✧] Resist</button>
15+
<button onclick="playerAction('purge')">[🩸] Purge</button>
16+
<button onclick="playerAction('recall')">[☠] Recall</button>
17+
<button onclick="playerAction('speak')">[👁] Speak</button>
18+
</div>
19+
</div>
20+
<script src="js/engine.js"></script>
21+
</body>
22+
</html>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
const canvas = document.getElementById('battleCanvas');
3+
const ctx = canvas.getContext('2d');
4+
5+
let player = {
6+
x: canvas.width / 2,
7+
y: canvas.height - 60,
8+
size: 20,
9+
color: 'white',
10+
};
11+
12+
let keys = {};
13+
14+
function drawPlayer() {
15+
ctx.fillStyle = player.color;
16+
ctx.beginPath();
17+
ctx.arc(player.x, player.y, player.size, 0, Math.PI * 2);
18+
ctx.fill();
19+
}
20+
21+
function clearCanvas() {
22+
ctx.fillStyle = "black";
23+
ctx.fillRect(0, 0, canvas.width, canvas.height);
24+
}
25+
26+
function update() {
27+
if (keys['ArrowLeft']) player.x -= 4;
28+
if (keys['ArrowRight']) player.x += 4;
29+
if (keys['ArrowUp']) player.y -= 4;
30+
if (keys['ArrowDown']) player.y += 4;
31+
32+
player.x = Math.max(player.size, Math.min(canvas.width - player.size, player.x));
33+
player.y = Math.max(player.size, Math.min(canvas.height - player.size, player.y));
34+
}
35+
36+
function loop() {
37+
clearCanvas();
38+
update();
39+
drawPlayer();
40+
requestAnimationFrame(loop);
41+
}
42+
43+
function playerAction(action) {
44+
const textbox = document.getElementById('textbox');
45+
switch(action) {
46+
case 'resist':
47+
textbox.innerText = "You brace against the corruption.";
48+
break;
49+
case 'purge':
50+
textbox.innerText = "You attempt to purge the entity.";
51+
break;
52+
case 'recall':
53+
textbox.innerText = "You try to remember who you were.";
54+
break;
55+
case 'speak':
56+
textbox.innerText = "You whisper into the void.";
57+
break;
58+
}
59+
}
60+
61+
document.addEventListener('keydown', (e) => {
62+
keys[e.key] = true;
63+
});
64+
65+
document.addEventListener('keyup', (e) => {
66+
keys[e.key] = false;
67+
});
68+
69+
loop();
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
body {
3+
margin: 0;
4+
background-color: black;
5+
color: white;
6+
font-family: 'Courier New', monospace;
7+
overflow: hidden;
8+
}
9+
10+
canvas {
11+
display: block;
12+
margin: 0 auto;
13+
background-color: #111;
14+
border: 2px solid red;
15+
}
16+
17+
#ui-overlay {
18+
position: absolute;
19+
top: 10px;
20+
left: 10px;
21+
width: calc(100% - 20px);
22+
text-align: center;
23+
z-index: 10;
24+
}
25+
26+
#textbox {
27+
margin-bottom: 10px;
28+
font-size: 1.2em;
29+
color: crimson;
30+
}
31+
32+
#commands button {
33+
margin: 5px;
34+
padding: 10px 20px;
35+
background-color: #222;
36+
border: 1px solid red;
37+
color: white;
38+
cursor: pointer;
39+
}
40+
41+
#commands button:hover {
42+
background-color: crimson;
43+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Final Stand | Entity Fight</title>
7+
<link rel="stylesheet" href="css/style.css">
8+
</head>
9+
<body>
10+
<canvas id="battleCanvas" width="800" height="600"></canvas>
11+
<div id="ui-overlay">
12+
<div id="textbox">The air is still. Something is coming...</div>
13+
<div id="commands">
14+
<button onclick="playerAction('resist')">[✧] Resist</button>
15+
<button onclick="playerAction('purge')">[🩸] Purge</button>
16+
<button onclick="playerAction('recall')">[☠] Recall</button>
17+
<button onclick="playerAction('speak')">[👁] Speak</button>
18+
</div>
19+
</div>
20+
<script src="js/engine.js"></script>
21+
</body>
22+
</html>

0 commit comments

Comments
 (0)