Opened 9 years ago
Last modified 2 years ago
#3177 new enhancement
[PATCH] Implement camouflaging
Reported by: | Itms | Owned by: | marder |
---|---|---|---|
Priority: | Should Have | Milestone: | Work In Progress |
Component: | Simulation | Keywords: | patch design |
Cc: | Patch: | Phab:D4291 |
Description (last modified by )
Attached is a patch that implements camouflaging for Iberian swordsmen (just a test case, it would be nice if all Iberian infantry had it but it should be balanced).
It is quite huge because I had to re-implement Stamina, that depends on it in my design; if possible I will commit the stamina changes before, so the patch is easier to review.
Feedback is welcome! :)
Attachments (4)
Change History (13)
by , 9 years ago
Attachment: | camouflaging.patch added |
---|
by , 9 years ago
Attachment: | camouflage_off.png added |
---|
by , 9 years ago
Attachment: | camouflage_on.png added |
---|
by , 9 years ago
Attachment: | camouflaged.png added |
---|
comment:1 by , 9 years ago
Keywords: | review removed |
---|
comment:2 by , 9 years ago
Milestone: | Alpha 19 → Backlog |
---|
comment:3 by , 7 years ago
Stamina was removed in r18002. Are there still any plans for camouflaging?
comment:4 by , 7 years ago
#3468 Made the patch work sometime ago. While there are still plans for camouflaging, Itms told me that his patch that I rebased was not going to be included because it wasn't the proper way to do it.
comment:5 by , 6 years ago
Description: | modified (diff) |
---|---|
Keywords: | design added |
Owner: | removed |
comment:6 by , 5 years ago
Component: | UI & Simulation → Simulation |
---|
Move tickets to Simulation
as UI & Simulation
got some sub components.
comment:7 by , 4 years ago
I was thinking about some ways of properly using vision and camouflaging and thought of the following. It might be rediciously expensive or just plain wrong, but without bad ideas no good ones emerge.
Perhaps we can use a fraction for the visibility of terrain tiles? Each unit sees "0" of a tile beyond vision and "1" of a tile up front (cutoff of 0.1 for barely visible, i.e. current LOS). For the player visibility the max of the fractions of multiple entities is used. (That could even be extended such that having two entities seeing the same tile gives the player slightly more information.)
A unit can then have in their Visibility-component defined at which fraction of exploration it becomes visible to other players. Using stealth increases that fraction such that a unit should be closer before seeing it. Also bigger units (structures) can have smaller fractions, leading to one being able to see e.g. buildings earlier than smaller units.
The "ComputeLosVisibility"-function in CCmpRangeManager would not be too hard to update I think (if "los.IsVisible(i, j)" would return a fraction instead of a boolean). But of course there are many more things to consider.
comment:8 by , 4 years ago
That would be ridiculously expensive indeed, but it's certainly a nice gameplay idea. Moving from bools to floats would make us change much code. It would already be better to use integers instead of fractions and define an integer visibility threshold... Another issue with non-boolean visibility would be that it would become impossible to use simple bitfields to describe a set of visibilities for each player (like we currently do).
Your idea gave me another which would be easier to implement: stealth units could have an aura which has the effect of decreasing the vision range of enemy units and/or buildings.
comment:9 by , 2 years ago
Milestone: | Backlog → Work In Progress |
---|---|
Owner: | set to |
Patch: | → Phab:D4291 |
Putting this out of the review queue, it conflicts with capturing wrt. the UI.