Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

map_update_response add fov #19

Open
Oipo opened this issue Oct 4, 2019 · 1 comment
Open

map_update_response add fov #19

Oipo opened this issue Oct 4, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Oipo
Copy link
Contributor

Oipo commented Oct 4, 2019

Add calculated fov for the clients. Current suggestion for map_update_response:

{
  "npcs": [/* list of visible npcs here */]
  "x": /* x position of player */
  "y": /* y position of player */
  "fov": [] /* a 9x9 array of 0 or 1 values. Center of array indicates player position (see above), can extend beyond map boundaries as center is always player position. */
}

Example fov of a player standing on position (0, 0) of a map without obstacles:

111110000111110000111110000111110000111110000000000000000000000000000000000000000

Array access can be determined by x + y * 9.

@Oipo Oipo added the enhancement New feature or request label Oct 4, 2019
@seiyria
Copy link
Member

seiyria commented Oct 4, 2019

FoV should have these values:

0 - visible, no darkness
1 - semi-visible, darkness (this is if you can see in the dark, and the darkness spell is cast here)
2 - reserved
3 - actual fov blocking

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants