Friday 3 April 2015

April 2015 update

Fast forward to 2015.
  • bgLog continues to be developed.
  • Many new features and performance improvements have been added.
  • bgLog now has an API (Application Programming Interface) after the core functionality was split from the rest of the code.
  • The release of FlashBack by Jeremy Bagai was a major milestone, with bgLog providing the graphics engine. I worked with Jeremy for 18 months on FlashBack's development resulting in many improvements to bgLog. We are now working on the next major upgrade for that project.
  • bgLog diagrams are beginning to appear in print as well as around the web.
Current and upcoming bgLog projects:

SVG
The technology that underpins bgLog is the HTML 5 Canvas, which is a 2D drawing API which bgLog uses to draw the diagrams you see. It is all done programatically, ie there are no pre-drawn images that are then jammed together to make up a static image of a fixed size. Each element of the board is drawn to an object called a canvas, which the browser then renders to the viewport. This approach has many advantages - the diagrams can be resized and the user can be given considerable control over many features. Which puts the onus of design back on the user instead of the developer (who is no designer!).

But there's a but. The FlashBack experience showed up many problems with canvas, due to the different browser implementations on mobile devices. Some versions of Android do really awful things to graphics that require weird and wonderful "fixes" to get around them. On top of this, performance is extremely volatile depending on factors well outside of bgLog's control. Rendering of simple effects like shadows pretty much destroys performance on most mobile devices.

There is an alternative to HTML Canvas. SVG (Scalable Vector Graphics) is much better supported in browsers these days. This approach also uses a canvas to draw images on, but those images are generated using vectors rather than pixels. Which is what gives us the all-important Scalable part of SVG. With HTML Canvas, the image has to be redrawn from scratch any time the browser window changes size. While this isn't a huge issue in itself, it becomes one when you start thinking about mobile devices and different screen orientations, zoom factors etc etc.

SVG allows us to (mostly) ignore these issues while still giving complete control over the elements that we create. The upshot is a more flexible system. But most importantly, it is much faster to load and update because we no longer have to redraw all the individual elements each time they change in size or appearance.

The SVG development should be ready around the middle of 2015.

BBC - Backgammon Broadcasting Corporation
A couple of years ago, before I was diverted into mobile development by Jeremy, I was in discussions with a backgammon federation to provide a broadcast feature in bgLog. I have long thought that it makes no sense to attempt to stream very high bandwidth video of a backgammon match, given that the venues where major tourneys are held often have limited bandwidth. And if you have a number of players/watchers inside the venue itself, the bandwidth disappears very quickly because the video stream first has to go "out" to the internet before it can come back to the watchers. And besides, 90% of this bandwidth is just a video of a backgammon board with nothing happening.

So I did a proof of concept. I showed that bgLog can broadcast a match in realtime using virtually no bandwidth at all. And of course, the log is available for instant analysis. The code is still there and this will be my next project. Sadly, I was not encouraged to continue this work due to a lack of understanding by some people.

The major hurdle is that to broadcast live, someone needs to transcribe the match in realtime. This art was common in the days before cheap digital video cameras but seems to have been lost now, although I observed some top players logging their own (clocked) matches by hand at a recent tourney in the US. So there is hope. Many people contribute a lot of money to facilitate the current video streaming system, so there is also a vested interest to overcome. I could go on. Suffice it to say, politics are involved, which is something I will go out of my way to avoid.

BBC is not just for broadcasting matches, it can be used for teaching and many other collaborative backgammon enterprises including blogs, forums and websites.

My plan is to put it out there anyway. I would love some input on how players and tournament organizers would like it to work, what kind of features it should have and so on. I hope to have something ready by November 2015 as I'll be at the Vegas tourney then and would like to try convincing a few people of the advantages of this development.

Print quality diagrams
Despite the internet and the way it allows us to have a truly interactive experience, people are still writing (and I presume selling) backgammon books. bgLog is in considerable demand in this area and it takes up a lot of my time. While it is not yet fully automated, bgLog can produce very high resolution, print quality diagrams for use in printed publications.

The details of the challenges posed in producing these images are beyond the scope of this note, but it is an area that I will be spending time on in coming months, if only to reduce my own workload!

Feedback on this or any other aspect of bgLog is always welcome.

Simon Woodhead, Gold Coast Australia, April 2015.

Contact: simon@bglog.org

No comments:

Post a Comment