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

Improve Info HUD with entity information #32

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

XMinty77
Copy link
Contributor

@XMinty77 XMinty77 commented Apr 7, 2023

This PR attempts to improve the Info HUD by displaying additional entity information

  • Display TimeActive & active group for hazard cycles
  • Add a way to display the number of frames until the next check for a hazard in Custom Info
  • Add Automatic mode to Watch Info, which automatically chooses the information to display based on the watched entity type

XMinty77 and others added 21 commits January 17, 2023 19:18
added support for mouse clicks and moved mouse position update
draw the trigger area for the bird dash tutorial cutscene at the end of prologue such that it triggers the frame after the bottom right of the hitbox of the player collides with the trigger
added the missing bottom render for the invincibility trigger box
properly removed the vanilla rendering (double render)
changed the position calculation to use correct values
changed cutscene trigger values for positive trigger height
display improved trigger box when CelesteTAS hitboxes are on, and vanilla trigger box when the debug console is open
- use the vanilla method Scene.OnInterval to avoid any potential float float behavior inconsistencies from different build modes of the CelesteTAS assembly
- simplify the check for if timeactive ticked
- move the offset finding code and the check distance code into their own public methods for other code to use
- display timeactive and the active group
- add a helper method for custom information that allows for displaying number of frames until next check
- add basic automatic mode for watch info setting, which displays entity-specific information
implements a new system to track watched entities
clean up leftover code from old watch entity tracking system
hitboxes referenced the wrong field WatchingEntities instead of WatchingList to check if an entity is tracked as watched
fix a mishap where making a savestate, adding a watch entity then loading the savestate removes the watch entity and leaks memory in the checklist
fix lack of support for no id entities in the checklist to be tracked across rooms
remove pesky empty lines D:<
remove unused methods
add TODO note
@XMinty77 XMinty77 marked this pull request as ready for review April 8, 2023 22:48
@XMinty77
Copy link
Contributor Author

XMinty77 commented Apr 8, 2023

The PR is not finished yet but I removed draft mode so it can be merged to main if needed.

XMinty77 added 7 commits April 9, 2023 06:32
- proper formatting for all values
- fix player angle mishap
- display last player distance and current player distance
render the Info HUD at full alpha (not transparent) if journal is held while the pause menu is up
change Tracker.GetEntity<Player> to the extension method GetPlayer for consistency
- add draw extensions for crosshair and circle arc
- separated watched entity info code into several files for management, tracking, rendering and auto displaying
- added more and improved current watched seeker information
- added watched seeker rendering
- refactored using directives
- support for multiple types at once
- distinct EndAutoWatch command for unwatching
- fixed documentation errors for the command
- display and draw resultant speed vector
- display y dot product in info hud
draw closest spawn point by distance for auto mode watched player
@DemoJameson
Copy link
Member

does UniqueEntityId.GlobalOrPersistent still need? it has never been read

@XMinty77
Copy link
Contributor Author

XMinty77 commented Aug 2, 2023

does UniqueEntityId.GlobalOrPersistent still need? it has never been read

it's not read but it serves as part of the comparison of UniqueEntityId records, namely for holdables you can transition with and for mod entities that are sometimes persistent and sometimes not
so when it's different it distinguishes persistent entities of the same type vs non persistent entities
I'm not sure because I haven't dealt with the uniqueness tracking system in a while but I think I kept this to solve a bug where the tracker gets confused when you bring a jelly through a transition then go back with it, now you have a duplicate version, and the unique ID alone doesn't distinguish them, but the persistence bool does distinguish them
of course if you duplicate 3+ versions this breaks but I asked about this and it hasn't been reported yet to me an entity or a scenario where you would have 3 or more duplicates in the same room (it's definitely impossible without a glitch in vanilla)

@psyGamer
Copy link
Member

Do you still plan on continuing with this PR?
Also this PRs seems to change various other things not related to the custom info? Did you intend on doing that or did that came from messing something up with git?
Additionally this PR would need to be re-targeted onto master due to the various Studio v3 changes. It might make sense to start fresh and copy the relevant things to avoid messy merge conflics and to not have a messy commit history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants