top | item 40342803

Static Chess

501 points| maxmcd | 1 year ago |val.town

114 comments

order
[+] onehair|1 year ago|reply
> 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!

Not sure if the first paragraph boasts the pros or the cos of this sort of implementation.

It's one thing to market implementations done in unusual ways with the intent of exploring the possible. It's another to portray software implemented with the right technologies as : bloat, silly animations, slick interactivity to trip up your gameplay.

It doesn't help that the second paragraph showcases shortcoming of this kind if implementation.

It could all just be sarcastic and I fell for your trap.

Well played and clever implementation!

[+] Hugsun|1 year ago|reply
I'd wager that it's a humorous description, taking certain virtues to an illogical extreme.

The limited functionality is nevertheless likely referring to features beside the ones described as bloat.

[+] mst|1 year ago|reply
I suspect it's mostly "because it occured to me I could," which I think should always be an acceptable reason for building something slightly unusual.

I do rather like the idea of play via stateless link passing, though, and honestly the "prettiness" of animations and interactivity does not, at least to me, seem like a net advantage.

"the right technologies" is highly dependent on the user experience you're trying to achieve; in this case I think I'd argue that for the goal at hand, these -were- the right technologies, just like for the UX goals of more featureful sites a different bundle of technologies were the right thing too.

[+] tucnak|1 year ago|reply

[deleted]

[+] helboi4|1 year ago|reply
Yeah the idea that you wouldn't want animations in a GAME is hilarious. It must either be a joke or this person is really that far up the "the web shouldn't have js" culty asscrack.
[+] peabnuts123|1 year ago|reply
This isn't really static right? It's still dynamically rendered by the backend each time you request the page. There aren't 999999919291293923 pre-rendered pages living on a server somewhere.
[+] cachvico|1 year ago|reply
Static as in no XmlHttpRequest.
[+] cxr|1 year ago|reply
> There aren't 999999919291293923 pre-rendered pages living on a server somewhere

There are. They're just compressed with an application-specific compression approach.

[+] throw9474|1 year ago|reply
Nice that it detects valid moves, But it doesn't know about checkmate?

https://chess.maxmcd.com/r1b1kRnr/p1ppB2p/n2P2p1/8/7P/1p6/PP...

Should say checkmate?

[+] michaelmior|1 year ago|reply
It looks like the pieces are no longer movable so maybe checkmate is detected but just not correctly displayed?
[+] jameshart|1 year ago|reply
If checkmates actually said ‘checkmate’ on them you’d be able to find them once the Google bot has indexed the whole site.

Ideally every page needs to include a string summarizing every preceding board state leading up to it, so you can search for a current board state plus ‘checkmate white’ to find every possible way to win from a given board state.

Then all that remains to turn Google into the ultimate chess oracle is to persuade your opponent to make all the moves you found.

[+] jtriangle|1 year ago|reply
It also doesn't allow en passant
[+] whiskeytuesday|1 year ago|reply
I was hoping this was going to be a chess variant where you're not allowed to move any of the pieces.
[+] SonOfLilit|1 year ago|reply
Me too. In the meantime, check out Go for a similar but more static game (more googleable by it's Chinese name Weiqi or its Korean name Baduk).
[+] dullcrisp|1 year ago|reply
It is if you don’t click the links!
[+] theolivenbaum|1 year ago|reply
Awesome work! You should put it behind a CDN like Cloudflare and see what's the cache hit ratio
[+] eertami|1 year ago|reply
Lichess opening explorer would probably be a fairly accurate indicator of how the cache hit ratios would develop:

https://lichess.org/analysis#explorer

I imagine it would look closer to the Lichess database, which differs quite drastically from the Masters database. For instance, with the masters e4 is met with c5 in 46% of games, but on lichess c5 only happens in 19% of games.

[+] afauroux|1 year ago|reply
I did a static chess page myself some time ago but with p2p connection (using webRTC) so you can play with a friend:

- [Try it](https://afauroux.github.io/chess/) - [Fork it](https://github.com/afauroux/chess)

[+] angry_albatross|1 year ago|reply
I noticed a weird bug where sometimes the game will auto-move for a player. In particular, this seems to happen when one queen captures a piece, and the opposing side has the ability to capture that queen with their queen, the game automatically makes the 'queen takes queen' capture.
[+] pushedx|1 year ago|reply
I really like the sound effects. Especially check.
[+] mode80|1 year ago|reply
This is great. Suggest one additional bit to show black at the bottom. That way the player of black is not handicapped by playing from an upside down position.

Or just rip off the chess piece design of this other minimalist chess board simulator, which is never upside down:

https://mirrorchess.com/

(It's ok, I made it.)

[+] jmpavlec|1 year ago|reply
All pieces can move everywhere...? And no rules seem to be in effect. What's the purpose of this?
[+] delichon|1 year ago|reply
> When Google indexes this site will we successfully compute all possible chess moves?

How do spiders know when to stop spidering when they keep getting original content? I assume there's a Gordian solution to the Halting problem like a limit to bytes or seconds. But if you applied the same rules to ebay.com and val.town that doesn't scale.

[+] alexey-salmin|1 year ago|reply
Big spiders neither stop nor start. If each webpage gives you on average 200 new urls, you need to aggregate them, calculate ranks and schedule the top 0.5% for crawling. Crawling capacity is constant, the only question is the quality of your ranking formula.
[+] SonOfLilit|1 year ago|reply
If I were Google, I'd limit bytes per site with the threshold varying based on the site's rank.
[+] toast0|1 year ago|reply
There's a lot of heuristics. Big sites get more crawl time. Some crawlers will back off if pages are slow. There's usually some sort of 'interestingness' calculation, so repetitive content won't get crawled as much.
[+] porphyra|1 year ago|reply
It's a neat demo but surprisingly laggy for a static webpage that has a minimalistic implementation of chess.
[+] ziml77|1 year ago|reply
Surprising? It has to round trip to the server and grab a new page on every click.
[+] tr3ntg|1 year ago|reply
I love this. Such a cool implementation. Fellow Val Towner here.