Jump to content

User:Arvindn/Chess

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Hephaestos (talk | contribs) at 05:29, 9 April 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This is my idea for chess diagrams on wikipedia -- have an image for each piece and assemble it using a table. Some nice things about this method:

  1. Standard images throughout wikipedia
  2. No need to upload an image/screenshot each time
  3. Easy to correct mistakes/make changes
  4. If better images become available, they can be uploaded to overwrite the old ones without changing the articles
  5. Html snippet can be generated from algebraic notation with a trivial perl/python script if need be

Advantages over wikitex:

  1. No additional syntax, wiki editing is already beginning to resemble programming
  2. Image size is very small; each piece needs to be downloaded only once regardless of how many chessboards it appears in
  3. Anyone can create images

Disadvantages compared to wikitex:

  1. Far more verbose (but a solution is on the way, see talk)

Partial solution to verbosity problem: I have put the script online at http://theory.cs.iitm.ernet.in/~arvindn/chess/. If you type in the position it gives the wikipedia markup.

Good start. Some comment -- it would be more convenient to include the table commands, the text I got back didn't have any, so I would have had to add each of them in by hand, almost as much work. This is required, since for some Explorer browsers, the other way gives spaces between squares. Also, wouldn't it be possible to incorporate this program you have written to be wiki code, so that one could enter any possible board in terms of pnbqPNBQ..., etc. and have that be all you deal with in any edits? So much of wikipedia's article text are programmed anyway, now. Great job! Revolver 10:47, 5 Apr 2004 (UTC)
I see you mention this very idea below. Revolver 10:49, 5 Apr 2004 (UTC)
The output does have the table markup, so I'm not sure what you mean. As for the other two points, yes I've mentioned them below. Arvindn 12:41, 5 Apr 2004 (UTC)
Well, this is what I get when I cut and paste directly:
[deleted markup without table tags]
Ahh, I think I know what's happening. Its a horrible bug in MSIE, which of course Microsoft considers a feature. I've made the server send the response as text/plain, which means that the browser's job is to show it as such without trying to render it. But of course MSIE thinks it knows better and parses it as HTML. It works for me on Mozilla. For the moment you can copy-paste the source code of the page instead of what you see on the page, I'll see what I can do. Arvindn 02:13, 6 Apr 2004 (UTC)

Understood. I always hate programs that think they "know better" what the user wants (without bothering to ask him/her)! And these usually seem to be MS programs -- it's fine if it's what you want, otherwise... Revolver 21:05, 6 Apr 2004 (UTC)


This is a great idea! Revolver 00:21, 21 Mar 2004 (UTC)

I agree. Be bold! All old chess diagrams must be replaced and deleted! - Woodrow 02:33, 4 Apr 2004 (UTC)

In fact, I like this idea so much, I'm using it to start a correspondence chess game! - Woodrow 03:10, 4 Apr 2004 (UTC)

Yes, this is a very nice idea, and I hope it or something like it becomes standard eventually, but, as Arvindn says, the syntax should be less verbose. This will probably be fixed at some point, but until it is lets not delete any of the old diagrams, please (I've no problem with people making new diagrams in this way). --Camembert

Copied from my talk page Arvindn 03:31, 5 Apr 2004 (UTC)

Hello Arvindn! Neat chess board! I just want to you look at Zwischenzug:

You see I converted the table syntax. What do you like it? The only current problem with putting together chess position from your pieces is that it clutters the wikitext. Do you think it's better with the new syntax? I think we should make all chess positions in this new syntax..

— Sverdrup 16:35, 4 Apr 2004 (UTC)

Hi! Nice to know you like it. The wiki syntax for the table, unfortunately, doesn't work in the Microsoft browser: there are gaps between the squares.
As for the clutter, I'm really hoping that once the syntax for extensions is finalized, the little script I wrote to generate the table from a concise description will go into MediaWiki.
Arvindn 03:18, 5 Apr 2004 (UTC)

Cool chess board, Arvindh! Can I borrow it? --Rj 21:17, Apr 6, 2004 (UTC)

Of course. That's the point :)
I should have thought up a short, easy username like yours. I've seen half-a-dozen misspellings of mine so far :) Arvindn 03:23, 7 Apr 2004 (UTC)
sorry 'bout that :) ...sounds like a subpage User:Arvindn/Misspellings --Rj 08:14, Apr 7, 2004 (UTC)

Travel size

Ey yo, I have a suggestion of a small addition (and a large one); look at Queen (chess). Could we have a set of darker squares (or crossed squares or whatever) to mark areas of the board?

Ah yes, that would be useful. Making the squares is easy, just one light and one dark square with crosses need to be uploaded.

The large addition would be a set of the same pieces but in 50% scale. This will be inconvenient until we have a simplified syntax, though. — Sverdrup 10:20, 7 Apr 2004 (UTC)

Good idea! I can put an checkbox in my script that would generate code with "|20px". The server is down since yesterday, BTW. Anyone want to host the script? Arvindn 03:17, 8 Apr 2004 (UTC)
Done. Take a look. Arvindn 17:11, 8 Apr 2004 (UTC).
couldn't you use brower image resizing instead of having the server dynamically resize the images? I am almost positive cascading style sheets can resize images. -- WhiteDragon 05:24, 9 Apr 2004 (UTC)




I made an experiment to shrink the board, and it works: (however, it causes the server to work alot, having to create lots of thumbnails. — Sverdrup 10:26, 7 Apr 2004 (UTC)

Hmmm...why don't you just upload the thumbnails, with a different name, then it won't have to create thumbnails each time? Revolver 20:01, 7 Apr 2004 (UTC)
I think the thumbnails are cached and so won't be recomputed each time. Arvindn 03:17, 8 Apr 2004 (UTC)
The thumbnails definitely are cached, so no load problem with that. Nice job with these; the only objection I had was the large size, and it looks like that's been solved. - Hephaestos|§ 05:29, 9 Apr 2004 (UTC)