#gameplay-ai
1 messages ยท Page 156 of 1
i would think Force Success (read the tooltip) or a bb dec to check if it is or is not set
Ive tried that
that being said I think Im on the right track. Ill keep ya updated
Ok I got it!
I made a custom EQS task which allows me to access a return value bool, and if there is a return value I pull the first location out of the array and set it. If the return value is false it skips setting the location vector while still fully executing. Then I just test for if the vector has been assigned or not
Hey can someone help me with this blueprint for noise emitting and noise sensing on my AI?
For some reason this logic isn't working
This should make my AI walk towards the noise my player character is emitting but it's not
Try plugging in location into destination
It could also because your loudness is set to 0
ah ok
I'll admit I don't know too much about noise emitters, so I was just going off of my best guesses๐
Yeah Idk I've tried a few different lines of logic but it doesn't seem to work
Like I can't get this stupid AI to move to any noise
I can make it see the player character and run towards him but not HEAR him
This is all the code I have for the AI
From what I can find I think you might need to have a report noise event after the make noise one
within the player character
Hmm I'll check
Hey folks, does anyone know of a sample project where character behavior is simulated even when far from the player(s) and out of render-range? Thinking through solutions for achieving consistent-enough behavior for both instatiated/rendered actors as well as those which are far away and only live as game state data
I guess the most consistent thing to do would be to implement AI behavior on the game state data and then just rely on Unreal for rendering? E.g. processing movement, interactions, collisions outside of Unreal and just asking Unreal to render the results for whatever's in render-range of a player
iirc in oblivion, each npc had a schedule that specified where they would every in-game hour, pretty sure their location could be determined to a finer degree from that
These characters will be doing all sorts of stuff according to their AI, so a set schedule won't work for them, unfortunately
Bummer
Thx though!
GOAP with hardcoded task times, which jumps through them when out of simulation range? Or just ticks at varying rates depending on distance.
Interested in the answer too, though I'm not creating Skyrim II haha
Yeah I'm thinking along the same lines, was interested if there are any open source or free projects to learn from
There will be sticking points
there might be some info from Death Stranding, since the AI walks/drives about the entire map
Nice ty! Ill search for what the devs have said
eric johnson did a talk about the ai at gdc (2021 iirc) but only briefly mentioned that they do this, the talk was more about navigation solutions
fwiw, they would build navmesh around the ai in a large enough area, updating it regularly so they are not actually pathing the entire world
Would this help? Was looking at it the other day, promises to be more performance than the default AI. I think it's something like 1-2k parallel actors where the engine starts struggling, but that's before any significant optimisations of course.
Check out a paper on "Alibi generation" by Ben Sunshine Hill (lead AI guy at Havok/Intel last I heard) which is a way of statistically modelling unseen behaviour and then instantiating believable agents in the simulation bubble by then having a pluasible backstory (the Alibi part)
the basic idea is that you create your AI as full simulation. You capture the behaviour of that simulation as a statistical model (I'd do it as an ML model, but same same) and then use those stats as the backstory for a character when you need to instantiate them. So stuff like where have they just been, why are they going where they're going, things like that.
Thx everyone! These are some great suggestions and resources, I'm going to have a closer look this evening and in the morning (KST). For this project there is a tile-based world similar to that of animal crossing but much larger and with far more AI controlled actors. I'm hoping to offset the costs of simulating activity across the world by having common activities take a prolonged amount of time, which will slow the rate of agents needing to reevaluate their behavior. To that end, I think some form of alibi generation makes sense as @ocean wren suggested. For instance in the game simulation I could assign an actor to use a crafting area and then only if/when the player approaches go further and use some kind of alibi generation to figure out where, specifically, in the crafting area the actor is (e.g. by the forge) and which activity he's doing (waiting for iron to heat up)
Also hoping simple tile-based navigation will help to scale pathfinding around the world
How can I find out dynamic behavior tree`s GameplayTag used in "Run Behavior Dynamic" node inside a task that is executed inside this dynamic tree?
So far I'm trying to just set the tag in BB right before executing the Run Behavior Dynamic but this seems kinda hacky
It might be wise to review the code that Mikko Mononen's been working on for Mass-whateveritscalled that they discussed in the recent matrix experience thingy. Basically its about scaling up to a large number of characters using different behaviour level of detail.
Apparently its in the UE5 codebase, so might be worth a look
Thx! I only skimmed through that Matrix video because I thought it was mainly focused on graphical improvements, will take a closer look. Behavioral LOD is an interesting idea
There's a nice technical breakdown on youtube by the digital foundry guys.. if you look about halfway into that video they discuss it a bit
There's been a few GDC videos from AI sessions about this kind of thing too. Its a pretty common issue
One of those GDCs: https://www.gdcvault.com/play/1022411/Massive-Crowd-on-Assassin-s
There's an interactive version of these talks somewhere, I think on YouTube
i.e. the video
hello all. how do i set my behavior tree log level to verbose ? ive tried googling it and i dont get any helpful results.
This is not exactly a question about AI but its close so:
To store the current score for the players I use the PlayerState... but to store the score for the AI I should use.... ????
AI State? that's not a thing.
AI Controller? That's a thing, but I just checked and that is not replicated to the clients ๐ฆ
AI Controllers can have PlayerState as well
Question. Is it normal when using spawn ai from class for it to spawn the actor/blueprint pawn and a separate ai controller into the level, or am I doing something wrong?
Normal AFAIK
Okay. I figured it might be but thought for a second maybe it just took control of the player controller for the spawned actor
Iโm in need of a way for my actors to navigate long distances. Currently thinking of a road network that the AI could run something like AStar on the network to find the best root. Is this the proper way to do this or can anyone think of something more appropriate?
Heirarchical A* (HPA*) is a useful start there.. there's a navgrid pathfinder in the navigation system codebase.. dunno if that's any use though.
depends a lot on your levels and whatnot though
Zoombapup, do you have any good ideas to prevent AI from tailing? Currently I'm adding offsets to MoveTo goals, some AI goes right side of the goal, some goes to left and when they near enough they move to the goal itself, this way they dont create a line when following the same goal. But this requires me to track the distance and cretate MoveTo requests over and over too frequently, which kills the CPU a little bit
you no like RVO result?
What we did, was we changed the goto position into a "goto somewhere close" position for each agent
actually having a single goto location is just not good anyway
then for pathing, we also did the same, rather than follow a path, they follow paths with offsets
I see, so more or less it's the same. Thanks for sharing
I mean you can get more complex too.. having proper predictive avoidance and the like
we used the detour controller and the circle around nav point thing
Having said that, we had a squad of soldiers and not a regular "staying on the path" movement
Its probably better to look for ways to make the AI have different goals anyway
I'm currently just adding an offset and using FindAsyncPath -- that works, but possibly there is an engine bug with FindAsyncPath which takes 0.5ms to dispatch the query to the game thread
If it would work, it was going to be an awesome system that only uses 0.2ms CPU time for 100 units
That bug tempted me to look for other possible solutions, but looks like adding offset is the only optimal one in my case
Anyone around willing to hop on voip and chat about about the AI tutorials I have been wokring on?
They do a good job of getting me some basic insight on here is how to do X
But I am having trouble understanding some things.
In code I would define a object as having 'needs' or properties I can manipulate via an interface.
Then based on the real time values of those properties, I would want to update a SM to set a desired behavior.
Then based on that behavior I would initiate tasks, move, eat, sleep, fight, etc.
I am having trouble seeing the building blocks with the tools given that let me accomplish this.
hi
@lyric flint
ok. I was thinking not just on path finding and such, but when players have a team and they play as a team, how you to make BOTs behave as a team and adapt to the players in realtime?
The way Iโd likely approach it is by treating each of the โbotsโ as โpawnsโ on a chess board and have a โcentral brainโ calling all the shots (rather than each bot having a mind of itโs own). Depends on gameโs setup.
Using chess as an example, there are many pieces but only a single player (for the team). That player is the one who strategizes and determines how best to use all their pieces (working together as a team) to achieve victory.
that's a great way to see it
Then when you have a real player take charge of that team, but also want to keep the same AI functionality, you would just treat the playerโs input as beneficial input for the AI. The AI will then play co-op with the player.
NN seems overly complicated for AI to be honest.
Games are about the power fantasy, not believable opposition after all. To fill out MP lobbies maybe though
Was this in reference to my remark in #career-chat ?
Yup, I've dabbled in NN too and was looking to see if it was applicable for NPC AI, but it seems a lot harder for unclear benefits.
Things like asset and world generation though ๐
I agree; NNs are not appropriate for game-character AI. Their intended use is more for pattern recognition (like audio and images) and content generation (like the daydreamer AI).
Audio patterns? Not sure if there has been much movement in this area, but one of the most effective way was to convert audio into an image (spectrograph), and then do object detection/recognition on it still haha
RL networks interest me for game testing though, seems like a no brainer. Particularly for breaking games in weird ways.
Yes, sorry; thatโs what I meant. We do that as part of our โcry detectionโ research.
Ah all good, just curious! It's funny when written out but if it works... ๐คท
You CAN use NN's for characters. You just have to know what you're doing with them. They aren't some magical beast you can just apply and forget.
There's definitely room for experimentation in that regard still.
I'm using graph neural networks for generating behaviours in a simulation world for instance
Most of the time, people who try using neural networks fail because they don't fully understand the limitations and what they represent
i.e. they don't have a good grasp of the training data etc.
And honestly there's sometimes a lot better ways to do things
BUT, don't dismiss neural networks overall as outside of the scope of games.
Never did. I simply stated that they were not the best choice for โsmartโ decision-making (in games like chess or soccer etc).
I didn't mean you explicitly, I meant people thinking about using NN's for games
Iโve seen some pretty creative โgameโ projects using NNs. ๐
I've had a bunch of students try it and fail, because they really didn't understand them properly. I mean you can kind of intuitively think of them and the maths as building blocks are simple enough, but the practice of using them is more challenging if you haven't spent time with them
Same with evolutionary algorithms too, had a bunch of students try those and fail too ๐
Not that failing is bad, you can learn a lot from it
As I've not been paying attention - anybody know whether UE5 fleshed out the alternative behaviour systems a little more?
IIRC there was a very barebones hierarchical BT/FSM implementation with no tooling
And more on that - any blackboard improvements, like dynamic variables, arrays, structs, a proper "global" blackboard system etc?
I've not been paying attention either
Kills me that the engine has a fantastic toolset for creating state machines but none of it is provided in an AI-oriented setting.
I don't recall seeing anything about heirarchical BT/FSM (BT's are already heirarchical anyway). There's the HTN planner, but I don't remember anything else
Ah that was it.. HTN planner
Well, there's a marketplace plugin you can use for using the node graph as state machine
and honestly, making your own is pretty trivial
Oh sure, just don't want to if I don't have to. The Marketplace "seal of quality" isn't all that high either..
But yeah, would be great to see more usability focussed AI tools
Well, FSM's are so basic, I can't imagine you could do them poorly ๐
It's more the integration with the rest of the tooling really, the engine already does 99% of it in the form of the anim graph FSM's
Just irks me that none of that stuff has an AI-specific implementation
Well, yeah, which is why I mentioned the marketplace thing, it basically uses that
exposes the anim state machine setup for general purpose state machine use
Ideally I want HFSM at the top level, with it's own blackboard, and those individual FSM states despatching tasks/BT's with their own blackboards.
state machines aren't only for AI
Using HSFM for top-level decision making and BT's for the small bite-size tasks
Working rather well for me so far without creating that horrific bloat BT's tend to accumulate
Ideally, we should have a variety of different tools. Part of the problem with the current BT implementation is that its just not very user friendly
BT's are very capable of doing what everyone needs for the most part. But they're poorly documented and quite quirky as implemented for some weird reason
like for instance, the blackboard SHOULD be able to have shared values accessible across agents, and should have arrays and the like
but it was implemented by a junior programmer before the blueprint system was fully evolved.. so has this weird setup and bunch of restrictions that makes it less useful
Yeah, bit odd that it still doesn't. They were originally looking at that as far back as 4.8. Also no reason they can't support structs really.
Guess it's a legacy support thing.. UE5 would have been the perfect time to dump all that ๐ข
Equally, the BT implementation has usability issues because the langage is kind of wonky in places and hasn't been used by enough people at Epic to cause them enough pain to want to change it ๐
I suspect that more AI stuff will be coming. Mikko Mononen (guy who did the recast and detour libs) is working at Epic now. Just did the crowd LOD stuff for that matrix demo, so I guess he's at least active doing tooling for AI.
I mean, I don't mind because it means I've got a bit more commercial value in that I can do those things myself ๐
I don't wait for others to make tools for me anymore. I learnt that lesson back when Torque3D was a thing ๐
preaching to the choir ๐
UE5's release would just perfectly tie up with some things I'm working on, was hoping for more goodies
Guess its coming early-mid next year
Well well well ๐
I've seen the Mass stuff, not hugely applicable to me but it's good that they're doing it.
Haha ๐
Is that an Epic thing? or an external thing?
Preview that may be in 5.1 thing, I think
Ah well. I mean it doesn't look the most user friendly.. but at least its something
AI in games such as football must be a nightmare
Why?
I'm thinking on the bizarre behaviours seen in FIFA
animation in itself for games such as FIFA must be a nightmare
Animation for sure is a challenge.. have a look at motion warping which is a thing they do a lot
It's actually simpler than you think
Of course, it's not easy
It requires some technical profession, but most of the engines today can provide required tools (Behavior Trees, Finite State Machines, Utility AI systems) that helps developers a lot
Take a look at to this e-book, it's free and has some real world examples about game AI: http://www.gameaipro.com/
Almost fancy as your level design blog ^^ ๐
when one think about human behavior, a lot of it includes emotions, cognition, percetion, etc. A computer on the other hand doesn't have sensory input nor feels anything.
Many labs developing NN/ML systems also research about human behaviors and neurons, zoombapup should know better than me of course
yeah, plenty of work in those directions.. geoff hinton has been going at that for a while. And there's a whole field of neuroaesthetics too
My favorite one is 1000 brains theory: https://numenta.com/blog/2019/01/16/the-thousand-brains-theory-of-intelligence/ -- researchers of this topic also recommends this model could be used on machine learning systems too
I've used some of the more common emotion models in my own work.. but never felt like they were that good
my favourite research pychologist is Klaus Scherer, his description of the complexity of emotion feels more convincing to me.
Hmm, I'm deeply interested in psychology actually, even more than UE4. Thanks for letting me know about him
I'll take a look
If you're interested, check out Beatrice de Gelders work too.. she's done a lot of neuroimaging studies. That stuff is fascinating.
Interesting, you're full of gems haha ๐
And I recommend looking at the classic works of hieder and simmel (on the ability to see geometric motion as behaviour) and Gunnar Johhanssons work on perception of biological motion, both of those are pretty old.. good videos on youtube
Those two works, along with some reading I did about acting process, convinces me that we don't need to actually feel emotion to express it in digital actors
We just need "the illusion of life" as the disney book says ๐
Book by Frank Thomas and Ollie Johnson on the history of disney animation studios is an interesting read (although a bit big)
we don't need to actually feel emotion to express it in digital actors
Interesting deductions
The classic psychology stuff for games, is work by Paul Eckman and his co-author Wallace Friesen (sp?)
About expressing emotions through facial movements
I think I heard about Eckman before
everyone quotes (or rather misquotes) Eckmans FACS facial model and universal expression of emotion
for instance. Players can rage, cheat, laugth, etc.
From what I can see, your general psychology research is based your development on artifical intelligence, especially the ones related with motion
I guess it's because of you're specially working on AI's that has vision?
Well, yeah, I'm trying to create that illusion of life thing
how does a BOT aim? the cpu isn't processing frmaes of image and detecting where to aim, is it?
This is in part, because I reviewed the literature on acting and it seems that actors use techniques most of the time and not emotions to drive thier performance.. so we can basically learn techniques
Those are ultimately low-level things that even many very experienced people don't think about, but bot just rotates it's bones to the target location, the programmer provides the target location by gathering info from environment
And given I get all teary eyed watching animations, that clearly is a technique that can be learnt and if it can be learnt, we can teach a model to do it
I think the same way with you, though to really understand and agree I need to study and get more experience like you ๐
At a high-level thought, I'm a believer that human brain is a "model" in the universe that can teach itself to learn, and possibly what humans can procude is the almost same by AI
placing path nodes one by one is so boring
So I value researches about neurons and their similar implementations on AIs
nad having to manually setup lifts, jump spots with tags as in ue1 is very boring. I wish certain things could be automatic, such as bot just knowing where to jump and how to use a lift
I'm wondering if you made any talks on somewhere about your AI researches/development?
Yeah, I care less about that and more about the aesthetic perception of experience
Not for a while.. I'm just about to publish a load of new work though this year
I took some time away when I changed to my new University and reset my thinking a bit
There should be some videos of my talks at GDC online somewhere I suppose, both those are older now
Really? Still would like to watch actually, if you remember the titles/topic
mostly stuff about emotion and social simulation, believability etc
can't remember the exact talk names.. they were usually part of the AI Summit
Alright, will give it a look
going to be doing some collab work on alien embodiment, love and some fun stuff like that with colleagues
and doing my own work in vision based demonstration learning for acting behaviour and cinematography
i.e. teaching an AI to "act" by having it watch films (not physically watch, but use the films as training data)
I just imagined of some AI learning Friends' Joey's acting when you say like that ๐
Dr Drake Ramore ๐
I wonder how much cost can be cut down from development if you apply AI to solve repetitive processes, such as scaling of images, placing certain objects in the game world, producing multiple variations of characters, so on
What would be the 'input' to make AI act btw?
'Why' AI will start to act? On which scenario
usually it'll be a co-creative tool, so a human will setup a scenario by choosing some actors or an outline scene description.. the AI will then fill it in as if recommending scenes
so imagine it gets a text scene description from a scriptwriter, it'll use that (by extracting entity descriptions etc) and generate the cinematic from it
My aim right now, is to automatically generate cutscene type content, including the level layout and the cinematography and the actors positions and overall motions
based on some work on cinematic description language called PROSE by Inria labs
Rene Ronfard
(you literally explained Ubisoft right now btw ๐ ) -- check Watch Dogs legion
using work by University of Toronto (Sanja Fiedlers lab) as a basis in some ways.. learning a graph probability
This looks like a serious project rather than a hobby/learning project
Or you're just working so professional, not sure ๐
I need help!!!!!
AI for content creation is a massive issue right now, which is why I'm doing it
Well, I teach this stuff for a living, so its kind of my job ๐
and its my research interest, so why not ๐
WE ALL NEED HELP
But the idea itself is very promising and well developed
It looks like a project that OpenAI will work on soon, at least how it sounds like
I'm trying to do the ai blueprint exmaple from the docs in c++. The move to node doesn't work and I cant find it in the c++ api documentation.
content for games like UT was all low res, low detail. But now it's fine grained with a lot of sub steps, little details and the more realism you add in, the easier it becomes for a tiny thing to catch your attention
Have a look for Embark Studio's presentation at Nexon's conference a few months back.. Embark are a very interesting studio in the PCG/ML field
they definitely get it
I just realize the things you mentioned can be used for a level-designer AI too
I was thinking of a level-designer AI lately since I suck at it ๐
and they just announced their UE5 game, Ark Raiders yesterday? so worth a look
Send the code screenshot?
yeah, one of my use cases this year is automated level design
as recommendation system.. I'll show a video after xmas
This years last quarter was full of researches about game and level design for me, and it's really an open area for an AI.. And it can be actually really helpful to the developers in any means
but basically, its kind of leveraging advances in computer vision and scene understanding and just me wrapping that in Unreal Engine pcg interfaces ๐
Is this same for the latest UT too btw?
yeah, my version basically gets the level designer to drag an image into a window in unreal engine and then it generates the scene in the image
Wait.. you literally made it already?
adds it to sequencer etc..
working on finishing parts of it up over the xmas break, but yeah
o_O
its part of the automated cinematography thing, I wanted to automate the whole scene
there's a load of work in the computer vision literature on scene understanding and generating scene graphs automatically.. I didn't really do anything other than apply some of the latest work in that area and wrap it in Unreal-ness
so heres where i am setting the random location to the blackboard key that "move to" node is using
did you use the visual debugger to see if the path is generated?
That does not provide too much info so what we can do then is checking Visual Logger
My idea was something different than computer vision. It's like how you train the AI without vision on actor AI, but this time you train the AI with transforms of blockout levels and player movement etc
For example, DOOM has a unique and consistent level design
AI could learn it, and generate blockout levels
Will do! Also this Ai talk is pretty cool.
Yeah, that's a thing too.. I'm just generating the blockout params really.. I figured for non-expert LD's its easier to say "like this" and show it a picture of what you want and it to find the layout, textures, lighting params itself
I've learnt a lot from reading the literature on robotics for things like demonstration learning
because if you're training a robot, you don't want to have to repeat a motion like a million times to train it, you want to demo it a few times and have it work it out
I'm just training mine from films rather than moving a physical robot arm
Hmm, like how OpenAI is training their hide-n-seek AI
I guess thats a general rule of AI development
Well, theirs is using more reinforcement learning, so they have it play millions of times
and learn a fitness function (quite complex one)
demonstration learning is more about learning from a few examples and being able to generalize them to new contexts
imagine a robot having to pick something up.. you don't want to teach it to pick up every new type of thing, you want to teach it to pick things up generally
And will it be able to figure pick up 'specific' things over the time or will you have to modify the way how it's learning?
Well, it learns to pick things up in general, but might struggle with objects that fall outside of its general bounds.. so say a long thin thing might be difficult if you teach it to pick up cups or something
the point is to learn an "invariant" picking up action, i.e. something that doesn't care what pose or what type of object, its just how we pick stuff up
Update! Thank you to zoom and const, I checked it. Turns out my ai was 1 ue4 unit out of the Navmesh volume. Lmao
I didn't know you could press P to see the path
Demonstrating learning is really a good choice for your actor AI then, now I get the general idea
also, make sure you check the logs.. failures usually are described there
Good advice there, I rarely do that. I swear to go I make so many little mistakes that keep from making so much progress in a day.
Thanks for the talk @ocean wren , it was really educative for me
Need to leave right now, have a good evening
Also cant wait to see your level designer AI lol, I'm really hyped to it ๐
sometime early next year god willing (and marking time allowing)
Iโm making Boids (a sheep flock) that essentially calculate separation, cohesion, and alignment to move like a flock. I spawn them in with a manager class I made that spawns them randomly within about 600 squared units. All in C++. Every time I start the game their behavior is randomly either Boids algorithm, or running off the map in a big group. I have wasted like 20 hours of my life trying to figure this out, someone please save me
Add some debug visualization, always draw the steering forces you calculate so you can see if the maths are wrong somewhere
And its likely your maths are wrong somewhere ๐
Thanks Iโll definitely do that later when Iโm working on it! I wondered if there might be something with Unrealโs ACharacter class and AddMovementInput function that leads to unreliable behavior? Iโm using delta time correctly I think
CMC is a nicely digestible 12k lines of code to peruse
AddMovementInput function that leads to unreliable behavior
Not really, though i think you shouldnt use it for AI controlled actors?
There is an example boids repo if you need it: https://github.com/EncodedWorlds/Boids
Also, don't use ACharacter for boids ๐ not a good idea. Use APawn maybe, but not ACharacter. Personally I'd use niagara particles for boids style stuff.
:no_entry_sign: Pythagore#6049 was banned.
it's a sign of the end times
countered by AI powered deep learning bots
it's a bot eat bot world
:no_entry_sign: Draxis๐#6652 was banned.
maybe the bots willfully seek out the #gameplay-ai channel to meet fellow bots ๐ค
Extra nitro generosity for Christmas
Hey there, can anybody help me making a structure in a character blueprint using pawnsensing? I'm at the moment making the see pawn function to chase the player if seen and after a few seconds of loosing sight, it will search a couple of loops, then go back the the patrol points. I haven't managed to figure out how to stop the AI from chasing after looking sight of the player so I ask does anybody have a way for that?
I'm uncertain if pawnsensing is the best solution for AI cause I already can see that the hearing sense is not able to move very much cause I plan that the AI won't hear you very well if your straight behind though if you anywhere besides it even the back, it will sense you.
I'm aware of Blackboard and Behavior Tree but I'm just not very good with it so I'm relying on event graphs and AI controllers instead.
I use a custom perception system. I don't know if sensing is the old system or the new one. I'd handle most of this behavior in a behavior tree personally
Well, I've been trying to use Behavior Tree but I'm just not good with it. To be honest, I've been doing my project for over a year and now I'm starting to think I'm not getting good at anything. Sorry, I'm always getting lost in this stuff. I did look into AI Perceptions but even that, I get confused with. Do you have any solutions or is there any way I can get clear answers without steep prices?
if you're a single person trying to get a project working you can't reasonably expect to know all sides of development
at least not without many years of experience
behavior trees are a bit difficult to understand at first
but once you get them, it's really easy to work with
it's basically a priority system
I've been doing one from Ryan Laley's videos but they don't quite do what I completely want and though I tried to research the changes, there's too few.
Anyway, I'll just leave it to that, thanks anyway.
to be honest if I were you, I'd just scope down and focus on finding something that is fun to play. attempting to recreate some big scope game made by a AAA studio with 100s of people over years of time, as a single person, is a road leading to failure.
please read #ue4-general message
Thank you, I need time to think...
stuff like this should get pinned really. so many people fall into the same trap of misunderstanding tutorials, misunderstanding scope and the concept of man hours
I'll continue to ask questions here but I need some time to think. I'm rather discouraged right now.
no reason to cry over this IMO. the best thing you can do for yourself if you're feeling down is to get back to what you really liked about your project, and focus on that. then, if that works on its own, cut away all the unnecessary extra stuff and create a nice little prototype
I am feeling down at your last text though I'm not crying. Let me quickly tell you my plan. I'm fully aware that I can't do this myself, I once watched a video called "Within A Minute". This video showed the amount of people and resources they needed for a single scene of a movie. My plan was to first create the main bases of the gameplay. I do later on plan to replace with newly made models but start with just base assets. Once all the main gameplay bases are setup in good enough results, I plan to post a video of the results and hope to get some convinced help cause if your going to make a project, you need to show others you mean it and that's all. I'll leave it to their we are getting off topic in this Discord Channel. Thank you for at least listening.
the plan is good. just don't let small failures get the better of you.
I understand but small errors are capable of holding a lot back.
By the way, putting the conversation above to a side, Ryan Laley's tutorials are really not something people should watch. I have too many blueprinter friends asking me question about his tutorials and from what I can see he always follow the worst practices
Are those the ones where everything is basically a state machine built into a behaviour tree? if so, fully agree, those are VERY BAD ๐
Or at least not very helpful for understanding the behaviour tree concept
(I have exactly a state machine built into a behaviour tree implemented in my own project)
Though it's not the first time you mention you dislike this idea ๐
I remember watching some of those tutorials and despairing ๐
Why not just use a HFSM if you're going to do that ๐
It's actually a HFSM implemented into a BTTask that signals back to BT when it should be cancelled
ugh ๐
I wanted to implement this for complex melee attack behaviors for AIs
It was my veeery very early days
What do you mean by "end at attacking"?
Stopped the BT Execution*?
Hmm yeah, a smarter me would do the same
But I took a lot of time for that in the beginning and it works fine for now
Yeah, I do a similar seperation, I usually have BT make the decision and another layer handle the execution/monitoring/resource locking etc
I like to sequence actions in a single BTTask
Like having a generic "Attack player" BTTask and it covers "getting into cover" and "shooting" part etc. instead of having "take cover" "shoot" type of BTTasks
Shooting part might be in Character class directly though, yeah - same BTTask would only signal to Character
I was on a panel at one of the Nucl.ai confs and we had a panel of like 5 different guys who had worked on BT's and EVERYONE had a different approach in terms of task granularity etc ๐
some had BT's with like hundreds of nodes, others had like 10 high level nodes
My BT adventure started with analyzing Alien Isolation's source code and I took most of time approaches from that
Though it's kinda actually doing what you're opposed to ๐ Stating the BTs
Whats that Ubisoft Massive shooter mmo based in NY? fook, my memory is shit
yeah, look at the divisions BT's and they're weird.. huge numbers of nodes with a right to left reading order and flow ๐
The guy literally rolled his eyes as he mentioned the right to left ordering ๐
I felt his pain ๐
Haha ๐ But isn't right to left is industry standart?
If you're arab maybe?
and maybe japanese? but thats top-bottom right left isnt it?
Imagine like a reverse blueprints where it flows from right to left, but that's the BT ๐
It was basically some early decision they made and nobody could later defend it ๐
Who could defend this ๐
So everyone was at this conf saying WTF??? and they were all "yeah, we know <shrug>" ๐
THAT IS NOT DEBUGGABLE ๐
To be fair, they don't have the tree fully expanded like that all the time, thats with every subtree node expanded
I understand why they have a "debugger history" now though
They mentioned this in GDC
I was very jealous of it
Their BTs can store timestamps of executions and visualise it back when you record it, similar to Visual logger but it's on BT directly
With this amount of nodes, it's a must
Yeah, you could retrofit it into UE, but honestly I'd rewrite the whole goddam thing
Sure, ask away
so im have 2 problems with a game im trying to makle still really new to unreal
1 is a win conditoon after a player picks up items and stands in a certain spot
the other is allowing the player to grow everytime they press the letter e on the keyboard
That's not really AI is it? you probably want #blueprint or #cpp depending on your language of choice
oh my bad still new
What zoombapup said + you handle game conditions in GameMode class, and you can handle keyboard inputs in player character class, and to grow your player you should add scale to your mesh or your actor directly.
At those channels people can provide more detailed information
No problem.. this channel is for AI discussion
I'm trying to wrap my head around how one would do a FSM inside a BT
though to be fair, I call my composite nodes "states"
some, not all
Hey CE, it's been a while, good to see you back ๐
CE: they'd literally add "state" subtrees, so each subtree would basically be equivalent of a state
Also whats cpp ?
But then they'd sort of munge around the idea of enter-exit for the states and transitions etc.. all totally silly stuff
C++ programming language
how do i go to that ?
I'll look up the guy to see what's going on... just to make sure I'm not doing the same ๐
I'm not sure what Ryan was doing but Alien Isolation is exactly this
They also had a "SetState" node
Which routes back BT execution to that state*
ChasePlayer
RunAway
SearchRoom
they had states like this, Each one was generic and branched
well I mean what are decorator observers if not state transitions?
preconditions
they're preconditions to control the flow of priority, the point of BT's was to get away from explicit transitions, because those are a pain in the arse for any large scale behaviour
yeah okay if you mean in the sense of states aren't as rigid as in a FSM
I try to make a aiattacking but the animation dont work and it is the good skeleton
The point was, that as we all got pissed off with handling state transitions, we figured that BT's would help, then everyone went and made exactly the same problems in BT ๐
I think a lot of it has got to do with ease of use. I kind of get what you're saying about the granularity of states, and in that sense yeah BTs focus on behaviors that can be individual modules that can create a composite state, but it's still going by the same concept as a FSM
just that a state can be created dynamically by a composite set of modular behaviors
But it isn't really.. what you're missing is that BT's are about priority and preconditions gating that priority, not about "state" and "transition" but about flow of execution
I get that people like to think in states.. but that's a bad idea
I think part of the issue is that the BT in UE is kind of a weird one.. it doesn't do parallel's properly for instance
and its event based nature doesn't help
sure, but in the end a state transition and an observer triggering might as well be the same concept. whatever you want to call it I think matters less
conceptually, you'd normally traverse the tree anew every update
UE also doesnt have a "branch" node (same as in the BPs), is that normal?
decorators are branches
In Alien Isolation it's kinda different though, it's just allowing two outputs
they're conditionals that exclude higher priority execution, so yes they're branches
in a classical BT, you can have multiple tasks running at once, just run them under a parallel and then all child tasks run
not that weird ass half-parallel thing in the UE implementation
that's fair, perhaps that's where the true strength of BTs lie
The main reason for BT usage, is to have an easier way to just define priority and preconditions on flow of execution
none of that really has to suggest state at all
do you enter a "I'm making a cup of tea" state? or do you just decide your priority right now is to have a cup of tea?
I need to be in the state of teafulness? ๐
I don't enter any states, I'm not an Indian god. but the outcome of the decision to make tea, if preconditions are fulfilled, would be to make a cup of a tea
or just "I'm currently idle and I have the need for a cuppa, so my priority for making a cuppa exceeds my priority for sitting on the sofa"
I think it's just semantics
sure but you could have that set in states as well is my point
I think its IMPORTANT semantics
because states drive you to think statefully
and priorities and conditions lead you to think differently
at least, that's what I've observed from lots of people having issues with BT's
I think the issue is that there is no alternative to thinking statefully
Hence my dismay at some of the BT tutorials having basically state machines in
of course there is, you can think of priority and condition and not about state as some discreet thing
but the point is people need that discrete thing to understand how their system works
for instance, I can think of priority and conditions where none of the decisions are discreet at all..
we don't think in states because it's fun, we think in states because it's easy
But its also what holds a lot of people back from thinking about it differently
that's what I am saying
I guess maybe if everyone had tried utility or ML approaches, they'd be a bit more malleable
you want people to think about things in the correct way make it easy for them
I can't ๐ its not easy ๐
bad AI it is then ๐
well yeah
I do think if you could summarize priority and preconditions into a singularly defined word you'd probably be halfway there
it's the structure that is missing
I guess you just have to battle through the state machine hell to get there ๐
I was trying to think of other types of "formless" structures
and remember the time I was learning functional languages for the first time
or even to some extent HLSL
perhaps that is really more of an entry point for people to learn about BTs
I dunno, maybe you need to reach the hell point to really get it ๐
Or at least try other architectures.. utility/rule based/ML etc
And honestly, most of what people want are so dumb that state machines (i.e. proper simple FSM) would do most of the job anyway
I try to make a ai attack but it dont work
fix it?
i dont no how
neither do we
just erase n and t and now it do work
advice so good it could be wrapped in a present and put under a tree
Utility based decision making within a state, seems to work best for me
Be in attack mode, score an attack method etc
I think behaviour states are very popular for game ai also because it reflects well the players own 'state' of gameplay
what if something takes you away from attack mode though
I think players play like state machines
Then they do something else
How do I transition?
I'm kind of swaying towards "utility AI with overarching state" myself but only really to categorize utility decisions into something like high/med/low priority ... which is basically attack/aware/idle mode in a common kill things game
I got that but instead of attack I got alert which then breaks down into aggressive mode and neutral alert mode
not everyone who finds you is going to have beef
... at least not immediately
#NoBeefAI #VeganAI
should i send a screenshot
I think you should present your problem
so that it can be solved
yes i fix it but the zombie play the animation if he dont is in the range
Does the behavior tree blackboard condition decorator not working properly? I am facing the same issue as this: https://answers.unrealengine.com/questions/713032/blackboard-decorator-node-not-aborting-on-result-o.html
@dark briar this can happen if the key is not set initially
and changes
i find i have to set clear set
just once
its very odd
oh dang, thanks. i'll give it a try
Would be helpful to have tutorials that teaches people on how to use BT in a proper way.
Hi! Is there a way to prevent navmesh from being created on top of some meshes? Or eliminate patches that are below certain area?
The problem I have is that I have a bunch of flat rocks, that are a bit above the ground, and they create a small patch, unreachable from other locations, and my spawning code relies on navmesh and sometimes spawns stuff on these patches, which I want to avoid without manually setting modifiers volumes everywhere
I'm not sure about that, you're going to be battling against a hundred other "tutorials" using them as state machines at this point
NavArea_Null should do it
Yeah, it's just too much small stuff to fix with volumes, trying to find a less manual way to do that
Add the navarea to your blueprint classes?
Set the objects to be obstacles?
there's a checkbox on the actor to ignore it for navmesh if I recall
or treat it as an obstacle
I just added a few large navmodifier volumes and set them to null on things like rooftops that weren't connected by ladders etc.
By the looks of it, there's a new navigation system coming in UE5
It's just static meshes on the map, can try to convert all of them to actors and add volumes, but don't think it's a good way
Is there a way to set them to be an obstacle without volumes? That would solve the problem
Unfortunately, disabling Can Ever Affect Navigation won't help here because then navmesh will be generated under the mesh, which is not good
Yeah, can't really do that because it's a lot of small stuff, can't just place few large volumes to cover them all
Is it? I'm actually working with UE5 rn, looks the same so far but I could've missed it
They didn't release it yet, just saw some shots from the latest Matrix experience thingy
Ooooh, I see, I see
There's a checkbox for navigation to make actors obstacles isn't there? haven't got the editor up and running right now
have a look on your mesh actors and just see if there's a navobstacle checkbox?
no, I mean a checkbox on the actor itself
might not start with nav though.. might be proxy or some such, I can't remember until I'm in the editor
Can't find anything like this, sorry
I'll take a look later
Thank you!
Has anyone done static navmesh sometimes and dynamic others? I would like to turn on dynamic navmesh at runtime
And I don't really even need all of dynamic navmesh's functionality. I just need to update the navmesh once after spawning a bunch of meshes at runtime and then never again
@smoky summit this is likely a question for UDN tbh, not sure many people here would have done that
I think there is an inbetween setting or something of the sort where you can call when the navmesh should be rebuilt. I am use dynamic for my needs and its only occasionally that the navmesh gets rebuilt. Navmesh is rather cheap though. In death stranding they generate navmesh around an enemy ai as it paths in a fairly large radius.
thats what they did on the large scale terrain boy with his kite example
the navmesh invokers used with the deer etc.
right, yeah I see that. I don't have a large open world type environment
I'm sure there's a method on the navgenerator you could use to invoke rebuilding
yeah, digging into it now shouldn't be too hard. Looking at UNavigationSystemV1::Build and then just need to modify some engine code to allow dynamic rebuilding even when I use static everywhere else
can anyone shed light on why my enemy AI has stopped working. I had them all set up and following and attacking my character, i built more of my level. popped them back in and they just stand there.... I have rebuilt and navmesh and also all the areas around the AI are green. Any ideas?
try deleting the recast then rebuilt nav, otherwise, i dont know any sort of "little tweaks" you might have made so just look over each facet of it - Ai is still possessed properly by setting/code, that a bp link is hooked up or code commented out, etc
what is the recast? is that the navmeshboundsvolume thing? sorry im still new to all the terminology
ah i found it, let me try
yep
it worked thankyou @crimson galleon been scratching my head for a while on that one
UE4 is performing this magic trick and I need it too stop
Any ideas? ๐
(Offset navigation when I play)
Nvm
For anyone else having the problem:
"It's a bug in Unreal. Delete the RecastNavMesh in your level and rebuild the navigation."
a fix to most nav gen problems ๐
yeah recast is like a cache of the nav gen, it sort of updates but yeah, not always!
Hey there, I'd like to ask a question on how to change third person camera to another camera? The function is were an AI character moves to the player and if successful, it first does a strike animation I got my hands on the then the camera focuses on the AI. A transition does happen in it but my question is how to change cameras. I've added a camera to the AI but I can't seem to get it to react. I've structured it a couple of times but no success so can I ask anybody who'd have a solution?
Sorry, I wasn't sure if it was an AI question. I've used SetViewTargetWithBlend. I actually just got a reaction out of it but I was not the one I wanted. Instead, it just moved in the center of the player instead of the AI.
I'm not sure if that really explains what possible structure I can use. But, I'll try to see if the Event Dispatchers can sort out a trigger though that's just a guess.
Sorry, didn't mean to put it in a private text. I found something out just now. Sorry for the troubles.
I'm pretty new to AI related stuff but how would I make an AI that goes to a specific actor
What have you tried?
Have you looked at any tutorials? there are a lot for this very issue
Check out the Unreal Engine youtube channel
is there a way to set BB's key lifetime? Like some remembered location becomes invalid over time?
No
You could store a time when the BB key is set into another key and have a service that counts the second key down and expires the first key when the second reaches 0
Although it'd probably be easier doing it in the blueprint
yeah I'm handling it in code now I was just hoping to utilize BBs and BTs as much as possible
I would like to have random scoring for all items of an EQS test passing a line trace. Appearently if I set the scoring factor to a random number this will only get called once and the value gets used for all items. Any idea how I could achieve that?
I know how I can do this with a float test, but I would like to have a bool test scoring random numbers instead of 0 and 1
I guess you could create a custom test that scores things at random, although this could easily be achieved by getting a random value from the results list after the query has executed
Yeah, custom test, use random float from stream
yeah I already have a custom test and no that's not how it works if I have a bool matching test. It will only score 0 or 1, not floats.
You'd filter with one test, then score with another
will just ignore you.
I would have to iterate over all objects twice just because I can't score a random value for a bool test?
sry, you just can't read or so, same same with yesterdays discussion, is just too annoying, have a nice day or so
oh yeah fuck you too
will do it with a float test then I guess. Thanks anyway
if you don't know the answer, it's ok to just shut up and not annoy others with false information. ๐คท just saying
if you disagree with what I'm saying it doesn't mean you have to be a dick about it
disagree and false information is not the same
not being a dick still stands regardless
What he said wasn't wrong btw
thank you.
filters are meant to exclude options, scoring is meant for weighting choices. You can do both, or either one at a time
it's only half right, you have a scoring factor which will weight the score, but your test still does scoring like distance etc.
I don't think performance wise it makes much difference in your use case, because you'd be doing the raycast check to filter first.. so only viable options would then get passed onto scoring
still the question was if I can score random values for bool matching test if I have a custom test. Appearently I can't
Well, have a look at the code for them. You can do whatever you like as long as you return either a single item, or an array of items
Hmm, not sure this is correct "oil painting, half dog, half crocodile"
Well I tested it, if I wanted to score a float for a bool matching test it was still either 1 or 0
there is no scoring equation available for bool matching tests
is this a classifier result lol
I made a civilian AI, it worked earlier but later it started giving me errors
So I deleted every other function and the root cause lies in move to function.
Suggest me some solution because I don't why it's getting wrong and I have also checked up the whole internet. Nothing helped me so far.
Have you checked if your navmesh is valid?
Yes, my other AI is working fine
I have made two different AI, both are in the same navmesh
at least the second screenshot shows the position is invalid, maybe that's the problem?
tbh it's pretty hard to say, if you loooked at the navmesh visualization and it shows the mesh then the problem is somewhere else such as determining the location where the actor needs to move, it could be picking an unreachable location or something is otherwise going wrong
Nah, generated images from a newly released model by OpenAI.
ohh interesting
ah yeah now that I looked at it more closely it definitely looks generated :D
Their version looks better, but they released a reduced version for some reason
Just threw it into a google colab notebook and tried it.. more out of curiosity than anything
How do I make my BTTasks and others to display set properties and values like MoveTo task does?
I think you have to do this in C++ where you can override the function which generates that description text for it
I am writing my tasks in C++. What do I have to override again?
nvm I found
this guy
Hmm, I wonder what would be the most impactful demo to show off UE5 and cloud-based ML together. I guess something metaverse-y would be wise.
Any resources on Mass AI out yet?
apparently the code is in the UE5 source already?
But likely not a lot of use until they've got the Matrix scene out next year
Hmm, I guess having properly interactive metahumans might be a nice demo
I'm wondering if L4D's AI director would fit as a fine use case of Behavior Trees. I made a prototype on C++ with subsystems but we decided to make something that can be accessible from editor. Also maybe that can increase the modding support a little bit. I'm thinking about implementing a single BTService at the root selector and tons of states to the below, but this reminds me of zoombapup's conversation yesterday. I guess what I need exactly is a Utility System but currently none of us in the team have the energy to build it up from scratch ๐ Maybe we can consider marketplace plugins if it's the only best solution for us.
What do you guys think?
The AI director is perfect for a simple utility system, did you check Tom Looman's posts on his?
To be fair, I think there's way more you can add to the "director" concept, like the chat dialogue thing from L4D (that's another GDC video). Neither of those systems seem like a good fit for BT's, but more either utility or in the dialogue case, its more of a rule based system
I'd classify a lot of things as AI directors to be honest. Some of it is more multi-agent systems stuff like coordinating a group of individual agents for a task, I suppose more as a sort of short lived AI director
and then at the grand concept level, you could think of things like Quests and the like as AI directors ๐
There's a nice presentation about the Sims AI where they discussed using essentially time-driven behaviour blocking to enable utility based action selection which makes a lot of sense
It'd be really nice to sit down and design a UI for this kind of thing, in terms of making a really user friendly system for it
i want to fire a bullet from a paragon weapon character, so the weaon is integrated with the mesh character skeleton. I was trying to get the weapon muzzle position in the skeletal mesh to fire the bullet from there, is it clean todo this in the characterยดs event graph?
Didn't know they literally made another "director" concept for this
I made it with TMap<FGameplayTag, FDialogueData>
GameplayTag represents the happened event and value is the dialogue info
It came out of one of the valve experiment weeks, lemmie find the video
This is a clip from the "Two Bots, One Wrench" design experiment created before the start of Portal 2's development in 2008 as part of the Directed Design Experiments, set in Half-Life 2's Nova Prospekt and featured in The Final Hours of Portal 2. The bots react in real time to the player's actions. The video title is not official. http://combin...
This is a clip from the "Two Bots, One Wrench" design experiment created before the start of Portal 2's development in 2008 as part of the Directed Design Experiments, set in Half-Life 2's Nova Prospekt and featured in The Final Hours of Portal 2. The bots react in real time to the player's actions. The video title is not official. http://combin...
LMAO
This is a clip from the "Two Bots, One Wrench" design experiment created before the start of Portal 2's development in 2008 as part of the Directed Design Experiments, set in Half-Life 2's Nova Prospekt and featured in The Final Hours of Portal 2. The bots react in real time to the player's actions. The video title is not official. http://combin...
Context is funny ๐
In this classic GDC 2012 session, programmer Elan Ruskin shows a simple, uniform mechanism made for the Left 4 Dead series for tracking thousands of facts and possibilities, allowing intelligent characters to remember history, cascade from special to general cases, and select the optimal dialog, script, behavior, or animation for every situation...
So the basic idea, is that they wanted to have dynamic dialogue, which was driven by writers rather than programmers
so they have this text-based DSL which the writers use to have the sort of one-liners
and those are driven by gameplay events and interactions. So the player looking at something
They ended up using that experimental system for dialogue in the L4D series and a few other things
And honestly, it makes a lot of sense
its basically the ping-pong of dialogue, but with conditional branching and some really neat interval arithmetic representations
I mean those dumb videos they did using stock assets and some dumb but fun dialogue are easily some of the most expressive AI characters I've ever seen in a game ๐
feels totally natural, works in live context, doesn't get too wonky in practice, easy to code.
2012 and we still don't have anything better in 2021 ๐
Explains why Valve was the most beautiful game dev company once upon a time
Also there is too much low-level info there
I need to study this on my free time with some focus
There was a website that had some slides somewhere too
anybody please?
Yes
although, if you're animating the weapon your aim will go all over the place
unless that's what you want?
usually, you'd make it so the weapon is seperated with attach points for where the hands should connect, then IK the hand to the weapon, so the weapon doesn't get all wonky with animations
And generally, most games want to be able to switch weapons, so having it be part of the character ain't a good option
But yes, always setup in the character blueprint anyway
i want to read the skeleton weapon muzzle position from the character's event graph, but 1) im not sure if this is a clean solution 2) from the ahcracters's event graph i dont find a way to get that bone position unless i use some index
Well, the weapon itself would be a component on the character right, so just get that component, look up the bone position and you're good
i know that is better to have the weapon separated, but this firing animations use that skeletal integrated weapon in the mesh of the character, and seems messy to split them, and i dont find a proper documentation to do so
ok, i will try ur solution, ta a lot ๐
Hello, I have a AI BT that goes into a loop delay until a blackboard key is true.
In a separate class I have an event that is called that checks to see if a reference to the ai and its blackboard are valid, and if so it sets the boolean value to true which should end the loop and continute on with the rest of the BT sequence.
However the rest of the BT is never executed. I have added print strings to see if the event is fired and to also make sure the references are valid and they are all good. What can I do?
Why are you using a loop?
I want the AI to wait in a line until the player is at the register.
so just have a branch that waits, you don't need to loop it, it'll loop by virtual of nothing else being higher priority
This is what I have. Once the Can Purchase is set to true, the wait loop should break and do the PurchaseItems task.
What is the parent node type?
sequence
hmm, so does the condition return true?
The one that is supposed to set the blackboard value? Yes.
personally, I'd refactor it.. I'd have another node as parent of the wait and the purchase items, I'd make the wait the lowest priority and the purchaseitems higher priority with a condition "can puchase items" being true that would abort the wait
I'd also only call enterqueue if the queue is available and I'm not in a queue, not in a sequence
but not sure where your conditional wouldn't complete and then continue the sequence
So Ive done this now. EnterQueue calls a function that checks for any queues that are avaible and if not, it will just join a random one so I know the return on it will be valid. How would I make this loop though until the can purchase is true?
your wait and the purchaseitems are the wrong way round.. purchase items should be to the left (highest priority left to right)
then if it runs that sequence, it'll wait UNTIL can purchase becomes true, in which case it'd run the purchase items node
and it shouldn't be a sequence, it should be a selector
Ok so for this, do I even need the wait then if its already going to wait to run the PruchaseItems task once the can purchase variable is true?
well, your wait task might do something like play an animation right?
in general, I have a sort of default "idle" node that just continues a looping animation
See this is where I dont really know how to do the wait. The wait was there so that I could loop it until that value became true, so that it would then stop looping the wait and continue with the sequence.
plus its good to see that its entering the correct nodes in the tree
not sure what channel you meant to ask in but i'm sure it wasn't this one ๐
Sorry๐
Unity version of earlier dialogue discussion: https://www.youtube.com/watch?v=wj-2vbiyHnI
In this 2017 GDC session, Unity's William Armstrong and Campo Santo's Patrick Ewing discuss the logic, tools, and workflow behind the dialog system used on Firewatch.
Register for GDC: https://ubm.io/2yWXW38
Join the GDC mailing list: http://www.gdconf.com/subscribe
Follow GDC on Twitter: https://twitter.com/Official_GDC
GDC talks cover a r...
Just came to the half of the video
My mind blew
Those guys are geniuses
Gonna watch Unity version after this
yeah, its kinda neat isn't it
I'd read about the interval arithmatic trick before, in Ian Horswill's stuff on constraint satisfaction solvers.. but this was a really neat way to do rule matching and so simple!
Anyone have any suggestions for how to make an AI not move in a straight line towards a location? It'd be nice if there was some system that allowed AI to apply some sort of wave so it appears AI is moving more naturally instead of a straight line towards the location which is boring. I don't know if this is something we can do in AI Code or do we have to have an animation blendspace for this?
wave? what you want them to conga?
anything different then a simple line lol
well define "not a simple line" then? what do you think they should do?
I literally just explained and you seemed to get the point, but essentially just sway left-right-center randomly
I'm just not sure how its meant to look.. I mean people don't just sway. You mean like local avoidance or what?
swaying suggests they're drunk
if you walk to a door in a building, you dont walk in a straight line, you sometimes end up drifting towards the left a little or to the right
I just want to know best way to modify their movement behavior to the location, to alter it slightly, for example, just move the AI a little to the left over time instead of completely straight
well, you avoid obstacles yes. But you don't sway. But either way, if you want to do that, you'd have to probably change something like the DetourCrowdFollowingComponent to add something to its avoidance offset
nothing in UE by default that'd do that
well I could probably do something in anim blendspace I'm thinking
was hoping to see other thoughts tho
Maybe find a game that does what you want so we can all visualize it?
im kinda thinking of gta 4 where there is some natural sway
but i think thats character anim + camera, not the collider necessarily
You mean the morpheme stuff?
i dunno what it called, when you run the character has more of a reaction to their footsteps, since they do have physics-anim influence
got a video clip? I mean I've seen the morpheme balance controller stuff, but no "sway" ๐
I mean you can add weight to the animations sure
Maybe something like this lol
So you want everyone to walk like a zombie? oooohkaaay ๐
not exactly, but you can clearly see they are moving slightly left/right, dont go to extreme of them stuttering, you get the point ๐
If you don't like the idea, I get it, you don't need to be passive aggressive
Well, you could use animations with root motion I guess
I'm not being passive agressive, I'm trying to understand what you're after
nah this is pretty clear
sounded like zoom realized what you are finally after
could you not add some "sway" as it moves or is this more reactionary?
I don't think you'll find any examples of that in a normal game though, unless you can find an example where we can figure out what is doing it
I suggested already, blendspace i think will be better
sorry, i meant sway procedurally, like through code
i was hoping in some sort of MoveTo function in ue4 we could do something slightly different
like affect its forward velocity by taking a small amount to influence left or right or something
it'd be cool if the AI wasn't absolutely perfect moving to a location
Well, you could enable physics a little bit on the body.. that will give you some.. weird motion
lol they dont
what game do you play that doesnt perfectly move to a location?
nah im getting at the ai navigation is pretty bland
There's an example of that in the content examples
more details of what context examples are?
i get what you mean though, if its an open area with no obstacles and they move in a straightline you want some kind of sway - so for what characteristic? zombie? drunk?
its a UE level pack with content examples for different UE features, its in the learn tab of the launcher for some weird reason
there's an animation example where you can enable physics based animation as a blend between driven anim and physics
I don't think it should really matter, but drunk would be ok, the main thing I am after is just how to move them in anyway while moving lol, if we figure that out, it doesnt matter what characteristic
to me, knowing what that is would help to decide which systems are most appropriate, id rather not play some guessing game about all the systems available so you can decide if you like it or not
Does it not make sense to simple describe the problem as moving the location of the character along the x or Y axis as it moves to a target location? I can't describe it better then that
You can definitely do the drunk thing with Morpheme in GTA
then i would assume animation is not ideal since it sounds like you want this to be contextual, a solve all type of motion
- AI MOVE to (100, 100, 0). so the optimal steps would be like (0, 0, 0), (25, 25,0) (50,50,0) (75,75,0) (100, 100, 0)
but in my suggestion it would look like (0, 0, 0), (20, 20,0) (55,55,0) (80,70,0) (100, 100, 0)
Well, try it and let us know how it works out ๐
the way navigation was done in Death Stranding, for enemies, was to define the destination on navmesh and as it paths, generate waypoints to move to
honestly the best i can offer
that's an interesting idea
at this point i need diagrams or pictures and more detail about the idea
how would you generate waypoints?
game genre, size of character, speed, animation assets
thats where ~~the ~~your problem solving comes in ๐
simple drawing, does that make sense?
unreal engine today just draws a line straight from starting point to end point
yes, for obvious reason. now introduce an obstacle, how does ai solve that? two obstacles? hallways? making turns?
same idea
i get what you want, but its not going to look good without considering navigation cases
it just moves in a wave like this, very slightly, it would look good if you do it slightly, obviously if you do it in big deviations it would look weird
as i mentioned earlier, affect the velocity by adding some to left/right or else waypoints
i am thinking of just doing it in animation bp lol
if you want me to do the work for you, then we can talk about my consultation fees first
huh lol, nah i never suggested for you to do anything like that, anyway appreciate the listening
i think i did more than listen
yeah idk what you wanna call it but you did help
I and zoom provided you with advice and essentially consulted your design problem by providing several solutions
I don't know if you have a problem, but I literally thanked you guys, if you're looking for a job you can check out #freelance-jobs #salary-jobs
would rather have the last half hour of my life back
You need to mess with path following component
Or just add anim montages ๐คทโโ๏ธ
just arbitrarily apply some small force that wavers over time to the character while they're moving
and make getting randomly caught up on level features a core part of your gameplay somehow
literally mentioned this twice
If something extremely detailed needed you can also limit the distance from followed path so if force made ur pawn far away from path u can add force to the path back
Or if you dont have gigantic amount of AIs make them follow splines
just deal with spline generation math instead
Orrr... just have montages with fancy movement animations and play them to make it look realistically? ๐คทโโ๏ธ
Ulntax appreciate it, I think the simplest thing for me to do is do in an animbp and move the location of the AI character slightly every time theyre moving so apply ranges from (-5,-5,0) to (5,5,0)
one does not simply navigate with splines etc. etc.
also Hojo thanks for the suggestion as well
anyway yada yada it's likely going to be a terrible idea and you're likely going to hate it, but hey no harm in trying
yeah lol it's fun discussing ideas anyway, always trying to learn
Hey HoJo, while you are here.. Can you mention how difficult was it to build your utility AI from scratch? ๐
I'm about to swamp into utility AI idea soon
it can be really really hard or just kinda hard. it depends on your stretch goals. for example it's really hard to come up with a good system that gives you a lot of flexibility. not sure how to describe it yet. like, most internet sources I found use a godclass for entity info, and then the entire utility system just uses whatever is in that godclass. so if your game has humans, and dropped weapons, an AI would judge actions for either of those targets using the same knowledge struct... "position, health, facing direction", stuff like that. It was tough coming up with systems that let me break out of that nasty hardcoding and assign arbitrary knowledge sets to specific things. but if your game is relatively less complex and you can accept some sacrifices on stuff like that, the basic idea isn't extremely complicated
the other major major major hurdle is just tooling
it's easy to underappreciate just how much tooling you have if you just use epic's BT system
So generally if it's a generic system that made to serve every situation its gets harder but if it can be scoped it could be easier
yeah. it was fun seeing it come to life and start actually moving guys around and eventually shooting and stuff, i'll say that much. it was not really a wise financial decision ๐
but i'm hoping to rewrite it and either sell it or opensource it eventually (probably late 2022) and hopefully use it for several projects, long game junk
Oh I see.. From your past messages on this discord I knew it's kinda complex and unfinished so I can imagine
Thanks for sharing your journey ๐
Now it's my turn to suffer
Why not try Tom loomans utility system?
I will, though I didn't see he shared any links about it?
It was just demonstrating a concept
I thought he posted the code on github didn't he?
Hmm, let me double check, I might be wrong
i don't think there's any really full-fat utility ai releases for UE anywhere really, though i haven't looked around in well over a year
I've seen one recently.. can't remember where though ๐
i might put mine up on github sometime soon as-is, it's far from what i would call full production ready and written with some things that vet coders would call nasty... but might help inspire anyway 
and it didn't look pretty, so I moved on ๐
Hello, quick question. In my game there will be multiple registers where AI customers can go to and purchase their items. Now I need some sort of way for the register to constantly check if an employee is present so the customer first in line can purchase.
My idea is a function that loops every second on begin play set by a timer that checks if an employee is present, and if so, set a blackboard value to true of the customer that is first in line. Would this be too much?
So this is how the branch works right now. I only want the PurchaseItems task to run if Can Purchase is true. However, if its not true I would like it to wait until it is true to continue to the next selector. I looked at the services however, there is no way to make it wait until the value is true, just check a value and set it per say every x seconds.
Okay and what is this idea for this tree?
So there is a first stage of this boss and then after some condition it goes into second stage?
Looks okay to me
They run at a modified tick
They execute after the conditions of its node
You could have a service to check distance to player which decorators can check within those branches of the tree
They fit in for checking the state of something often
Or to perform something that needs repetition within a branch
A service i have for example, checks distance to player. Its on a selector and below it are decorators that can fire if that distance is within a certain value. While the service runs, it updates that distance. If the player is too far the bt chooses to move. If the player is close enough the bt instead attacks.
Now with this, is there anything else that you have going on as Im trying to see if this would fit in my game.
Yeah i guess so just trying to illustrate a use for a service
I would (and do) have it run when they know to seek thr player, ie, not while they are wandering around mindlessly
I do use ai perception though and this is what determines player detection
They are tricky, theres plenty of nuances
Ive watched a lot of the ai tuts over the years and think this one explained the workflow and tools very well without being as overwhelming as some others but also enough to get past an ai that just moves in a straight line https://youtu.be/iY1jnFvHgbE
In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.
By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...
What happens with an execution of a branch when a decorator on a higher priority node aborts a lower priority branch? Is the whole lower priority branch aborted? What if it is the last branch of the the last selector - does it mean whole tree execution (or Run Behavior Dynamic) executed with fail result? Or is the control immediately swapped to higher priority branch with the decorator?
the higher priority will abort whatever task is currently active in the lower branch. If the condition of the higher priority branch allows it to execute, it will, but if the condition of the higher priority happens, which aborts the lower, and it cannot execute itself, nothing in the tree will fire. There's should always be a state it can go to if no others are true
but if the condition of the higher priority happens, which aborts the lower, and it cannot execute itself, nothing in the tree will fire.
so if the higher priority branch can execute itself right after aborting lower priority, the whole tree won't be re-executed from the root down to the newly active high priority branch? The tree will just immediately shift its execution to another branch without reevaluating every task and decorator above it?
I think you got some of your selectors and sequences mixed up. Shouldn't charging an attack and performing the attack be a sequence not a selector?
Also, your root node should be a selector not a sequence
and the probe should be to the right as its lower priority
you should always have the "do something default" part on the right as lower priority
then as events change the BB, higher priority branches can take over if available
the main thing to grasp, is that concept of selectors selecting based on priority in left-to-right order and then conditions making the different branches fail to be selected to run or allowing them to run as BB values change
so sorting out your priority order first is a good idea, then thinking about how behaviour splits based on conditionality
for instance, you cant ever fire a gun if you don't have one, so you might have a "has weapon" condition that completely disables a subtree that allows you to shoot and whatnot
so I usually start by mapping out what my lowest priority is going to be.. and work up from there, adding subtrees for higher priority tasks as I go
but the thing is to consider where the tree splits, usually it has some condition that splits behaviour into branches, for instance, you might have that "has weapon" condition split into two branches, one for if the has weapon condition is true, another where it falls back to hand-to-hand as lower priority if the has weapon isn't true
I can see that this whole concept of BT's is kind of tricky for people to grasp, and there's a bunch of nuanced issues with the UE implementation of them for sure. Will have to think about that
We're likely going to be running an AI focussed games programming degree, so some of this stuff I'll have to map out and write tutorials for (and probably reimplement so its not quite so tricky to use)
im not too sure... the blue framed nodes will be aborted, it steps up the branch to switch to the higher priority but as for the entire tree being re-evaluated i cant say. Based on prioritization, it shouldnt matter since the conditions climb back up the tree (towards the higher priority branches) so if the tree does re-evaluated from the root, it should end up at the same place even if it doesnt. The tree and the debugger happen faster than i can see it changing.
Typically in other BT implementations we usually start evaluating the tree from the root, but I believe Mieszko for whatever reason didn't do that, so it might start part-way into the tree and evaluate from there.
One of those quirks of UE implementation
odd, but by design, it shouldnt matter, or at least that doesn't sound like something to utilize
I guess it depends on how the cleanup of a running branch works, I've not looked at that code for a while, but there were some oddities in there if I recall.. something about how they unwound the stack of tasks
he was trying to make it this super efficient event driven thing, but ended up causing more pain than it was worth IMHO ๐
i take your word on it, still getting to grips with it and applying the concepts ive read about - i assume BTs are just another FSM, but they sound a little different and some of the features are..... well enigmatic at times
can i use 2 BT's to one AI
You're trying to wind me up ๐ They are NOT fsm ๐
technically they're called teleoreactive systems
Is MoveTo task with vector BB key dependent on navmesh? Could it be possible that MoveTo Vector task fails because a physics-enabled actor is located at the specified position and it cuts a hole in the navmesh? I want my AI to remember a place where some physics actor was and at some time later go to remembered position instead of just remembering the actor and MoveTo'ing it even though at that time the physics actor might have been moved somewhere far away and the AI couldn't have known about it
It depends. MoveTo uses navmesh, yes. Another actor which modifies or blocks the navigation somehow can cause it to fail. If you have a sufficiently high accept radius, it should help though, as then it will accept a position that's not exactly the destination point
You can maybe also use project to navigation to project the destination point to the closest point that's on the navmesh
you mean this thing?
Yeah
ok thx I'll try
also is there a way to make navmesh ignore some actors? like I'd like to navmesh to ignore some cardboard boxes laying all over my level because they have physics enabled and a character will flip them over anyway if he walks through them
Yeah there's a flag called cannot affect navigation or something along those lines
this is on primitive components, if you turn it off it will not affect navmesh generation
cool, thanks
I wonder if anyone is interested in genetic algorithms for UE, might be a fun project
I guess the UE community isn't really into AI so much ๐ apart from a few here
What could be the cause of the capsule changing size and the skeletal mesh moving?
Its not supposed to be like this
but this
I figured it @ocean wren
It was because i was using crouch, and havent changed the default capsule half height for crouch in the character movement
crouch? with a pidgeon?
Haha ikr, just used as a function for something else since crouch is convenient
I shudder to think ๐
How do I make a latent BT Task in C++ like MoveTo? Do I just return EBTNodeResult::InProgress on ExecuteTask override and then at some moment (timer/delegate callback) just call FinishLatentTask?
yeah I guess that's it
hot damn, either i missed this in the docs or havent dug deep enough to find this out. I guess they would only abort their branch to switch to higher priority and not re-evaluate the entire tree again
id be down to learn or work with, but i dont know what im really signing up for ๐
Sorry, was thinking aloud if people generally would be interested in AI stuff for UE
it seems a bit too niche you know? loads of people are doing things like materials or blueprints, but like a few dozen maybe do AI ๐
yeah, hence my interest ๐
you're miles ahead of me though on this stuff, i just got into it this year
I'll probably put together a few different AI systems, seems like we're going to be running a game AI programme next year
right, yeah, I tend to teach my students C++ and doing game AI as a specialism would be kind of easy (I've taught it for years)
yeah, we'd do some in Unity too
I'm trying to wean them off relying on Unity for everything, but its a struggle ๐
when students have a low end laptop, Unreal aint to friendly on it
for those with towers, no prob
yeah, true. But then if you're doing Comp-Sci or Games Comp, you should at least invest in a decent PC
Right now that's a bit of a thorny issue to be honest ๐
i teach 3d art and animation, but i still agree, wish my college would spec for better than bare minimum
they always hit the barrier at rendering
We just got our labs refurbished with 3060 and 3070's but that was a miracle
damn yeah, i was just seeing the prices for them last night
they're abnormally priced
We had to buy like 450 of them? something like that.. it was pricy ๐
University of Lincoln, in the UK
dope
Things are definitely weird right now
too many cryptominers
never would have expected a gpu to be used for something... not gpu related
What if... the next ai can do cryptomining in-game !
Id be interested in diving deeper into ai aswell, but time constraints are real
Letting ai in-game evolve/get smarter/self optimize would be pretty cool. I've wanted to do that for a while , with some neural net adoption
Was inspired by a game from the 90s
https://www.alanzucconi.com/2020/07/27/the-ai-of-creatures/ for anyone interested
You did?
Indeed
Not the most fun game i've tried by any mesure
But i was facinated by the ai
Yeah, back when I was subbing for a small company we were doing ports for them and that was one of them
Toby Simpson I think wrote it?
or Toby Gard? certainly a Toby
Millenium! that's the company.. wow, my memory is shot
๐
I remember him demoing the game when we went down.. on an amiga CD32, one of the preproduction units, it had a rubber leg missing, so it wobbled.. had to add something on the CD tray to keep the lid closed ๐
Prett coom that you've been involved with it and remember this
Pretty random game imo
Yeah it was kinda random to me at the time, we were doing the megadrive and snes ports
through a guy who used to work at Gremlin that my mate Martin knew
The hw avaliable at the time is also part of what made me want to chase down this road, due to how mich more power we have avaliable even in our phones these days
It's not obvious to me that a game with self learning ai would be very fun tho
Yeah, but those games were all written in assembler, not the massive bloatware we're using now ๐
Fair enough :p
self learning? maybe not.. but then maybe there IS some value there
Well... player-learned? ๐
As it were in that game
Players are also the worst losers, and a relatively smart ai could easily make a game a very bad experience for the player :p
Good ai != fun ai and so on
As Soren Johnson says so well :p
I dunno, how else do we make progress other than trying?
We can maybe learn to lose occasionally?
Possibly..
But its so burnt-in for players to be better than the ai, i think its expected
Yeah, but we can do something unique right, in the AI space and it can be different than everything else because of it?
It's definetly possible
I keep thinking about mount and blade, its so unique and was just that innovation that made it for me
We could simply redefine what difficult is ment to be :p ai ment to be very challenging even for relatively good players
Most games ive seen trying this is more about boosting stats to wild amounts tho.. instead of clever ai .. not saying the latter is easy to do but the first is sort of too easy
"You play on hard mode, so any hit kills you" is just .. idk
Sounds like i should try mount and blade
I'm kind of interested in trying new things with game AI outside of the usual systems stuff
mount and blade was unique, try it and you'll see
Probably going to focus on making interactive metahumans (voice interactions, reactive animations etc)
There was also this silly idea of d&d
An ai driven speech recognizer with some clever spawning
Dungeonmaster basically just explains the scenery, and it automagically gets added in-game, close to real-time
speech recognition is pretty trivial now, its the speech synthesis I need to work out ๐
right gotcha.. yeah, I'm doing something similar, but from images
NLP wise, you can extract entities and attributes, so it would be possible to spawn in stuff you described, I just prefer doing it with images and videos ๐
I imagine parsing of such text would be relatively slow tho, granting a pretty bad experience ?
Sounds cool tho
its not immediate, but you wouldn't notice the lag
its generating the vocal response that takes the processing time
Maybe its worth checking out again then^^ tried it a while ago with a plugin but it struggled to even parse simple letters or numbers
Then again it was a pretty random plugin
They got silly powerfull stuff for sure
yeah, including their magenta synthetic voices
I've built similar stuff using Microsoft Azure cognitive services stuff in one of my cloud development classes
so building this kind of thing isn't that hard
Add a VR headset to it and we have a full blown game already
Sounds like a classs i should attend in thr future really
believe it or not, we're doing it for VR too ๐
Cover some interesting topics :)
we're becoming more meta ๐
Well damn. Guess i shouldnt be surprised really
Thing is, nobody is really trying that much.. they're all to busy doing shitty crypto stuff
and fucking NFT's
Damn NFTs
Is that were we wanna be heading really...
To some fictional item that is anchored in bits in some cloud?
Crypto ruined the gpu market :-/ along with scalpers here atleast
its because all the speculator worms are crawling out of the woodwork as they've got nothing better to do
I hope the skuttle back into the shadows soon, but probably wont
+1
That and the goddam crypto miners destroying the GPU market.. they can all fry in hell ๐