Check out Atomic Chess, our featured variant for November, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

EarliestEarlier Reverse Order Later
Horizons. Game with 5 new pieces on 12x12 board. (12x12, Cells: 144) [All Comments] [Add Comment or Rating]
Diceroller is Fire wrote on Sun, Jan 28 07:07 PM UTC in reply to H. G. Muller from 07:04 PM:

Can you help please? Write what graphics’ switch code should look like, how to make it…

I watch from iPhone)


🕸Fergus Duniho wrote on Sun, Jan 28 07:17 PM UTC in reply to Bob Greenwade from 05:34 PM:

I think Lev's talking about giving the user the choice of which set to see: push a button for Alfaerie, another for Galactic, another for Greenwade, another for Grigoriev, etc., as is done on many Interactive Diagrams

I have done this in two different ways. For Ultima, I have had the button change multiple values with code like this:

<input type="button" value="Abstract" onclick="graphDir='/play/pbm/showpiece.php?black=dd4433&image=/graphics.dir/abstract/new/';whitePrefix='W';blackPrefix='B';light='#CCCC11';dark='#339933';sqrSize='50';imag[1]='UltimaPawn.gif';imag[2]='Withdrawer.gif';imag[3]='Longleaper.gif';imag[4]='Coordinator.gif';imag[5]='Chameleon.gif';imag[6]='Immobilizer.gif';imag[7]='King.gif';Display();">
<input type="button" value="Alfaerie Animals" onclick="graphDir='https://www.chessvariants.com/graphics.dir/alfaeriePNG/';whitePrefix='w';blackPrefix='b';light='#DDDDD0';dark='#559933';sqrSize='50';imag[1]='pincerpawn.png';imag[2]='ox.png';imag[3]='kangaroo.png';imag[4]='windmill.png';imag[5]='lizard.png';imag[6]='spider.png';imag[7]='king.png';Display();">
<input type="button" value="Alfaerie Queens" onclick="graphDir='https://www.chessvariants.org/graphics.dir/alfaeriePNG/';whitePrefix='w';blackPrefix='b';light='#DDDDD0';dark='#559933';sqrSize='50';imag[1]='templar.png';imag[2]='withdrawer.png';imag[3]='longleaper.png';imag[4]='coordinator2.png';imag[5]='chameleon.png';imag[6]='immobilizer.png';imag[7]='king.png';Display();">
<input type="button" value="Alfaerie Chess" onclick="graphDir='/graphics.dir/alfaeriePNG/';whitePrefix='w';blackPrefix='b';light='#DDDDD0';dark='#559933';sqrSize='50';imag[1]='pawn.png';imag[2]='queen.png';imag[3]='knight.png';imag[4]='rook.png';imag[5]='bishop.png';imag[6]='rookinv.png';imag[7]='king.png';Display();">
<input type="button" value="Ultima-Alt" onclick="graphDir='/graphics.dir/ultima-alt/';whitePrefix='w';blackPrefix='b';light='#EEEECC';dark='#226822';sqrSize='50';imag[1]='pawn.gif';imag[2]='withdrawer.gif';imag[3]='longleaper.gif';imag[4]='coordinator.gif';imag[5]='chameleon.gif';imag[6]='immobilizer.gif';imag[7]='king.gif';Display();">

Since three of these sets used pieces from the same directory, I wrote it differently each time to force a complete change of values, as it will not update some values unless graphDir changes its value.

With Fischer Random Chess, I have used /play/pbm/showpiece.php with different Game Courier sets, using this code:

<input type="button" value="Abstract" onclick="graphDir='/play/pbm/showpiece.php?size=50%26set=abstract%26piece=';light='#CCCC11';dark='#339933';Display();">
<input type="button" value="Alfaerie" onclick="graphDir='/play/pbm/showpiece.php?set=alfaerie%26piece=';light='#DDDDD0';dark='#559933';Display();">
<input type="button" value="Magnetic" onclick="graphDir='/play/pbm/showpiece.php?size=50%26set=magnetic%26piece=';light='#EEEECC';dark='#226822';Display();">
<input type="button" value="Motif" onclick="graphDir='/play/pbm/showpiece.php?size=50%26set=motif%26piece=';light='#CCCC11';dark='#339933';Display();">

I specified the size for sets whose images come in varying sizes matching the actual image. With this information, it will pad smaller images to match the desired size, which makes them work better as background images.


Diceroller is Fire wrote on Sun, Jan 28 07:46 PM UTC in reply to Fergus Duniho from 07:17 PM:

I prefer the first version. Where to input this code?

I want to enable three sets: Galactic, Greenwade and Joyful.


H. G. Muller wrote on Sun, Jan 28 08:21 PM UTC in reply to Diceroller is Fire from 07:46 PM:

In the HTML of your page at the point where you want the buttons to appear.


🕸Fergus Duniho wrote on Sun, Jan 28 08:23 PM UTC in reply to Diceroller is Fire from 07:46 PM:

Where to input this code?

In the Setup section.


Diceroller is Fire wrote on Sun, Jan 28 08:34 PM UTC in reply to Fergus Duniho from 08:23 PM:

And no code change in the diagram itself?

UPD:Greenwade for Horizons


🕸Fergus Duniho wrote on Sun, Jan 28 09:27 PM UTC in reply to Diceroller is Fire from 08:34 PM:

And no code change in the diagram itself?

You will have to make sure that the code in the diagram matches one of the sets you use. But if you keep the initial set the same, I think you should only have to add new variable assignments to the buttons themselves. Since I don't care for the Galactic set, though, I would recommend making another set the initial set.


Diceroller is Fire wrote on Sat, Feb 3 12:23 PM UTC:

Cmonbruh I longly think about doing GC preset for this. Is it doable?


H. G. Muller wrote on Sat, Feb 3 01:50 PM UTC in reply to Diceroller is Fire from 12:23 PM:

GC presets are always 'doable'. Even if you want those to be rule checking, since GAME code is a Turing-complete programming language. So you should be able to program enforcement of any set of rules in it.


Diceroller is Fire wrote on Sat, Feb 3 01:55 PM UTC in reply to H. G. Muller from 01:50 PM:

Oh, good day. AFAIK you’ve made a diagram for this game, so can you recall what to do with Warrior demotion? With pawn-likes promotion?

UPD: please)


Diceroller is Fire wrote on Sat, Feb 3 07:23 PM UTC:
  • How to embed Greenwade graphics in diagram?

  • Secondly, we have just two pages on Russian language. Can you let me rewrite several pages (incl. this one) for this language and publish them more quickly please?


Diceroller is Fire wrote on Sat, Feb 3 08:06 PM UTC in reply to H. G. Muller from Thu Nov 17 2022 09:57 PM:

How to embed these small graphics like here?

Also, Bob, how to make colorful black images (8000ff), and split pawn & shield as here?


H. G. Muller wrote on Sat, Feb 3 08:19 PM UTC in reply to Diceroller is Fire from 08:06 PM:

It appears I uploaded these to /membergraphics/MSspiral-chess/ before I was an editor. So use that as graphicsDir. They are not really small, though (50x50).


H. G. Muller wrote on Sat, Feb 3 08:49 PM UTC in reply to Diceroller is Fire from 07:23 PM:

If we want to be multi-lingual I don't think it would be good to have the same article appear multiple times in different languages in the index. I would prefer to just have one article, where you could click on a button (displaying a flag?) to change the language. Similar to how one changes piece themes in the Diagram.


Diceroller is Fire wrote on Sat, Feb 3 08:55 PM UTC in reply to H. G. Muller from 08:49 PM:

OK with that, but following all is fine!


🕸Fergus Duniho wrote on Sat, Feb 3 08:59 PM UTC in reply to H. G. Muller from 08:49 PM:

If we want to be multi-lingual I don't think it would be good to have the same article appear multiple times in different languages in the index.

This site has been multi-lingual from the beginning, thanks to Hans writing many pages in both Dutch and English. We have normally handled pages in different languages as separate pages, and the Item table includes a language column which allows us to narrow a search down to one language. This is why English-speakers normally see a bunch of English-language pages instead of ones in foreign languages. If we put multiple languages on one page, this wouldn't work, and it would make pages take up more bandwidth. So, we should stick to how we've been handling pages in other languages by making them separate pages.


H. G. Muller wrote on Sat, Feb 3 09:03 PM UTC in reply to Fergus Duniho from 08:59 PM:

We could still have the various languages be different pages, to save on bandwidth. It is just a matter of how we link to them. All directly from the index, or from each other.


Diceroller is Fire wrote on Sat, Feb 3 09:10 PM UTC in reply to Fergus Duniho from 08:59 PM:

So, we should stick to how we've been handling pages in other languages by making them separate pages.

Yes I mean different pages. No problem)

But how to handle colors of pieces in IDs (here 8000FF for black Greenwade)?


Bob Greenwade wrote on Sat, Feb 3 09:12 PM UTC in reply to Diceroller is Fire from 07:23 PM:

How to embed Greenwade graphics in diagram?

Personally, I use H.G.'s fen2 tool, by including these lines in the ID code:

graphicsDir=/cgi-bin/fen2.php?s=50&t=Greenwade&w=F9F9F9&b=666666&p=
squareSize=50
graphicsType=

Replace the w= and b= numbers with the hex codes for the numbers you want. If you want icons smaller than 50 pixels, change both s= and the squareSize variable to the same number.

Compound pieces can be made by putting the names of both icons, the one in front first, with two hyphens in between, such as pawn--shield. H.G. has a more complete explanation (and a couple of other tricks) on his page for the Diagram Editor with Scalable Graphics (scroll down to Orientation and compound pieces).

You can find a listing of nearly all of the availble icons at this link. (A couple, such as Mountains, I forgot to make slots for.) You can figure out the names from the captions by ignoring anything in parentheses, removing all spaces and punctuation, and typing everything in lower case.


Diceroller is Fire wrote on Sat, Feb 3 09:19 PM UTC in reply to Bob Greenwade from 09:12 PM:

Personally, I use H.G.'s fen2 tool, by including these lines in the ID code:

graphicsDir=/cgi-bin/fen2.php?s=50&t=Greenwade&w=F9F9F9&b=666666&p=
squareSize=50
graphicsType=

Replace the w= and b= numbers with the hex codes for the numbers you want. If you want icons smaller than 50 pixels, change both s= and the squareSize variable to the same number.

I use buttons which have:

input type="button" value="Greenwade" onclick="graphDir='/graphics.dir/svg/Greenwade/';whitePrefix='w';blackPrefix='b';light='#DDDDDD';dark='#339933';sqrSize='50';imag[1]='pawn.svg';imag[2]='berolinaplus.svg';imag[3]='shield.svg';imag[4]='berolina.svg';imag[5]='knight.svg';imag[6]='bishop.svg';imag[7]='rook.svg';imag[8]='ox.svg';imag[9]='lightning.svg';imag[10]='wizard.svg';imag[11]='queen.svg';imag[12]='king.svg';Display();"

and cannot handle that.

OK, see you all tomorrow.


Bob Greenwade wrote on Sat, Feb 3 10:32 PM UTC in reply to Diceroller is Fire from 09:19 PM:

There's probably a conflict with the graphicsType variable; using fen2 requires that it be left undefined, and using the icons directly requires it be set to SVG, while the Galactic set you're currently using is GIF and needs it to be set to that. I don't know what file format Joyful is, but whatever the case they need to all be the same.

In this case, I'd recommend using https://www.chessvariants.com/cgi-bin/fen2.php?s=50&t=Greenwade&w=DDDDDD&b=339933&p= to make your icons one by one, saving the PNG files that result. Then you can convert them all to GIF using anyconv.com or whatever else you prefer, and upload the results to the game's files area.


Diceroller is Fire wrote on Sun, Feb 4 06:13 AM UTC in reply to Bob Greenwade from Sat Feb 3 10:32 PM:

I don't know what file format Joyful is, but whatever the case they need to all be the same.

No, it’s PNG, while Galactic is GIF and this all works fine.

> https://www.chessvariants.com/cgi-bin/fen2.php?s=50&t=Greenwade&w=DDDDDD&b=339933&p=

But how to make images other than white King? Ah I understood, and I can just copy these from Fen2.php page from pieces’ table.


H. G. Muller wrote on Sun, Feb 4 07:02 AM UTC in reply to Diceroller is Fire from 06:13 AM:

The idea is that you use this long URL as graphicsDir, so that the Diagram will automatically append the piece names to it (which then follow the p= with which the URL ends. And you have to set graphicsType to an empty string, to prevent something will be appended behind the piece name.


🔔Notification on Sun, Jun 16 08:19 PM UTC:

The author, Lev Grigoriev, has updated this page.


24 comments displayed

EarliestEarlier Reverse Order Later

Permalink to the exact comments currently displayed.