Linda
By Linda
November 23, 20268 min read

Building my own plugin: gaming on my e-reader

AISoftware Development
A Kobo on a wooden desk showing Doplo Plus, filled-in numbers and enlarged pencil notes.

There are two non-developers at 10KB. I'm one of them, but give me access to Visual Studio Code and Astra and I'll go off and build all sorts of things anyway. Until a few months ago, that rarely turned into anything I could use. With AI, I'm getting further every time.

After building my own keyboard, I turned to my e-reader. I wanted to play a particular puzzle game on it. I've now got a working version on my Kobo (hype!). It was only when my colleagues took a look that I realised how many decisions Astra had made for me along the way.

It started with KOReader

If you only subscribe to one newsletter for the rest of your life, make it ZSA's. ZSA designs and manufactures mechanical keyboards (I found them down my mechanical keyboard rabbit hole). Their newsletter barely mentions keyboards. It's mostly about 'cool things on the internet'. The latest edition featured KOReader, a document viewer for e-readers. It's similar to the software already on my Kobo, but with a lot more features, like installing your own fonts, transferring books wirelessly and customising touch gestures.

Now, when I press and hold the top-left corner of the screen, my Kobo automatically connects to my Switch Joy-Con, which I can then use to turn pages. Here's the repository that makes it work.

An e-reader running KOReader, showing a calendar overview of the books read in November

My reading calendar for November (highly recommended: Dungeon Crawler Carl)

A plugin of my own

KOReader lets you add your own plugins. That seemed like a great opportunity to put a game I enjoy (Doplo) on my Kobo. I first came across this particular, somewhat obscure game in a Swiss puzzle magazine full of logic puzzles and even ended up subscribing to it. Of course, there wasn't an existing KOReader plugin for it...

My colleagues asked questions I didn't even know I should be asking.

Linda — vibecoder

Luckily, I still had some AI usage left at the end of the week, so I asked Astra for help.

How I use AI

I'm still not a developer. I do know which game I want to play and what features I'd like. Apparently, a plugin can do all that. I can also tell whether it's fun to play once it's on my e-reader. Turning it into code is what I use AI for.

In situations like this, I start by exploring the options. I ask Astra whether she knows the game (Doplo), whether there are any examples already, and how she would turn it into a KOReader plugin. Then I ask her to write a prompt I can use to generate a first version of the plugin. That prompt is much more detailed than anything I could come up with myself, but it also gives me a sense of where AI thinks I want to go. I often tweak a few things, for example because I want a particular feature that isn't in the prompt. Then I set Astra to 'max' and let her generate the code.

While testing, I mostly checked whether I could play the way I wanted to. Were the controls comfortable? Did the features work as expected? The first version had crosses, which I swapped for solid black squares because they were much clearer. That felt like a good start. I only found out what else I could be asking about the plugin when I showed it to my colleagues.

A Kobo on a wooden desk showing Doplo Plus, filled-in numbers and enlarged pencil notes. A colourful split keyboard sits in the background.

Doplo Plus on my Kobo Libra Colour.

What about the quality?

First things first: my plugin works. I can play Doplo on my Kobo, complete with pencil notes, different difficulty levels, hints and automatically generated puzzles. But when I ask a colleague about the quality of the code, I get a reality check. The code is hard to read. My colleague gives me a few specific suggestions for that (and I ask Astra to put them into practice straight away).

There are also questions I hadn't thought about while building it. Why this programming language? Where did that licence come from? What does it mean for what I can do with the plugin? I've mostly been checking whether the game works. Someone with experience spots the decisions behind it straight away.

By now, I do have an answer to why the plugin is written in Lua: that's simply the language KOReader plugins are written in. I'd never heard of it, which wasn't a problem for Astra. According to a colleague, that's exactly what makes AI so interesting for experienced developers. An engineer who's worked in a few programming languages can apply the same software development principles in others. AI can help with the unfamiliar language. It's like a Dutch-speaking editor using a translation to edit the structure of an Italian article. The quirks of the language and the program still take some getting to know.

The questions I hadn't asked

Astra knows a lot more than I do about building a plugin like this. She can fill in details I haven't even thought of, which helps me get something working quickly. She still doesn't know what I ultimately want to do with it, so she makes assumptions. My colleagues help me spot those assumptions and understand what they mean. That's also how we work at 10KB: we keep asking what someone wants to achieve and work through the consequences of each choice.

Hidden choices and their consequences

Astra also suggested a licence, AGPL-3.0-or-later. It sounds like a technical detail for the bottom of the README, but it sets the terms for how others can use, modify and share my plugin. KOReader itself uses the AGPL, and my plugin directly uses parts of KOReader. The terms of the existing software matter to the licence of my plugin, too.

When AI makes choices like these, they affect how the software can be used, distributed and potentially sold. I can sell it, for instance, as long as I follow the licence terms. If I distribute the plugin, I have to make the corresponding source code available, among other things, and recipients get the right to modify and redistribute the software. Whether that works for me depends on what I want to do with the plugin. I have to consider more than whether the game runs on my e-reader.

What I learned

  • AI can know much more about a subject than you do and still make assumptions that don't fit what you want.

  • Even when the result works, you might miss some of the choices behind it.

  • Those choices affect what you can do with the software, including how you share it and what rights others have.

  • An experienced developer helps you spot the questions you haven't thought to ask and understand the consequences.

Try Doplo yourself

These puzzles come from my plugin. A colleague built a browser version based on it, which is why it's released under the AGPL as well: you'll find the source code and licence below the puzzle. You can find the original Doplo rules at Küng Rätsel.

Want to play my game on your e-reader too?

The Doplo plugin is on GitHub. You'll find the code, game rules and installation instructions there. The project is available under the AGPL-3.0-or-later licence.

Already have KOReader running on your Kobo? Here's how to install the plugin:

  1. Download the repository using Code → Download ZIP on GitHub and extract the archive.
  2. Close KOReader and connect your Kobo to your computer via USB.
  3. Copy the doplo.koplugin folder from the extracted repository to .adds/koreader/plugins/ on your Kobo. The main.lua file should then be at .adds/koreader/plugins/doplo.koplugin/main.lua. Enable hidden files if you can't see .adds.
  4. Safely eject your Kobo, launch KOReader and choose Tools → Doplo.

For other KOReader installations, use the corresponding plugins folder. Is Doplo missing from the menu because the plugin was previously disabled? Enable it via Tools → More tools → Plugin management and restart KOReader. The README has more details.

Don't have KOReader on your Kobo yet? Nico Verbruggen built a browser tool that lets you install KOReader on your Kobo. You'll find the tool here.

Ewout

Contact person: Ewout

Work together?

Have a software question or a project in mind? Get in touch with Ewout to discuss what you need and how we can help.

CONTACT

Get in touch with us

Have a question or want to discuss your software? Leave your details and we will get back to you soon.