Static Chess
Check it out here: https://chess.maxmcd.com
Plain, brutalist, no bloat chess. Every page is only html and css. Every chess move is made by clicking a link. Send a link to your friend and they'll send you one back to make your move. No silly animations or slick interactivity to trip up your gameplay. When Google indexes this site will we successfully compute all possible chess moves?
Functionality is quite limited, and things might be broken. Please let me know if you find bugs!
Inspired by this HN discussion about sites that have all possible game states of tic-tac-toe.
I plan on extending this to support real gameplay. I think it could be a nice simple interface for long form games with friends. Might also be fun to add a static AI to play against. Feel free to PR any changes if you'd like to see something added.
Render a PNG
This tiny smiley face is rendered by this val:
The image response is cached by the CDN, so make sure to change the image name if you make code changes. Any name with a .png
extension will work: https://maxm-smileypng.web.val.run/-.png
Self Editing Website
Visit and edit at: https://maxm-selfeditingwebsite.web.val.run/
A Go http handler running in Val Town:
Using this go source file, this go library, this Deno library, and this script. Image rendering is happening here. Mandelbrot rendering code taken from here.
Blog post, libraries with readmes and more info coming!
package main
import (
"fmt"
"net/http"
gotown "github.com/maxmcd/go-town"
)
func main() {
img := renderImage()
gotown.ListenAndServe(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/mandelbrot.png" {
w.Header().Set("Content-Type", "image/png")
w.Write(img)
return
}
w.Header().Set("Content-Type", "text/html")
fmt.Fprintf(w, `
<head><link rel="icon" href="/mandelbrot.png"></head>
<style>body {font-family: sans-serif}</style>
Go-Rendered mandelbrot image served from a Go HTTP handler <a href="https://www.val.town/v/maxm/tinygoHttpExample">on Val Town</a>
<br /><img src='/mandelbrot.png' />
`)
}))
}
Retro Visit Counter
You are visitor number:
How special!
Want a retro visitor counter for your myspace page or geocities website? Fork this val and add the image link to your website:
<img src="https://maxm-retrovisitcounter.web.val.run/counter.png">
<!-- Make sure you swap this subdomain out with the subdomain of your forked val -->
<img src="https://[CHANGE ME!].web.val.run/counter.png">