Games with AI

How to add AI to your game: pictures, text and 3D

How to add AI to your game so players generate pictures, text, voice, music, video and 3D in it, without your own AI keys or server, at a price you set.

To add AI to your game, ask the AI coder for the feature you want, for example "let players generate a hero portrait", and set it up in the dashboard. Players then create pictures, text, voice, music, video or 3D models right in the game. You need no AI keys and no server of your own: generations run on the iDos Games server, and you set the price for players in game resources.

A game with AI inside is different from a game made by AI. Here the player uses the AI: a portrait of their hero, a story for their character, a skin for their item. Features like these give players something of their own to come back for, and something to show friends.

What players can create

KindExample in a game
Texta backstory for the hero, a riddle, a letter from an NPC
Picturea portrait, a card illustration, a skin
Voicea line read aloud, a narrator for a quest
Musica theme for the player's base or level
Videoa short clip of the player's creation
3Da model from a text, a picture or four views, then texture, rig or animation

Each feature you open appears in the game's AI studio, grouped by kind. The player writes what they want, sees the price and gets the result; everything they made stays in "My creations".

What matters is that the result belongs to the player. A portrait they described themselves feels like theirs in a way a stock image never does, and a player who has spent an evening making a hero tends to return to play with it. That attachment is what AI really adds to a game.

AI studio
12 450
320
Picture
Text
Music
Hero portrait

"A fox knight in golden armor, cartoon style"

Create · 20
Fox knightReady
Battle themeIn progress…
The AI features you opened to players, by kind: text, picture, voice, music, video, 3D.
The player describes what they want and pays the feature price in game resources (or nothing).
"My creations": the result comes from a job the server runs.
Example. The AI studio: a feature, the player prompt and the player creations.

Step 01Add the feature

In the AI coder write what players should be able to make:

Let players generate a portrait of their hero from a short description.

The AI coder installs the in-app AI system or calls the feature from the game code. You do not write a request to a model, store keys or wait for jobs yourself: the system does that.

Step 02Set it up in the dashboard

Open the dashboard, pick your project and go to Live Operations → v2 → InApp AI:

  1. Create a feature: its kind, the hidden prompt and its quality mode.
  2. For 3D, pick the operation: a model from text, from a picture or from four views, or work on a model the player already made. You set its quality, polygon limit and allowed animations.
  3. Set the player price in game resources and the limits per player.
  4. Set the spending caps of the title so a popular game does not spend more than you planned.

The AI button on that page opens an assistant: describe the feature in words, review what it proposes and press Save.

Step 03Test and release

Try the feature in the test version of the game, then send the settings to the live game as a separate step. Players see a new feature only after that.

Who pays and how much it costs you

  • Generations are paid from the AI credits of your plan, then from the Aspis of your iDos Games account.
  • Players pay you back, if you want: a price in game resources or in Aspis for each feature, or free.
  • A failed generation costs the player nothing: Aspis are charged only when the result is ready, and a refused request (limit reached, feature unavailable) charges nothing.
  • Caps protect you: per-player limits and the spending caps of the title stop a viral moment from emptying your balance.

A simple start is a free feature with a small daily limit per player. When you see how often people use it, move it to a price in game currency that players earn by playing.

How to choose the first feature

Ask yourself three questions.

  1. What does the player already do most in the game? If they collect heroes, the first feature is a hero portrait; if they build, it is a world or a building from a description.
  2. Where will the result be seen? A generation nobody sees gets boring fast. A portrait in the profile, a skin on the character or a card in the deck is seen by the player and by others.
  3. How often is it needed? A portrait is made once a week, NPC lines are needed all the time. Rare things can be paid, frequent ones are better as a hidden feature of the game itself.

One feature that answers all three questions is worth more than six that answer none.

Ideas by genre

  • RPG: a portrait of the hero, a backstory, a name and a crest for the guild.
  • Sandbox: a world built from the player's description; the voxel sandbox does this with a hidden feature.
  • Card or board game: art for a custom card, a voiced announcer.
  • Social games: player creations shared with others through the workshop.
  • Any game: NPC lines written by AI from the game code, so characters do not repeat the same three phrases.

AI the game uses by itself

Not every feature has to be in the studio. A feature marked hidden is called only by the game code and never shown to players. That is how a game can write a new quest text each day, give an NPC a reply that fits the situation, or turn the player's short idea into a whole level. The player sees the result, not the prompt.

For developers

In-app AI works through client.ai in @idosgames/core. A refusal charges nothing, and waitForGeneration follows the server job for you:

TypeScript
const res = await client.ai.generateImage('skin-gen', { Prompt: text })
if (!res.ok) return showError(res.error)
const done = await client.ai.waitForGeneration(res.data)

Mistakes to avoid

  • Opening every kind at once. Start with one feature that fits the game; a studio with six empty buttons confuses.
  • No limits. Without a per-player limit one enthusiastic player can use the whole budget in an evening.
  • A prompt that does too much. The hidden prompt should keep results in the game's style; the player adds only the details.
  • Hiding the price. Show what a generation costs before the player presses the button.

If you are still building the game itself, start with how to make a game with AI and add in-game AI once the core loop works.

Aidos Ryskeldinov

About the author

Founder of iDos Games

Lifelong gamer and tech enthusiast. Since 2020 I have been building and shipping cross-platform games and apps, and today I'm building iDos Games: a platform where anyone can make a game with AI, put it live at its own link and earn from it. Here I share how to make games faster and easier than you'd think.

Frequently asked questions

Do I need my own AI API keys?

No. Generations run on the iDos Games server and are paid from the AI credits of your plan, then from the Aspis of your account. Prompts and models stay on the server.

Can players pay for generations?

Yes. You set a price in game resources or Aspis for every feature, or make it free, and set limits per player.

Can the game itself use AI, not only players?

Yes. A feature marked hidden is called by the game code, for example for NPC lines or for building a world from a description.

What happens if a generation fails?

The player is not charged: Aspis are taken only when the result is ready, and a refused request costs nothing.

Learn more in the documentation

Make your own game

Describe the idea in a sentence - the AI coder builds it, and it goes live at its own link.

All articles