It is currently Sat Apr 27, 2024 11:54 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
Offline
 Post subject: SGF Lines & Arrows
Post #1 Posted: Mon Oct 04, 2010 9:50 pm 
Beginner
User avatar

Posts: 18
Liked others: 0
Was liked: 1
Rank: KGS 1k
KGS: danielfox
I've been writing an SGF parser and was somewhat surprised to see that the SGF format includes support for lines and arrows from one intersection to another. This sounds like a very useful feature but I don't recall if I've ever seen it used.

What SGF editors/viewers support this feature?

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #2 Posted: Mon Oct 04, 2010 9:54 pm 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Damn few. It's supported by the Sensei's diagram generator thing we use here, but I don't know of anything else. I've wanted to add support to EidoGo, but haven't ever gotten around to it.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #3 Posted: Tue Oct 05, 2010 2:54 am 
Beginner
User avatar

Posts: 18
Liked others: 0
Was liked: 1
Rank: KGS 1k
KGS: danielfox
It appears that the SGF viewer I have been using, MultiGo, doesn't even support compressed point lists.

It and CGoban3 also don't appear to handle soft linebreaks. It also seems odd that CGoban also does not supported the dimmed markup, as it is clearly capable of dimming points as it does so when using the score tool to mark a group dead.

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #4 Posted: Tue Oct 05, 2010 8:37 am 
Lives in gote

Posts: 355
Liked others: 52
Was liked: 43
Rank: AGA 2d
IGS: ethanb
danielfox wrote:
I've been writing an SGF parser and was somewhat surprised to see that the SGF format includes support for lines and arrows from one intersection to another. This sounds like a very useful feature but I don't recall if I've ever seen it used.

What SGF editors/viewers support this feature?


Quarry supports it, but the feature is not actually used for general markup, it is only for the game Amazons.

Should be pretty easy to make it work for the general case though (just remove an if statement in the sgf-parser) - we don't have an "arrow drawing tool" though. Should I add one?


EDIT: I'm sorry, I was looking at "AA" (add arrows) instead of "AR" (arrow markup) - Quarry understands what AR means, but doesn't actually do anything about it at the moment. :-? Sounds like another feature to add... soon as I finish UGF import (grumble...)

Although I've had a little time to work on it recently and I've got the header parsed now! Here's my latest debug output:

UGF Property: Title, Value: ,Michael Redmond's "Perfect Commentary" VOL.223,
Property: GN, Value: ,Michael Redmond's "Perfect Commentary" VOL.223,
UGF Property: Place, Value:
UGF Property: Date, Value: 2009/04/30,00:00:00,2009/04/30,00:00:00
Property: DT, Value: 2009/04/30,00:00:00,2009/04/30,00:00:00
UGF Property: Rule, Value: JPN
UGF Property: Size, Value: 19
quarry: sgf-tree.c:293: sgf_game_tree_set_game: Assertion `tree' failed.


Place should be translated to "PC" - I didn't notice that until copy/pasting just now for some reason. Size doesn't have debug output because it's breaking out to a separate function which sets up the board... which is failing and I haven't had a chance to really dig into it yet. (fixed partially while typing this - PC and RU are getting read now; if I can fix the tree pointer before work I'll be almost done... I hope)

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #5 Posted: Tue Oct 05, 2010 8:55 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
It seems like most SGF editors are kinda "stuck". They're sorta satisfied with the state of SGF and don't feel like adding some of the newer features, even though the format has been stable for many years. Like, nobody uses markers like GW, GB, BM, TE, IT, etc. I think they would be good for SGF problem collections. And I think lines and arrows would be awesome for reviewing games on KGS.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #6 Posted: Tue Oct 05, 2010 11:35 am 
Beginner
User avatar

Posts: 18
Liked others: 0
Was liked: 1
Rank: KGS 1k
KGS: danielfox
I agree that line support on KGS would be a great addition. Many times I have seen people in reviews attempt to draw lines staircase- style with the square markup tool. Real lines & arrows would be incredibly useful for explaining radiating influence, sector boundaries, illustrating moyo, etc.

I imagine there's a bit of a chicken & egg problem. Perhaps Go software authors don't feel a need to introduce such features since SGF files that use them are so rare. But there will never be any SGF files that use them if no editors support it!

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #7 Posted: Thu Oct 07, 2010 3:14 pm 
Beginner
User avatar

Posts: 18
Liked others: 0
Was liked: 1
Rank: KGS 1k
KGS: danielfox
I decided to implement lines & arrows in my project. I have them working, but there are some interesting considerations to make:

  • What color should lines & arrows be? Should they be different colors?
  • When an arrow is drawn to a cell containing a stone, should it touch the center or outside?
  • Should arrows be drawn ontop or underneath other markup?

I would value any input :)


Attachments:
File comment: Lines & Arrows example 1
arrows.jpg
arrows.jpg [ 52.5 KiB | Viewed 8388 times ]
Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #8 Posted: Thu Oct 07, 2010 3:19 pm 
Gosei
User avatar

Posts: 2060
Location: Texas
Liked others: 546
Was liked: 173
Rank: KGS 3k
GD Posts: 264
KGS: Chew
Personal preferences: Red arrows are easy to see with the board and stone colors.
Arrows on top makes sense and seems visible enough.
Drawing the arrow from center to center seems fine.

_________________
Someday I want to be strong enough to earn KGS[-].

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #9 Posted: Fri Oct 08, 2010 8:06 am 
Tengen

Posts: 4380
Location: North Carolina
Liked others: 499
Was liked: 733
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
Red is often bad for color-blind people (1/15 of men are substantially color-blind). It's not actually a disaster in the above diagram, but the blue has much better contrast.

_________________
Occupy Babel!

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #10 Posted: Fri Oct 08, 2010 8:11 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
In the few situations where I've actually seen the lines and arrows supported, they've been blue (e.g. try the line and arrow code in the diagrams for the fourm). IIRC, we actually have at least one color-blind forum member who might be able to help you with color selection...

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #11 Posted: Fri Oct 08, 2010 8:53 am 
Tengen

Posts: 4380
Location: North Carolina
Liked others: 499
Was liked: 733
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
No experience with it, but there's a web based color blindness image filter. If you google color blind filter, you'll get one that operates on webpages.

_________________
Occupy Babel!

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #12 Posted: Fri Oct 08, 2010 9:04 am 
Lives in sente
User avatar

Posts: 914
Liked others: 391
Was liked: 162
Rank: German 2 dan
Your black stones appear as if they were smaller than the white ones.

The arrows should approach the centre of the target intersection, but not cross it.

I think that the arrows and lines should go over the stone markup, but be thin enough not to cover them completely.

_________________
A good system naturally covers all corner cases without further effort.

Top
 Profile  
 
Offline
 Post subject: Re: SGF Lines & Arrows
Post #13 Posted: Fri Oct 08, 2010 10:27 am 
Beginner
User avatar

Posts: 18
Liked others: 0
Was liked: 1
Rank: KGS 1k
KGS: danielfox
Thank you all for your input. The color-blind filter was very interesting. I added an outer stroke to the arrow rendering so that they stand out a bit better.

Harleqin wrote:
Your black stones appear as if they were smaller than the white ones.

This is a known optical illusion - see mention of it here http://www.kiseido.com/go_equipment.htm I will probably render the white stones slightly smaller to compensate. I'm not entirely happy with the gradient I am using for the black stones either, which probably only worsens the effect as it lightens the edge of the stone as a 'shiny' effect. It looks nice when the stones are large but adds aliasing problems when the stones are this small. Perhaps I will use different gradients at different stone sizes.

Harleqin wrote:
The arrows should approach the centre of the target intersection, but not cross it.

Should be fixed now.

The actual width of the arrows & lines I am not sure of.

If there is no compelling reason to color lines & arrows differently, I think I will draw them both in the same style.


Attachments:
earred.gif
earred.gif [ 118.08 KiB | Viewed 8343 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group