7 ms·
One-Page Chess [video]
- woko 6y agoThe webpage is weird. For these interested, it seems to be about: https://github.com/DanielBMarkham/OnePageChess https://github.com/DanielBMarkham/OnePageChess
- cmehdy 6y agoSeems like a very non-conflictual kind of chess game: https://i.imgur.com/nXBxI5v.gifv https://i.imgur.com/nXBxI5v.gifv
- drdeca 6y agoTo remove a piece, select a piece, and then press the delete key on your keyboard.
- tealpod 6y agoA slightly more colorfull version https://freechess.netlify.app/ https://freechess.netlify.app/
- DanielBMarkham 6y agoMany thanks to both of you guys for mentioning and linking to these other sites. I should have called them out explicitly. There's really very cool work here. Having said that, this is not a chess app; it's an app that uses chess to talk/teach about programming and architecture choices. I will not be adding the holographic smell-o-vision to the feature list anytime soon. (grin) If you guys want to comment or ping/email me with any other chess apps for folks, I'll come back in a few days put them in a prominent place under the title of the post. Sorry about the omission.
- pavel_lishin 6y agoAh, yes, a popup asking me if I like what I'm seeing from the "DanielBMarkham Community" the second the page loads, before I get a chance to even understand what the question means. This is definitely a very good pattern that definitely didn't make me immediately click back. https://imgur.com/lxKSA9I https://imgur.com/lxKSA9I
- DanielBMarkham 6y agoI've tried several platforms for blogging over the years. This latest one promises to let me own the content, no ads, and I can set up a subscription program for folks who want to participate more. I thought about 2 bucks a month. It would be an experiment to see if when people pay they tend to argue less and post less low-effort stuff. I suspect this is the case, but it'll be interesting playing around with the idea.
- pavel_lishin 6y agoMaybe you own the content, and maybe there's no ads, but it sure looks like you don't get to control the content - and a popup is obnoxious whether it's selling you diet pills, or the ability to do exactly the thing you're doing.
- DanielBMarkham 6y agoThanks for engaging. I'm perfectly happy switching to something new. I've only been on this place for six weeks or so. But I'm a bit conflicted about options. Looking at the front page of HN on any given day, a significant portion of the top comments are not about the material, but about the site itself: the fonts are too big, the layout is hard-to-read, it's a paywall, Medium has gone to crap, the site shouldn't be trusted, the load times are too long, the page is too heavy, and so on. (You have to know what I'm talking about here) I'm a coder, so I can (and have) put content in all kinds of places. I could give you a detailed list of a dozen or so that I've tried, from plain html/js on my own server to Git Pages and this current experiment. The problem is that I have _yet_ to use any of these where I didn't get some sort of meta comment like yours. I believe, and I hope I'm wrong, that the _control_ issue you mention is never going to go away. It's just going to be an issue of what trade-offs people are willing to make for ease-of-use. Yeah, I could drop web pages and multi-media content on AWS and set up my own membership and streaming services. Then I could get into multi-format streaming, SAML, CDN configuration, and a hundred other technical issues that I'd love to play with, but have nothing at all with trying to create some kind of useful content out of my career experiences so far. So thanks, and I agree, but I'm still kind of at a loss at what to do. If more people complain I'll send the admins an email. I could leave, but to where? Meh. EDIT: If I wasn't clear enough, I don't like the popup either.
- ericsoderstrom 6y agoIn his intro he says he was surprised that he couldn't find any existing ways to do this. Lichess definitely allows you to share positions via url. E.g. https://lichess.org/editor/rnbqkbnr/1p1p1ppp/p3p3/8/3NP3/8/PPP2PPP/RNBQKB1R_w_KQkq_-_0_1 https://lichess.org/editor/rnbqkbnr/1p1p1ppp/p3p3/8/3NP3/8/P... Cool project allthesame
- pwinnski 6y agoIt's a video of an opinionated guy explaining his design of a Static SPA Chess app. I like it! It's fun to see someone with some expertise and opinions talk for a while.
- spankalee 6y agoI recently made a <chess-board> custom HTML element that should make this kind of thing really easy to build: https://justinfagnani.github.io/chessboard-element/ https://justinfagnani.github.io/chessboard-element/ You can specify a board, the current position, and other options right in markup, like: <chess-board draggable-pieces position="8/R7/8/8/k1K5/8/8/8"> </chess-board> So it should be very easy to encode the position in a URL. You could also have more than one board for teaching moves.
- malkia 6y agoSeems like longest chess game is about less than 300 turns, there are 64 cells, and even if you don't know chess, and even without efficiently coded there are max of 128bits per turn (a lot of them not valid, and probably space that can be explored better) - e.g. it feels like not only the current position, but the history can be recorded in small amount of data in an URL.
- malkia 6y agoFor example, instead of using 64-bits for specifying from where the chess figure was moved, it can be the enumeration of the first chess figure for the given player, starting from top/down - so since there are max of 16 figures - it's only 16 bits. So this goes to 64+16 bits only per move. I guess you can go further...
- malkia 6y agoactually the final position is given by the type of figure - queen, king, etc. - and they have limited positions possible (not all 64) - even queen would have at the best - how many? like 27-28 possible - so 16+28 bits only now per move, and it can go lower. Replaying these moves should be almost instant (not much really)
- malkia 6y agoeven further - since the first part says what figure is moved, based on the current state - it can tell what are the possible states (in bits), and only expect that amount of bits that follow. - at the end it'll be just bag of bytes, that need to be URL encoded. Probably something that can fit in a long URL (max 2048 chars?)
- recursivecaveat 6y agoYou can get under one byte per move actually. There are less than 256 moves possible from any given chess position, so you just have an algorithm to order them, and index into that. You can do even better with variable length compression and move ordering. Here's a post from lichess about their system: https://lichess.org/blog/Wqa7GiAAAOIpBLoY/developer-update-275-improved-game-compression https://lichess.org/blog/Wqa7GiAAAOIpBLoY/developer-update-2...
- 29athrowaway 6y agoRefreshing to see something without so many dependencies.