Updates to walls!

So… um… the game’s walls have been broken for a really long time. They’ve been on my “must fix” list for ages (but somehow were overlooked when I was writing up the task list for the Milestone 14 build; I’m retroactively adding them to it!)

There have been two main problems with walls:

  1. They don’t render correctly.
  2. They aren’t integrated with the pathfinding, so people walk right through them.

Here’s what walls used to look like:

There’s all sorts of stuff wrong here. Shadows make them go translucent. They’re not z-buffering correctly. And they’re drawing in black, instead of gray. Also, they’re not casting shadows (not really visible here), aren’t receiving shadows, aren’t affected by point lights, and are using a simplistic lighting model that dates back to the earliest milestone builds of MMORPG Tycoon 2. Thoroughly broken.

I’ve now made them work, and render using our modern shaders; the same shading code that affects basically all other lit objects in the world. They both cast shadows, and receive them. And if there are point lights near them (generally only happens in combat right now), then they’re affected by those.

Here’s a shot of the now-fixed walls. They now light up correctly and cast/receive shadows, and they’re also now registering their obstructions with the pathfinding system, so that subscribers generally won’t walk through them any more. Here’s a shot of fixed lighting, with impassable obstructions drawn in white, for debugging purposes:

(Note that some of the large obstruction shapes you see on the left and right sides of the screen are generated by impassable terrain, and those are being drawn several hundred meters below the terrain. They actually are in the right place, just… drawing far below the ground, so it looks wrong from this vantage point)

Fixed walls will be coming later tonight, in the actual last build before Milestone 14. I didn’t want to send out Milestone 14 with the broken walls we’ve had since the big lighting update several months ago. :smiley:

(I still plan to make the walls actually look nice, but that will require artist assistance. Right now, I’m just concerned with making them not be outright-broken any more).