Showing results for on bfnightly.bracketproductions.com
Bringing NPCs to Life
About this tutorial
This tutorial is free and open source, and all code uses the MIT license - so you are...
About this tutorial
This tutorial is free and open source, and all code uses the MIT license - so you are...
...You can achieve a considerable increase in apparent AI intelligence (it's still quite dumb!) by giving NPCs goals - and having the goal last...
...In this chapter, we'll populate it with NPCs and Props. We'll introduce some new AI types to handle friendly or neutral NPCs...
...0 }, }) .marked::<SimpleMarker<SerializeMe>>() .build() } }
Attributes for NPCs
We probably don't want to have to write out every single attribute for every NPC...
Attributes for NPCs
We probably don't want to have to write out every single attribute for every NPC...
...Ideally, NPC AI should be more intelligent than a rock.
Story
This is not a story heavy game (Roguelikes are frequently shorter in story...
Story
This is not a story heavy game (Roguelikes are frequently shorter in story...
...Here's the NPC definition:
{
"name" : "Bandit",
"renderable": {
"glyph" : "â»",
{
"name" : "Bandit",
"renderable": {
"glyph" : "â»",
...we're starting to need entity spawns to trigger other entity spawns (for example, spawning an NPC with equipment - below - or spawning a chest...
...Populating the caverns
The caverns are pretty playable as-is, but they don't really match what we've described in terms of NPCs...
The caverns are pretty playable as-is, but they don't really match what we've described in terms of NPCs...
...Make a new file, ai/encumbrance_system.rs
(and include mod
and pub use
statements in ai/mod.rs
):
(and include mod
and pub use
statements in ai/mod.rs
):
...We're doing something very similar in ai/encumbrance_system.rs
- so that's the natural place to slot it in. We'll add a...
- so that's the natural place to slot it in. We'll add a...