-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
15 lines (15 loc) · 1.17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<html>
<head>
<title>Worms / Tanks HTML5 Pixel Perfect Destructible Terrain</title>
<script src="script.js" type="text/javascript" charset="utf-8"></script>
</head>
<body onload="WORMS.init();">
<h1>Pixel perfect collision in Javascript using Canvas / HTML5</h1>
<canvas width="550" height="400" id="surface"></canvas>
<div style="width:550px;">
<p>Techniques utalize <strong>createImageData</strong>,<strong> getImageData</strong>,<strong> putImageData</strong>,<strong> globalCompositeOperation</strong>, and in memory canvases. Basically a lot if edditing raw pixel data.</p>
<p>Directions: Use <strong>Left</strong> and <strong>Right</strong> arrows to move the character, and <strong>Spacebar</strong> to jump. <strong>Click</strong> the terrain to destroy chunks</p>
<a href="https://github.com/JAStanton/Destructible-Terrain"><img style="position: fixed; top: 0; right: 0; border: 0; z-index:1000" src="https://a248.e.akamai.net/assets.github.com/img/e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub"></a>
</div>
</body>
</html>