OGS mobile: Dev diary

People keep asking me how the mobile client is going, so I figured I’d set up a quick diary in here and then I can just point them to my pre-canned thoughts instead of having to make polite conversation.

  • Marmalade SDK and C++ looks like a winning combo, though I still need to test rendering on different devices to see what kind of anti-aliasing I get for free, and what I need to do through raw Open-GL.
  • Unicode turns out to be a real pain in the ascii. For the first version, anyone with non ascii usernames is going to appear really weird. Because bitmapped fonts.
  • I started the C++ version of the go library today, and I’m mostly complete 13 hours later. I still need to implement ko, and I want to get a code review by a real C++ programmer, but then I’ll be good to port it over to Marmalade. That’ll break a bunch of stuff and I’ll have to manually port some smart ptr type things, but whatever.
  • The Catch unit testing library is fricking AMAZING.
  • I’m thinking I might do an alpha version that just lets you input a game number and lets you play as both black and white, set up move trees etc. just to make sure the performance is okay and there are no weird rendering problems. If that’s something that interests you, drop a reply in this thread.
  • Assuming that works out, there’s nothing stopping me from marching ahead and getting a basic correspondence-only mobile app together in a relatively short space of time.

Some of the app will be open-sourced, but I’m currently thinking of charging $/£1 for the app to cover the costs of the licenses I need to publish into various app stores. Once the app breaks even, I’ll punt the rest of the money toward the OGS server costs.

I’m planning to reuse the go lib and rendering routines to write a joseki tutor and guess-the-move app. That might be bundled into the main client, or it might be something separate, we’ll see how it goes.

12 Likes

PS if I time out in a game with you, I’m sorry, but I’m having far too much fun with code to think about go right now :stuck_out_tongue:

2 Likes

So the go board stuff is done, I had a zen bug where stones became their own liberties, but that’s all fixed up and the unit tests are green.

There’s probably a whole bunch of corner cases that will cause my naive code to explode in confusion and fury, but it’s good enough for now.

The next thing to look at is the board rendering. I’ve given up on the sprite approach because it makes for yucky graphics when rendering small images, so I’m going to go raw OpenGL. That’s clearly overkill and a poor engineering decision, but this is a toy project, so I don’t have to make sensible decisions.

Next milestone is rendering a beautiful go stone at various pixel sizes. Thankfully, @anoek has some pointers on Life in 19 x 19, so I’m not starting from scratch.

2 Likes

Turns out OpenGL is a lot of fun, but a very strange processing model. I’ve never done any graphics programming before, so it’s an interesting challenge. The Marmalade SDK has a module called IwGL which wraps over OpenGL ES 1.0 - 3.0 and provides software renderers for anything that doesn’t run GL ES, so that’s kinda handy.

I’m currently thinking I’ll target OpenGL ES 2.0 which should cover anything reasonably modern. I’ll try to provide down-level support for OpenGL ES 1.1 later, since supporting iPad 1 is an explicit goal of the project, but that also means doing websockets from scratch, which I don’t want to contemplate right now.

I’m planning to eschew polygons altogether and use impostors based on the geometry described here

With a little texturing, I think I can get something that will render quickly, look great at any resolution, and still allow me to zoom in on a single corner, or render tiny boards for the game list.

Wanna see a go stone? Of course you do! Here you go. There’s er… a few aesthetic issues to resolve, admittedly, but in the next post I should have something that looks a bit less… laughable.

4 Likes

Hey, at least it doesn’t need antialiasing :smiley:

3 Likes

Hey, you’re halfway done making a good Pong clone. :stuck_out_tongue:

5 Likes

Hi Bob,

If you make the code available I’ll be happy to look into just how cross platform Marmalade is :wink:
I’ll also throw in the publishing (cost) of publishing on the Apple AppStore and take the same conditions as you do (meaning I’ll put back the “profits” towards the OGS server costs).

Let me know if you have anything where you would like feedback on!

Bart-Jan.

4 Likes