Quantcast
Channel: SteelGolem's Ano Sekai » AI
Viewing all articles
Browse latest Browse all 7

NPC AI code

$
0
0

I spent the night coding the NPC wanderer AI and I’ve managed to get satisfactory results. I want to make a video tomorrow, because it’s better to actually see something like this in action rather than looking at pictures of it. That said, here’s a pic:

Some random points:

  • limit of 1 town center block; no spawning without it
  • time between spawns: 5 seconds
  • spawn distance from town center: 32 blocks, or 2 chunks
  • town limit from town center: 16 blocks, or 1 chunk
  • time between NPC nextThink calls: 1 second

Of course all of these values are for testing purposes, I’ll be changing them to suit the game as things are built.

I did a couple of retarded things while I was coding, which I’ll go over in the video. I’ll end this post with another picture:



Viewing all articles
Browse latest Browse all 7

Trending Articles