The iPad: Magical and Inspirational

2010-03-11 by Anders Kierulf

I’ve been working on user interfaces for the game of Go for 25 years. It was part of my Ph.D. thesis. It’s been my bread and butter for the last 10 years. And now, without ever touching an iPad, that device has changed my view of how to present a Go game to the user. Within six weeks of working on the iPad version of SmartGo, I’ve come up with two significant new concepts.

I could have come up with these ideas before. But it’s a fact that I didn’t, not until the iPad came along. The possibilities and constraints of the iPad — a blank canvas focused on content — inspired these new approaches. And I expect more surprises and inspiration after actually holding an iPad in my hands.

The iPad is meant to be touched. And it has revolutionized my concepts without me ever touching it. That’s powerful magic.

To me, it’s like Apple designed the iPad with Go and SmartGo in mind. If the iPad gets other developers to feel the same way, Apple has already won.

Localization in SmartGo

2009-10-21 by Anders Kierulf

Wil Shipley wrote an interesting post about localization in Delicious Monster. As this is an area where SmartGo is ahead of the curve, let me share how I do it in SmartGo.

How it looks

SmartGo is localized into a number of languages on Windows, on the iPhone, and on the web. (And yes, the Mac version is making progress.) Please take a look:

Windows: Download, install, and run the free version of SmartGo at http://www.smartgo.com/SGSetup.exe. In the Help menu, switch to German or Japanese, for example, and note that the whole UI switches on the fly. Choose Replay > Find, or File > Export Diagrams, for example, and note that the layout of the dialog adapts to the strings of the language.

iPhone: No free version, but SmartGo 9×9 is just $0.99. Tap the tools icon in the top left, then Language, and again you’ll see the UI switch on the fly. Note also how the language is listed in both local and translated versions, so that you can find your way back to English if your Chinese is a bit rusty (or non-existent, like mine).

Website: Go to http://www.smartgo.com/en/index.htm, then click on one of the languages in the top right. Note how both page content and navigation links switch appropriately. When a translation is missing, you’ll see English instead.

How it works

Code instead of resources: Instead of using resources, SmartGo builds the UI elements (menus, dialogs) on the fly as much as possible. SmartGo loads the translations from an XML file (C:\Program Files\SmartGo2\language.tmx if you installed the Windows version). In the code, instead of “New Player” you’ll find something like SgText::Str(STR_NEW_PLAYER) that retrieves the appropriate string in the current language (and returns the English string if that string has not been translated).

Automatic dialog layout: The position of dialog items is computed on the fly by specifying the layout structure in the code. For example, here’s the C++ code for the Edit > Node Name dialog:

void NodeNameDialog::LayoutDialog()
{
   TopBox dialog(*this, IDD, /*fVertical*/true);
      RowsBox content(dialog);
         StaticBox n1(content, IDC_NN_NODE_NAME_S);
         EditBox n2(content, IDC_NN_NODE_NAME, 142);
      AlignRowsBox buttons(dialog);
         ButtonBox ok(buttons, IDOK);
         ButtonBox cancel(buttons, IDCANCEL);
   dialog.ComputeLayoutAndResize();
}

Writing and fine-tuning the dialog layout engine is more effort up front, but it avoids endless pixel twiddling, and automatically adjusts for long strings without adding ugly extra space in English.

Website: All the pages on smartgo.com are generated by a program. This allows the navigation links and language switches to work even though I’m just using static HTML files. Creating new pages is a bit of a pain (I’m basically writing a program that creates that web page, pulling strings from the language.tmx file), but it works, and keeps everything in sync. Definitely a hack, but I have not found any good tools for maintaining a web site with more than 50 pages in 7 languages.

Managing translations

The other part of the equation is managing the translations. I speak German and some French, but Japanese or Chinese are Greek to me. The initial translation is not much of a problem, but updates (both added strings and corrections) are an issue. Again, not finding any good tools to help with this, I built the translation support directly into the Windows version of SmartGo. Choose Tools > Special > Translate and select language.tmx. You can edit the translations, but more importantly, you can merge translations and accept or reject changes.

Conclusions

There is cost and pain associated with localizing. For $0.99 games it may not be worth it. But for a quality program that you refine over years, localized versions can definitely add to your business. And when Apple launches the iPhone in China, you’re prepared.

Any questions? Send me email or ask @smartgo on Twitter.

Twitter for Go Players

2009-09-21 by Anders Kierulf

Twitter can be a great way to get news about topics you’re interested in. But it only works if you find the right people to follow. If you’re a Go player, start by following @smartgo, then pick some of the following (in no particular order):

@gobum @imabuddha @FunkeeMonk @ludwig1024 @alfmikula @kyubic @DavidPlumpton @hanekomu @nexik @361points @Oolong4Go @RoboJenny

Go associations on Twitter: @theaga @britgo

If you know Japanese: @igonews

Go-related tweets are often marked with a hashtag you can search for. I use #weiqi, others use #igo or #baduk.

You can find people to follow for any topic that interests you. I like to keep up with President Obama through @markknoller. @daringfireball delivers insights into iPhone and Mac issues. @badbanana provides my style of humor. The science fiction writer William Gibson writes as @GreatDismal.

Enjoy. Follow people and check out what they say. If they tweet too often, or don’t suit you, simply unfollow. And at some point you might want to tweet yourself.

Go Problems in SmartGo Pro

2009-09-19 by Anders Kierulf

Hanekomu had a number of questions about Go problems in SmartGo Pro.

I have entered many many problems already for GoGrinder; is it possible to transfer them to SmartGo Pro on the iPod touch?

Sorry, not yet. Games can be imported, but not problems, so far.

Is there an option to shuffle the problem order, to randomly rotate and to randomly swap colors?

Yes. See http://www.smartgo.com/en/touchproblems.htm.

Does it automatically advance to the next problem?

You need to tap the Next Problem button to advance to the next problem.

Can you manually select the previous/next problem and go to the beginning and end of the current set?

Yes.

Can you manually explore variations? GoGrinder has a nice “Navigate solution” feature that shows “right” next moves as green dots and “wrong” next moves as red dots.

No. This is probably the most requested feature with regards to problems. The UI is tricky, but I’ll definitely add that at some point.

Does it support both triangled moves as well as WV[] to indicate “wrong” variations?

Not sure, would have to investigate. As you can’t import problems at the moment, it’s a moot point. It’s using pretty much the same code as SmartGo on Windows.

If there are several moves for the opponent, does it choose an answer randomly? If so, does after finishing one line, does it go through other possibly opponent answers as well?

Yes, it chooses randomly, and no, it doesn’t go through the other possible opponent answers.

Can you group problems hierarchically and select a subdirectory of problems that you want to solve?

Not quite. But you can filter by different criteria, such as difficulty or type of problem.

Does it keep a timer and a counter for the number of problems you got right and wrong?

No timer. It keeps track of the number of problems tried and solved.

Hope that helps, let me know if you have other questions.

SmartGo 2.8.3.5 (Public Beta)

2009-09-01 by Anders Kierulf

A public beta of SmartGo for Windows is available for download:

http://www.smartgo.com/SGSetup2835.exe

It contains some bug fixes as well as an updated game collection with 47,674 professional games. Please let us know if you run into any issues.

The success of the iPhone version has kept us busy for the last year. And there is more to be done. Some of the improvements of the iPhone version will make their way back to the desktop, but it will take a while. We appreciate your patience.

The SmartGo Blog

2009-08-29 by Anders Kierulf

Why a blog? Because often 140 characters on Twitter are not enough. I’ll use this blog to give more detail, to answer SmartGo questions that are of interest to a wider audience, and to provide tips and tricks for SmartGo.

Welcome.