Opened 8 years ago

Last modified 8 years ago

#3634 closed enhancement

LoS improvements — at Initial Version

Reported by: Palaxin Owned by:
Priority: If Time Permits Milestone:
Component: UI & Simulation Keywords:
Cc: Patch:

Description

It would be nice if the line of sight depended on the surrouding terrain, buildings and other big obstacles. Also the field of view could get a more realistic shape.

This would provide a more strategic role for line of sight, I can think of situations like

  • scouting an enemy army without being seen
  • sneaking from behind to an enemy
  • more realistic guerilla warfare between (blocks of) buildings

Terrain

  • Simple: adjust LoS like archer's range
  • Advanced: units cannot see behind hills/mountains, on top of a plateau (when standing on a lower place) or at the bottom of deep gorges (if not standing at the cliff's edge)

Objects

  • Simple: units get an LoS Bonus when garrisoned on a wall (also tower, fortress or ship if implemented)
  • Advanced: Buildings and gaia elements like rocks with their height above the unit's eyes (human ~1.5m, mounted units ~2.5m, units on elephants ~4m, units on ships, buildings and siege towers perhaps even more) block the vision behind them.
  • Fancy: even if the obstacle's height is below the eyes' height there should be invisible area behind them like shadow is not "visible" for the sun; also smaller objects like trees or large animals could partially block vision (I don't know if this would demand too much resources for a large amount of units and therefore lead to game lags)

Field of View

Humans have a field of view of about 180° with decreasing vision quality at the edges. Animals have various angles and therefore a field of view in the shape of circular sectors. Actually I think it is debatable if animals should have an LoS since they can't communicate and therefore can't provide information - perhaps they could show some passive reaction if they detect something interesting?

  • Simple: LoS offset towards the current viewing direction
  • Advanced: semicircle LoS for humans and other circular sectors for animals (if they have LoS)
  • Fancy: modified "semicircle" LoS with less vision range at the edges e.g. vision range is described by something like r(θ)=sin(θ)*R for 0<=θ<=π where R=r(θ=π/2)=r(θ=90°) is the vision range straight forward. For animals the sine function would have to be stretched to match the specific maximum angle.

Change History (0)

Note: See TracTickets for help on using tickets.