this post was submitted on 27 Oct 2024
109 points (95.0% liked)
Games
32526 readers
2185 users here now
Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.
Weekly Threads:
Rules:
-
Submissions have to be related to games
-
No bigotry or harassment, be civil
-
No excessive self-promotion
-
Stay on-topic; no memes, funny videos, giveaways, reposts, or low-effort posts
-
Mark Spoilers and NSFW
-
No linking to piracy
More information about the community rules can be found here.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yeah, the easiest thing to implement is omnipotent AI. The code for the AI is executed within the game engine, so you have complete access to any information you want.
You can just query the player position at any point in time, even if there's a wall between the NPC and the player. It requires extra logic to not use the player position in such a case, or to only use the rough player position after the player made a noise, for example.
Of course, the decision-making is a whole separate story. Even an omnipotent AI won't know how to use this information, unless you provide it with rules.
I'm guessing, what OP wants is: