Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Fog of vision implementation #41

Merged
merged 6 commits into from Feb 1, 2021
Merged

Fog of vision implementation #41

merged 6 commits into from Feb 1, 2021

Conversation

rodrigocam
Copy link
Collaborator

Implements a minimal fog of vision where each unit with a LineOfSight component is able to see tiles in a pre-defined range. This PR depends on AnneKitsune/minigene#1.

@rodrigocam rodrigocam marked this pull request as draft January 25, 2021 19:31
@rodrigocam rodrigocam changed the title Fog of vision implementation [WIP] Fog of vision implementation Jan 25, 2021
@rodrigocam
Copy link
Collaborator Author

Currently 50% darkness fog. fog2

@rodrigocam rodrigocam marked this pull request as ready for review January 26, 2021 15:03
@rodrigocam rodrigocam changed the title [WIP] Fog of vision implementation Fog of vision implementation Jan 26, 2021
@erlend-sh
Copy link
Contributor

erlend-sh commented Jan 26, 2021

Can we see what 30% and 10% darkness looks like? I suspect we can set it quite low.

@rodrigocam
Copy link
Collaborator Author

rodrigocam commented Jan 27, 2021

I'm using the tint param of pub fn add_sprite(&mut self, destination: Rect, z_order: i32, tint: RGBA, index: usize). This way I set a Gray RGBA and I think I haven't that much control of darkness. There is any other way of doing this? @erlend-sh

@rodrigocam
Copy link
Collaborator Author

fog3

A more bright color.

@rodrigocam
Copy link
Collaborator Author

Nevermind I found a way of passing rgb values 😄

@rodrigocam
Copy link
Collaborator Author

fog4

what about this way?

@rodrigocam rodrigocam merged commit 7b76695 into master Feb 1, 2021
@owen-mccormick owen-mccormick deleted the fog-of-vision branch February 1, 2021 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants