forked from joelthelion/life_web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (38 loc) · 1.61 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<html lang="en">
<head>
<meta charset="utf-8">
<title>Life</title>
<style>
html,
body,
canvas {
margin: 0px;
padding: 0px;
width: 100%;
background: #000010;
z-index: 0;
color: white;
}
canvas {
height: 80%
}
#text a {
color: gray;
}
</style>
</head>
<body>
<canvas id="glcanvas" tabindex='1'></canvas>
<!-- Minified and statically hosted version of https://github.com/not-fl3/macroquad/blob/master/js/mq_js_bundle.js -->
<script src="https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js"></script>
<script>load("target/wasm32-unknown-unknown/release/life_web.wasm");</script> <!-- Your compiled wasm file -->
</body>
<div id=text>
<p>Life simulation written in Rust. Source here: <a href="https://github.com/joelthelion/life_web">https://github.com/joelthelion/life_web</a>.
Inspired by this very old screensaver: <a href="https://sourceforge.net/projects/primlife/">https://sourceforge.net/projects/primlife/</a></p>
<p>Biots are allowed to evolve through mutation and natural selection.<br>Biots have a simple genome giving them unique characteristics:</p>
<ul>
<li>Green allows them to collect energy from the sun</li><li>Red allows them to eat other biots</li><li>Dark blue allows them to defend</li><li>Light blue allows them to move around</li></ul>
<p>A special trait, intelligence (denoted by a square), allows them to move towards the nearest edible biot instead of randomly.<br>All non-green traits cost energy.</p>
</div>
</html>