repl.it
@aceprogramer/

P5.js Testing

HTML, CSS, JS

Finally it works

fork
loading
Files
  • index.html
  • box_hurt.png
  • box_normal.png
  • box_sheild.png
  • lazer.png
  • lazer2.png
  • p5.collide.js
  • quick.js
  • script.js
  • storeData.js
  • style.css
  • users.txt
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>P5.js Game/Test Facility</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="script.js"></script>
    <script src="p5.collide.js"></script>
    <center>
    <h5> You can use the arrow keys to move. Hold space to be safe from lazers. While using the sheild your health will go down slowly. Not using sheild restores health. Lazers cause high damage. Press 'enter' to start/end.</h5>
    <h5 id="stat"></h5>
    <h5><input hidden id="box" type="checkbox" checked="true"><button id="gameMode" type="button" onClick = "hardMode()">Normal Mode(300)</button><button id="gamePlay" type="button" onClick = "startGame()">Start Game</button><button id="gameSet" type="button" onClick = "reset()">Reset</button></h5>
    
    </center>
    
  </body>
</html>
result
console
?