Day 48 – Field Of View: Part 2

Continued work on the field of view for the past two days. I added the difference between what player and what enemy characters see.

The player’s field of view matches with the fog of war: anything inside a clear area – where the fog is lifted – will be visible. This corresponds with each soldier having a circular FOV. This also means that the enemy can’t sneak up behind you.

Of course I do want the player to be able to sneak up behind enemy, so enemy characters have a more limited FOV. Only when a soldier enters the smaller FOV will they be seen by the enemy. However, once spotted, they will remain seen as long as they are inside the larger fog of war range.

For testing purposes I also visualize what the AI sees on their turn, so I can check it all manually.

Shows the field of view difference between enemy or player characters.

I also added some battle log notifications so I see whenever a characters goes in or out of sight of another. You can see the FOV and battle log changes in action in the video.

For the player it’s pretty straightforward. Whatever any character sees, the entire player squad sees. I’m not sure yet if I’m going to use the same mechanic for the enemy. It would imply all enemies becoming aware of an opponent as soon as the opponent is seen by a single enemy. I’ll have to see how that plays out later.

Gamedev Diary Knock-On Effect

Leave a Reply

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

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

Facebook photo

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

Connecting to %s

%d bloggers like this: