Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Would you ever use real-time adapting AI in your game?

A topic by ahadprogamer created 59 days ago Views: 316 Replies: 9
Viewing posts 1 to 7

Hey everyone,

I’ve been working on a prototype for a dynamic NPC system that moves away from traditional behavior trees. Instead of following a hardcoded pattern, the agent uses real-time observation to analyze player positioning and habits, adapting its counters and fighting "smarter" as the battle progresses.

I have a basic browser prototype running, but as I look toward the future of this tech, I want to get some brutal honesty from other devs.

Is a truly adaptive, learning AI actually useful in game design, or is it a waste of resources?

I’m wrestling with a few specific questions and would love your perspective:

  1. The Player Experience Problem: Game design usually relies on readability and fair play. If a boss perfectly adapts to a player's habits and eliminates recognizable patterns, does the fight remain fun, or does it just become frustrating because the player can't "learn" the encounter?
  2. The "Goldfish" vs. Narrative Balance: If an NPC is purely adapting to systemic data (positioning, combat habits), how hard is it to keep them feeling like a character with a personality, rather than just an unpredictable math equation?
  3. Hardware & Latency Trade-offs: Right now, running this model introduces a bit of latency and local hardware strain. In your own projects, would you ever sacrifice frame rates or VRAM budget for smarter NPC logic, or will graphics and physics always win that budget battle?
  4. Would you use it? If a tool like this was lightweight and easily integrated into Unity/Unreal, would you actually consider adding it to your game, or do you prefer the absolute control that behavior trees and scripts give you?

Would love to hear your thoughts, especially from designers and programmers who handle combat and AI!

link to the project https://ahadprogamer.itch.io/omnicoreai

(+1)

For context, I’m a developer working on a game with combat, where the enemies have predictable behaviour: https://unaware-robot.itch.io/rogueblock-working-title

The idea sounds really interesting, and I think it could have potential in the right circumstances. For me personally, some of my favorite games are Hollow knight & Silksong and a big part that I like about those games is learning the enemy attack patterns and finding a strategy to defeat them. I fear that in those kind of games, the enemy adapting to your playstyle could be frustrating and make it feel difficult to “get better” at the game. But there may be different types of games where this adaptive behaviour could work better.

But my main concern is with the practicality of it. A few questions/concerns I have:

  • for singleplayer games, having to connect to an external server for the enemy AI means that you can’t play offline.
  • This dependency could cause problems for people with lower internet speeds.
  • Who will own the server with the model? Do developers set up / manage their own model themselves, or is it a service that you provide and they connect to?
  • Is this meant to be applicable to specific types of games, or is it meant to be broadly applicable? -if the second, how do you make the model work for vastly different types of combat? (2D vs 3D, shooters vs fighting games, etc)

very interested in hearing your thoughts/answers on these :)

Thanks for checking out the project and for the solid feedback—I totally get your point about games like Hollow Knight, where predictable patterns are actually what makes mastering the game satisfying, so adaptive AI definitely isn't a one-size-fits-all solution. To answer your practical questions, since the AI runs through API calls, an offline mode is honestly something I don't have a perfect answer for just yet and am still trying to figure out. For slow networks, the plan is to use a live API connection like WebSockets so data transfers in small, fast chunks rather than one massive payload, though a really bad internet connection will always be a tough hurdle to fully solve. You won't have to manage or host any models yourself; it's a service where you just download a plugin, integrate it into your code, and make API calls while the backend handles the heavy lifting. It's also not locked to any specific genre or just combat—the goal is to make it a general-purpose plugin where you call functions to make it do whatever you need, whether that's walking, talking, or navigating your specific game world. Right now, it operates around a core set of action functions like move, jump, and attack, so you have to code your game's unique mechanics around those existing hooks, but I'm currently working on expanding it to support direct input calls in the future so it can handle complex, custom actions like swimming or shooting natively without you having to code workarounds.

also my servers had some technical problem that made it unable to use some features but its fixed now so it will work thanks for trying the ai.

(+1)

Thanks for the reply! To be honest, even if I thought adaptive AI would be perfect for my game, I would be a bit wary of making a game that is dependent on an external service, because it could suddenly become unplayable if the servers shut down and I would not be able to do anything about it.

(1 edit) (+1)

I think some degree of adaptability in character AI is useful, but everything depends on context.

Example. You’re fighting an enemy wizard. The wizard has two protection spells, one against ice (which makes him vulnerable to fire) and one against fire (which makes him vulnerable to ice), but he can only use one at a time. But your party is completely specialized for ice magic. So you attack when the fire protection spell is up, and heal when the ice protection spell is up. What possible motivation does the wizard have for ever using the fire protection spell?

In terms of game balance, the answer is obvious: to give your ice-based party a fighting chance. But in terms of character motivation, it stinks. It’s obvious that the wizard isn’t a thinking person trying to defeat you, but a randomized list of actions that he follows like the automation he is. And the game is fully justified in punishing you for overspecializing. What’s your party going to do against a ice-immune opponent who doesn’t have a convenient ice vulnerability that he turns on every few turns in order to be sporting?

But the thing is, fixing this doesn’t require any complex AI code. It’s basically just three line in a script somewhere:

  if damage_taken_with_current_protection > damage_taken_with_other_protection:
    switch_protection()
    swap(damage_taken_with_current_protection, damage_taken_with_other_protection)

That’s the kind of adaptive AI that I find interesting.

While you can use modern machine learning techniques to create an AI that is really good at defeating the player with machine-like precision, this is usually not the best way to approach AI problems. Unless you’re creating a chess game or similar, your goal isn’t to defeat the player. Your goal is to allow the player to suspend their disbelief and pretend that they’re interacting with a human. Excessively stupid behavior breaks this illusion, but so does excessively smart behavior. People have biases. People have emotions that cloud their judgement. People make rash decisions that they regret later. People can’t focus of the bigger strategic picture and the enemy in front of them at the same time if the enemy is charging at them with a sword.

An AI-controlled npc should have a set of numbers controlling their personality. This npc is a fool who charges straight at a bigger opponent, that npc is a coward who runs from a smaller opponent. If these numbers change during gameplay, that’s learning. It doesn’t have to make the npc smarter. In fact, it can do the opposite. Let’s say that you trick the wizard in the original scenario into stepping into an active campfire. And it hurts. A lot. So now the wizard has developed a phobia of fire. He’ll keep using fire protection spell, even if he knows that it makes no sense tactically, because he learned to be irrationally afraid of fire.

Thanks for this breakdown, you actually hit on the exact core of what I’m trying to solve!

I completely agree that an AI playing with flawless, machine-like precision ruins the illusion of a living character. My goal with this system actually aligns perfectly with your point about personality, phobias, and biases.

The idea isn't to create a "try-hard" killer, but to give developers a framework where they define those exact traits—like arrogance, cowardice, or irrational fear—and let the AI organically live them out. If a developer sets an NPC's personality to "arrogant," the AI will genuinely think it's at the top of the world, making rash, reckless decisions and attacking a high-level player even if it has zero chance of winning. If they are a "coward," they might actively abandon the player the second a fight looks bad.

Furthermore, this isn't just meant for enemy bosses or human characters. The vision here is a completely multi-purpose, cross-genre tool. It could power a dynamic companion that talks to you organically (not just spitting out hardcoded lines, but generating unique, personality-driven responses), a cautious driver in a racing game, or even a pet cat that learns your habits and reacts dynamically.

By taking the heavy lifting of behavior tree scripting off the developer's plate, the goal is to let you just set the "soul" (the numbers, traits, and constraints) and let the AI handle the complex, unscripted execution.

(+1)
Is a truly adaptive, learning AI actually useful in game design, or is it a waste of resources?

It depends on the goal design of the game. If it's power fantasy, I believe dumb and slightly smart NPCs would be better to convey that.

If it's challenge, smarter NPCs could answer that.

The "Goldfish" vs. Narrative Balance:

I think the answer depends on how AI is learning or adapting if you will. If it's adapting while adhering to defined personality, it should be okay.

Exactly, it really does depend on the game's core design goal. A pure power fantasy needs predictable fodder, whereas a tactical challenge needs something smarter.

I wanted to clarify the bigger picture for this project, though, because it's actually designed to go way beyond just enemy combat or boss fights. The goal is to build a completely all-purpose, multi-genre AI tool.

It's meant to adapt entirely to whatever personality and constraints the developer sets up. For a power fantasy game, a developer could easily code an NPC to be a total coward who panics and runs away from the player, making the player feel even more powerful.

Because the backend handles general-purpose actions (moving, interacting, talking), it can be applied to almost anything. It could be a friendly companion that keeps you company and talks to you organically without relying on a rigid, hardcoded dialogue tree. It could be an unpredictable driver in a racing game, or even a non-human entity like a pet dog or cat that learns your habits.

Ultimately, it's a tool meant to give devs a break from scripting endless "if/then" scenarios, letting them just define the character's core traits and letting the AI adapt to the game world naturally!

Quick update — the OmniCore AI prototype is now live on itch.io.

Just uploaded it. You can grab it on the page now.

Two ways to get access:

- Buy it directly

- Or get a free key by testing it and sending me a video + honest feedback

Full details on how the free key thing works are in the latest devlog

on the page — read that first if you want the free route. https://ahadprogamer.itch.io/omnicoreai/devlog/1573208/-devlog-3-omnicore-ai-pro...

Quick heads up since I've gotten this question a few times: this plugin

is for Godot 4, and for Unity not Unreal. If you're on another engine, sit

tight for now.

If you want a free key, hit me up on Discord: https://discord.gg/VcaR3krgS. Drop a message and I'll send the key over.

Thanks for following the project.

(+1)

"Is a truly adaptive, learning AI actually useful in game design, or is it a waste of resources?" in my opinion this is overkill for what i think you are trying to do, i think its better and cheaper to create a greedy behavioral model for recommended npc moves either stochastic or probabilistic, but either way it will be much simpler, more reliable, less dependent, more customizable. me thinks .....