Line of Sight

Was considering what would be the best way to do this. LOS in Ultima 6 is weird since it seems to be location-based (once you open a door you can see the room inside), but you can see through walls (some times?).

I thought just replicating it for the sake of it didn’t make sense and would bring more complexity for map handling and editing. So instead I went for a full system with opaque tiles, so you just have to define the tile as opaque and the engine takes care of the rest.

The current implementation is a pretty simple raycasting, and a mask drawn over the map. It works almost great except the tweening of the mask moving is not in sync with the camera tweening, which causes some small artifacts in the mask border.

fov3fov2fov1

One thought on “Line of Sight

  1. Pingback: OpenArthurianX6, Line of Sight – Slashie's Journal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s