potentialEnemy

DT: Enemy Placement

Hey everyone, Alpha 15 is almost out the door! It’s been a challenge, but also a pleasure, to spend six whole weeks working on performance, stability, and correctness, and we really appreciate your support through it. In previous releases we heard so often “this game would be so good if I could just play without getting… (insert issue)” and we really do believe this is our most playable (and most backwards compatible) release yet.

This week, let’s take a look at one of Albert’s key performance and correctness features for this release: namely, his new mechanism for placing enemies, encounters, and immigrants just outside of your town.

Enemy Placement

Recap from the video:

  • Albert is working on A16 already. Stay tuned!
  • We used to have 3 “near town” placement algorithms. They are now all collapsed onto one more efficient and thorough algorithm!
  • Putting down houses, farms, and stockpiles causes the area around them to be marked as your territory.
  • When we want to put down a new encounter, we draw a convex polygon around these items, and pick a random point on it
  • We also calculate a center point for your territory
  • To put down the encounter/enemy/new hearthling, we start at the random point on the “convex hull” and walk from it out into the wilderness, away from the centroid. When we find a spot that is not in your territory, not underwater, not in a mine, and that is the right size, we put the new item down there.
  • This means that if you’ve got really spread out towns, stuff may still spawn inside them, but the chances are much reduced.

Other Announcements

Tuesday’s stream will start a little early, at 5:30PST, due to scheduling challenges. Wednesday’s morning stream is cancelled, on account of Game Developer’s Conference in San Francisco, which some of us are attending this year! Thursday’s stream will happen at the usual time.

Look for A15 stable soon!