/plushcap/analysis/ably/ablyeye-how-we-visualized-an-ably-sdk-with-go-and-ebiten

Ableye: How we visualized an Ably SDK with Go and Ebiten

What's this blog post about?

The author started working for Ably in 2022 and was tasked with building a demo project using one of the Ably SDKs, specifically ably-go. They wanted to explore, debug, and test an SDK in a visual way similar to how Postman API Client interacts with APIs. The author decided to build a graphical user interface that could explore, test, and debug the ably-go SDK using a game engine called Ebiten. Ebiten is a 2D game engine written in Go, which provides low-level access to audio, keyboard, mouse, and graphics. The author chose Ebiten because it can handle most of the heavy lifting for them, such as drawing images to the screen using native OpenGL functions. They also appreciated that Ebiten has been around for several years, is actively developed, updated, and maintained, and has over 6k stars on GitHub. The author then explained how they got started working with Ebiten and provided example code for each stage of development. They covered topics such as getting started with a new Ebiten project, drawing a .png image on the screen, state, screens, and transitions, and drawing text on the screen. Using some of the functionality of Ebiten described above, the author built their own tool called Ableye, which is essentially a visualization and graphical interface that sits directly on top of the ably-go SDK. Ableye supports up to four Ably clients in a single window and allows users to subscribe to channels, publish messages, and interact with presence features. The author shared some footage of Ableye in action and discussed the process of building it, including lessons learned along the way. They also mentioned that using Ebiten to build an interface does require careful planning but can be highly rewarding. The author hopes that others will find this tutorial helpful for learning how to build realtime tools with graphical interfaces using Go and Ebiten.

Company
Ably

Date published
March 10, 2022

Author(s)
Rosie Hamilton

Word count
2946

Hacker News points
10

Language
English


By Matt Makai. 2021-2024.