Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lighting overlay. #31260

Merged
merged 24 commits into from Oct 7, 2019
Merged

Add lighting overlay. #31260

merged 24 commits into from Oct 7, 2019

Conversation

neitsa
Copy link
Contributor

@neitsa neitsa commented Jun 8, 2019

Summary

SUMMARY: Features "Add lighting overlay (debug menu)"

Purpose of change

Add lighting overlay for various lighting conditions.

  • Add global lighting overlay (basically what are the final lighting conditions the player sees).
  • Add lighting contributions (player / ambient / cached / etc.)

Describe the solution

  • Global lighting (that is, what is the lighting the player sees). Numbers on each tile indicate the lightning condition as calculated by the game:
    • 1.0: fully light.
    • 11.0: completely dark.

image

Goes from pure white (fully illuminated) to pure blue (complete dark):

image

  • Refactored code for toggling the various overlays. Since you have to flip a boolean (and flip all other overlays to off), it became difficult to toggle off/on all the overlays. Added two functions: the first one (display_toggle_overlay) toggle the required overlay to on/off and all the others to off; the other function (display_overlay_state) get the state of an overlay (on/off).

Describe alternatives you've considered

N/A.

Additional context

I like heatmaps going from blue to red (aka “rainbow” scale) but according to some people (1, 2) they might be difficult to read due to how we perceive colors. I decided to switch from white to blue instead.

- Refactor code around boolean for the overlays; make it easy to toggle an overlay.
@ifreund ifreund added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. labels Jun 9, 2019
@ZhilkinSerg ZhilkinSerg self-assigned this Jun 9, 2019
@Night-Pryanik
Copy link
Contributor

This thing looks good even for the game itself, debug menu could only show numbers.

@ZhilkinSerg ZhilkinSerg removed their assignment Jun 15, 2019
@stale
Copy link

stale bot commented Jul 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Jul 27, 2019
@stale
Copy link

stale bot commented Sep 20, 2019

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

@stale stale bot closed this Sep 20, 2019
@ZhilkinSerg ZhilkinSerg reopened this Oct 7, 2019
@stale stale bot removed the stale Closed for lack of activity, but still valid. label Oct 7, 2019
@ZhilkinSerg ZhilkinSerg marked this pull request as ready for review October 7, 2019 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing Info / User Interface Game - player communication, menus, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants