Welcome, Guest. Please Login or Register.
Apr 4th, 2025, 2:33pm

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Board position image generator (Updated) »


   Arimaa Forum
   Arimaa
   General Discussion
(Moderator: supersamu)
   Board position image generator (Updated)
« Previous topic | Next topic »
Pages: 1 2  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Board position image generator (Updated)  (Read 2430 times)
leo
Forum Guru
*****





   


Gender: male
Posts: 278
Board position image generator (Updated)
« on: Jan 7th, 2008, 4:19pm »
Quote Quote Modify Modify

EDIT: check the new page instead: http://lestrucsaleo.net/arimaa/boardtools.php
 
I'm experimenting a system to generate board position images on the fly through a script.
 
You can have a look at it there: http://lestrucsaleo.net/arimaa/boardgendoc.php
 
Check the test page.
 
Would it be interesting to integrate it into the forum to illustrate games?
 
Example of what it can produce:
 
EDIT: removed examples as the system changed
« Last Edit: Jan 10th, 2008, 1:08pm by leo » IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: Board position image generator
« Reply #1 on: Jan 7th, 2008, 6:10pm »
Quote Quote Modify Modify

Nice.
IP Logged
camelback
Forum Guru
*****



Arimaa perl monger

   


Gender: male
Posts: 144
Re: Board position image generator
« Reply #2 on: Jan 7th, 2008, 6:59pm »
Quote Quote Modify Modify

Shocked So cool, good job.
 
Is it possible to have the generally used notations like the one below for generating images?
 
 Ee8 Rf8 Rd7 Mg7 De5 Rb4 Dc4 Rd4 Ra3 Cc2 Re2 Rh2
 rg8 rh8 ee7 re6 rh6 rb5 rd5 ra4 db3 db2
 
This notation is used in plangame and puzzle generation links in Arimaa.
IP Logged
chessandgo
Forum Guru
*****



Arimaa player #1889

   


Gender: male
Posts: 1244
Re: Board position image generator
« Reply #3 on: Jan 8th, 2008, 2:41am »
Quote Quote Modify Modify

Extremely nice, Leo, it would be extremely enjoyable to have the position images included in problem threads and some others !
IP Logged

leo
Forum Guru
*****





   


Gender: male
Posts: 278
Re: Board position image generator
« Reply #4 on: Jan 8th, 2008, 8:36am »
Quote Quote Modify Modify

@camelback: It would be no problem to add support for the standard notation.
 
But I now realize that direct links to the applet with position included is way more useful than an image.
 
And it would be even more useful to have a forum plugin that inserted a mini-applet into a post...
 
Or alternatively a template as there are in the Wikipedia pages, but I'm not sure the forum would support complex tables with board image background and piece images overlayed on the table grid.
 
Anyway thanks for the feedback everybody.
IP Logged
Fritzlein
Forum Guru
*****



Arimaa player #706

   
Email

Gender: male
Posts: 5928
Re: Board position image generator
« Reply #5 on: Jan 8th, 2008, 6:20pm »
Quote Quote Modify Modify

Very nice, Leo!  Part of the reason I was inspired to write strategy articles on Wikibooks was that I could include text diagrams that automatically transformed into board images.  For editing the board positions on Wikibooks, it was very convenient that the board was human readable, i.e.
 

{{arimaa diagram|=
|tright
|
|=
8 |  |  |  |  |  |  |  |rs|=
7 |rs|rg|cs|  |  |ds|rs|  |=
6 |dg|ds|  |hg|  |  |  |  |=
5 |  |  |  |es|  |  |  |  |=
4 |  |  |rs|  |  |rs|  |  |=
3 |  |dg|rs|eg|rg|  |rg|  |=
2 |  |  |hs|rs|  |hs|  |  |=
1 |  |  |cg|cg|rg|rg|rg|rg|=
|
}}

 
If I wanted to move the silver rabbit one step north it was obvious how to edit it.  But I understand why you like the compact notation and camelback likes the official notation.  Different strokes for different folks, I guess.   Smiley  In any case, diagrams from text are a huge help in writing about Arimaa.
IP Logged

leo
Forum Guru
*****





   


Gender: male
Posts: 278
Re: Board position image generator
« Reply #6 on: Jan 8th, 2008, 6:34pm »
Quote Quote Modify Modify

Yes, the Arimaa diagram template on Wikipedia is extremely convenient. Smiley I recently imported it into the French Wikipedia. We could improve it by using the finer looking PNG images for the pieces instead of the GIFs currently stored on the Commons, what do you think? We could also add the X and O symbols for the cross and dot as in the Chess diagram template.
 
The reason for the script to take the position in a single line is a constraint of CGI calls but I know it is poorly readable. The ideal solution would be to plug an add-on into this forum to parse a layout similar to the one on Wikipedia. I don't know how hard it is to do that for YaBB. It would save much bandwidth compared to producing a new image for each new board position.
IP Logged
camelback
Forum Guru
*****



Arimaa perl monger

   


Gender: male
Posts: 144
Re: Board position image generator
« Reply #7 on: Jan 8th, 2008, 8:31pm »
Quote Quote Modify Modify

on Jan 8th, 2008, 6:34pm, leo wrote:
Yes, the Arimaa diagram template on Wikipedia is extremely convenient. Smiley I recently imported it into the French Wikipedia. We could improve it by using the finer looking PNG images for the pieces instead of the GIFs currently stored on the Commons, what do you think?

 
I think Arimaa diagram template in wikibooks needs improvement. When I printed out the wikibook last year, the pieces and board were totally off base and not useful when reading in paper.
 
The problem is images of the individual pieces are getting super imposed on the board image in wikibook. If the diagram is generated as a single final image as in leo's website then it would look good on paper, I think.
 
IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Board position image generator
« Reply #8 on: Jan 9th, 2008, 12:26am »
Quote Quote Modify Modify

Just as a note, the reason for the gif images in the Arimaa wikipedia template was because some browsers couldn't handle the pngs I tried initially. I'm pretty sure at the time IE was the big one that had a problem, maybe it's finally improved since then? Maybe the png versions are still hanging around on the commons and someone could give them another try.
 
I would say the template not printing correctly is a browser bug. Wink Although a single server side image would be nicer and certainly not subject to all these different browser problems. Unfortunately I'm pretty sure there's no way within the current wikipedia framework to have the server generate images, but then the current template is also "impossible" per several large wikipedia contributors. Smiley Shh, don't tell 'em I worked around the template restrictions they might decide to make their previous statement true. Tongue
 
Janzert
IP Logged
leo
Forum Guru
*****





   


Gender: male
Posts: 278
Re: Board position image generator
« Reply #9 on: Jan 9th, 2008, 2:36am »
Quote Quote Modify Modify

Argh, the many varied joys of web document technology... I just tried to convert the printable version of the Wikibook to PDF in order to see how the diagram table behaved, but OpenOffice got stuck as a rabbit too close to the enemy elephant. Often I wonder why the Web, instead of expanding a smart solid technology such as TeX, decided to reinvent the wheel all the long way through html, xml, php, svg, etc only to end up with a giant square wheel.
 
Janzert, I'm curious why the Arimaa template was considered impossible. I think it's safer to stay with the gifs for now, I hadn't realized there were problems with the pngs.
IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Board position image generator
« Reply #10 on: Jan 9th, 2008, 5:55am »
Quote Quote Modify Modify

on Jan 9th, 2008, 2:36am, leo wrote:
Janzert, I'm curious why the Arimaa template was considered impossible. I think it's safer to stay with the gifs for now, I hadn't realized there were problems with the pngs.

 
It's been a while so I may be misremembering, but I'm pretty sure it was that you weren't supposed to be able to have one image overlay another. IIRC, I worked around that by using negative margins. That is probably also what ends up throwing the printing and pdf generation off.
 
Janzert
IP Logged
leo
Forum Guru
*****





   


Gender: male
Posts: 278
Re: Board position image generator
« Reply #11 on: Jan 10th, 2008, 12:57pm »
Quote Quote Modify Modify

But I seem to recall that negative margins are valid in most CSS elements. They are even necessary in some cases to approximate book quality layout. But the browsers see only what they want from CSS...
 
I have abandonned direct image production for the moment but I wrapped it into a utility page that also converts between various position notations. I also added an option to orient the board. You can check it here:
 
http://lestrucsaleo.net/arimaa/boardtools.php
 
Let me know if you find bugs, there must be some.
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Board position image generator (Updated)
« Reply #12 on: Jan 12th, 2008, 5:26pm »
Quote Quote Modify Modify

When I was working on the new game client I had started to include a "compose" mode, but had not quite finished it. But it does work for the most part and can be useful for creating puzzles. To try it out go to:
 
http://arimaa.com/arimaa/puzzles/compose.html
 
Click on the first move in the move list and then click the 'U' button to undo all the moves.
 
Now you can click on a square to place the piece shown in the center of the board. Clicking on the piece in the center skips to the next piece. Clicking on a piece you have already placed removes it (but doesn't work right for silver pieces). When you have placed the pieces click on the '--' button. From here you can move the Gold pieces. But if it should be Silvers turn you can click on '--' again. To get the move notation for the move list click on the 'L' button.
IP Logged
Fritzlein
Forum Guru
*****



Arimaa player #706

   
Email

Gender: male
Posts: 5928
Re: Board position image generator (Updated)
« Reply #13 on: Jan 13th, 2008, 12:26pm »
Quote Quote Modify Modify

Very nice interface and functionality, leo.   Thank you.  I may use this off-line even if it doesn't get integrated into the local wiki.
IP Logged

omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Board position image generator (Updated)
« Reply #14 on: Jan 18th, 2008, 9:11am »
Quote Quote Modify Modify

I've linked the position conversion tool on the 'Games' page.  
 
http://arimaa.com/arimaa/games/
 
so we can find it easily.
IP Logged
Pages: 1 2  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.