Skip to main content
Background Image
  1. DevLogs/

Trade Anchor DevLog: AI in indie game development

Introduction
#

Let’s talk about AI. And it’s role in indie gamedev. Or more specifically: How I use AI for Trade Anchor.

AI is, of course, currently the elephant in pretty much every room. That includes games and game development, where for 40 or so years by “AI” we meant pathfinding algorithms and behaviour trees. At best. These days, we mean LLMs and generative AI.

Illustration: The elephant in the room

Where AI is used
#

In Trade Anchor, I am using AI in several places:

  • Translation
  • Voice-Over
  • Music
  • Icons
  • Coding Assistance

In all of those cases, AI gives me something that as a solo indie developer with pretty much non-existing budget I would not otherwise have. And that I (see budget) cannot afford to buy.

AI Translation
#

The game is fully translated into six languages in addition to the English I use for everything during development. Of those six languages, one is my native language. Two I have very basic knowledge of, enough to ask for the way or order food but not much more. Two I know nothing about except that thanks to having had the not-so-much pleasure of learning Latin in school I can somewhat guess at some words when I see them written down. And one is a local dialect that I understand mostly, but don’t speak at all.

And while some online translation tools are fairly good for words or short sentences, an LLM does something else: I can give it context. When I ask it to translate “shipyard”, for example, I can tell it that I’m not talking about the kind of ships that get wet, but spaceships. It can then pick appropriate words in each language, in case languages use different words for those unlike English.

I can also tell an LLM that a text I’m giving it is for a UI button, and it should try to find translations that are of similar length even if they’re not a perfect translation. Or that it should use the word commonly used in this context. For example, in English you sometimes have “Options” and sometimes you have “Settings”, and in the context of a computer game, these mean the same thing. But if I plug “options” into an english-to-german translator, it’ll give me all kinds of answers that have nothing to do with that. Back-translating them to English: Possibilities, additions (like optional), alternatives, groups, and of course the german word for stock options.

When I give the AI a text to translate, I ask it for all of my target languages simultaneously. This makes it possible for me to stop possible translation errors in the languages I do understand, give the LLM correcting information, and get a new translation where usually I see it has also corrected words in the languages I don’t speak.

AI Voices
#

The second part is converting those texts into speech for the voice-overs of dialogs.

Hiring voice actors for a small indie project is out of the question. I have asked around for prices, and even just doing English is unaffordable. Not to diss voice actors, on the contrary. I would never argue with them, I think the prices I was quoted were fair. And I am sure that professional voice actors would be much better, especially when it comes to conveying emotions.

Fortunately, Trade Anchor is not a drama game or one where I need desperate people, happy people, sad people, and other strong emotions. It’s a trading game that is mostly factual, business, rational.

Using AI for voice acting also gives me something else: The same voice across all languages. That’s something I value quite a bit, because picking out a good voice is a big part of the effort, with quite a bit of trial and error. And not having to do that several times and for languages I don’t understand makes it a lot easier.

AI Music
#

If you read this far, you have probably listened to the entire intro song of the game. If not, stop reading here, do that, then come back.

Good.

Quite obviously, this would not have been possible without AI. In fact, after struggling with finding the right music in my collection of Unity assets, doing all the music myself with a specialized LLM was such a good decision. Don’t get me wrong, much of the music I own in assets is amazing. The problem is finding at least half a dozen or so songs that work well not just with the game but also with each other.

Illustration: AI creations

AI Icons
#

This is something I’m still struggling with. The icons in the game are a mixture of renders and image generation. All of the spaceships are renders. The alien race and empire images are a bought asset that I’m pretty certain was made with AI. The resource icons are something I’m trying to make with AI myself. Haven’t yet found a good, consistent solution which is why there are only a few of those icons in the game right now.

AI Coding Assistance
#

And finally, a game like this consists of a lot of code. I mean a LOT. Some of it is innovative and interesting. Some of it is tedious and tricky. Some of it is boring and standard.

I’ve found that an LLM used as a rubber ducky works great. Throw the problem code into it and ask for help, and half of the time the LLM will have a somewhat useful answer, and the other half just the act of trying to explain the problem to the LLM will help finding the solution.

I have also used AI to generate code. Usually code where I know the algorithm and desired output and the code itself is fairly standard, but I can’t find an implementation online that does what I need it to do, and writing it myself is tedious. For example, the galaxy map can have thousands of star systems. What is a good algorithm for finding all neighbours, or all stars within some distance from position x,y ? A quadtree, probably, at least that’s what I picked. It’s a nifty algorithm and not rocket science, but implementing one specific to my use case, with Unity’s Burst compile and Jobs systems, was quite a bit faster with the help of an LLM.

Let’s use the opportunity to say something about “vibe coding”: Don’t. Yes, it’s that simple. Only ask LLMs to write code that you could write yourself. Otherwise, if the LLM makes mistakes, you will never, ever, find or understand them.

Conclusion
#

IMHO, of course: AI definitely has a place and many uses in game development. It is a tool, and like all tools can be used or mis-used. It definitely can replace mid- to low-quality human work in many sectors. Human translators, voice-actors, composers and musicians could have done what I’ve done with AI. Hiring a few more programmers would do the coding assistance part with humans, etc.

In my particular case, I don’t feel bad about it. Because the thing about humans is that, as Firefly put it: They like to eat sometime this month. They can’t work for free nor should they. I am strongly for paying people, especially creative people and artists of all kind, more than they currently get.

And yet, not everyone can afford them. Even if they had worked for half a fair price, I definitely would not have been able to. AI allows me to do things that otherwise simply would not have happened at all. I would have picked some semi-fitting icons from the many assets I bought over the years, same for music. There wouldn’t be translations, and certainly no voice-overs.

In the end, everything is a means to an end. If I can use AI to bring you a better game, then AI is useful. And so far, it is.

Related

Trade Anchor DevLog: Information & Diplomacy
Devlog 6 for Trade Anchor, covering information and diplomacy
Trade Anchor DevLog: Economy & Trade Simulation
Devlog 4 for Trade Anchor, covering the trade and economy system
Trade Anchor DevLog: Space Freighters
Devlog 5 for Trade Anchor, covering some of the ships and details