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 Fog Of War #4670

Merged
merged 7 commits into from Dec 21, 2023
Merged

Add Fog Of War #4670

merged 7 commits into from Dec 21, 2023

Conversation

ender-titan1
Copy link
Member

@ender-titan1 ender-titan1 commented Dec 14, 2023

Brief Description of What This PR Does

This PR is the second version of my implementation of Fog Of War to the patch map. This is a much nicer and more elegant solution to Fog Of War, with most of the code governing patch visibility contained in PatchMap and Patch itself.

Link to my previous PR (Just in case): #4462

Feature Checklist:

  • Saving & Loading
  • Reveal All Cheat
  • Fading Region Connections
  • Making Connections To Unexplored Regions Look Nice
  • AutoEvo Output & Report
  • Translations

Related Issues

Closes #3602

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

@ender-titan1 ender-titan1 added this to the Release 0.6.5 milestone Dec 14, 2023
@ender-titan1 ender-titan1 added this to In progress in Thrive Planning via automation Dec 14, 2023
@ender-titan1
Copy link
Member Author

The previous commit is supposed to make connections to unknown regions look nicer, which was what held up the development of my previous PR. This time, I did not bother changing the way connections are rendered, instead just centering a single node in the region.

This yields ok results, albeit still a bit disconnected from the rest of the map. I think this is fine for now, and trying to make it look nicer should be done by someone more experienced with the patch map code, and probably be a separate issue.

I believe the results of this are good enough for fog-of-war itself.

@ender-titan1 ender-titan1 marked this pull request as ready for review December 17, 2023 07:49
@ender-titan1
Copy link
Member Author

This is now ready for review

@ender-titan1 ender-titan1 requested review from a team December 17, 2023 07:50
ender-titan1 and others added 5 commits December 20, 2023 12:36
Minimum FogOfWar Implementation

Fix some node rendering issues

Add Ignored/Disable mode

Hide PatchDetailsPanel of unknown patches

Fix formatting

Add basic PatchMapDrawer node hiding

Fog of War now ignored in certain contexts

Add Reveal All Patches Cheat
To do so, draw calls have been replaced by Line2d objects

Fix overlapping connection lines and borders

Censor undiscovered patch names in Timeline and Report

Make sure unknown regions do not have a border

Change the way unknown regions are drawn

Update Translations

Update translations again and fix some other things

Formatting

Delete argument I forgot to delete

Delete using I forgot to delete

Update cheat button look
And also change the game version to 0.6.5.0

Undo some changes

Add comments
Avoid unnecessary object allocations when getting names of hidden patches
Copy link
Member

@hhyyrylainen hhyyrylainen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed all of the slight code issues I saw and fixed up comment typos etc. I've also tested this quickly for each fog of war mode and also loading one earlier save. I think this is now good to go by me, but I'll wait a bit until merging to give others time to double check my changes that I didn't accidentally break anything.

@hhyyrylainen
Copy link
Member

hhyyrylainen commented Dec 20, 2023

I think you undid my manual squashing of this PR... I think I'll be able to fix it tomorrow by cherry picking the following commit: 3777ee2f42516501a7565c45af44edf0204bc21b to my local branch and then force pushing over this again.

Edit: for future reference you need to force pull first a branch if it has been remotely squashed before resuming working on it locally.

@ender-titan1
Copy link
Member Author

Sorry, I'll keep this in mind for future PRs

@hhyyrylainen
Copy link
Member

Alright, that was much easier than expected. Hopefully you didn't make any other changes than that one commit about where the region link build was. This should be fine to merge now with the cleaned up history.

@hhyyrylainen
Copy link
Member

Seems like auto-evo exploring tool has broken map for all worlds after the first. I'll open an issue about that as a follow up to get this PR merged to no longer have to fix this branch: #4731

@hhyyrylainen hhyyrylainen merged commit 9922d49 into master Dec 21, 2023
2 of 4 checks passed
Thrive Planning automation moved this from In progress to Done Dec 21, 2023
@hhyyrylainen hhyyrylainen deleted the fog-of-war branch December 21, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Add fog of war for the patch map
2 participants