formula guide
- g.width = field width
- g.height = field height
- g.ticks = frames since start (60 per second)
- g.score = current score
- e.x = current thing x position
- e.y = current thing y position
- e.dx = current thing horizontal motion
- e.dy = current thing vertical motion
- e.timer = current thing timer progress (0 to 1)
- min(x,y) = pick smallest number
- max(x,y) = pick larger number
- clamp(x,a,b) = clamp x between a (low) and b (hi)
- mod(x,y) = modulo/remainder
- lerp(x,a,b,c,d) = when x is a return c, when x is b return d
- math_sqrt(x) = square root function
- math_sin(x) = sine function
- math_cos(x) = cosine function
export for itch.io
-
- make sure the files are called "index.html" and "build.wasm"
- put the two files in a .zip file
- on itch.io, set the "Kind of project" to "HTML"
- upload the .zip file and check the box "This file will be played in the browser"