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

Show player loading status #3894

Conversation

sauliuskarmanovas
Copy link
Contributor

@sauliuskarmanovas sauliuskarmanovas commented Apr 1, 2023

Identify the Bug or Feature request

resolves #3890

Description of the Change

In Connections window show what map / zone players are in and if they have loaded assets. Small indicator in the bottom right that shows how many players have finished loading their zone.

Possible Drawbacks

None idk?

Documentation Notes

Release Notes

In Connections window show what map / zone players are in and if they have loaded assets. Small indicator in the bottom right that shows how many players have finished loading their zone.


This change is Reviewable

@cwisniew
Copy link
Member

cwisniew commented Apr 2, 2023

The problem I see with this is it could get quite spammy if there are a lot of players. Especially if the players jump around between maps, or macros like the teleportation pads are in use. Might be better to add an indicator to the connection window instead

@Pmofmalasia
Copy link

A connection window indicator would be nice. I think ideal states would be yes/no is any player still loading, and could be clicked/moused over for more info. Since most of the time you just want to know if everyone is loaded in or not anyway, not specific people.

@FullBleed
Copy link

I have the custom map switcher I use in my framework tell me when players use it to switch maps and where they are. I usually only have around 4-5 players though and don't find it spammy at all. But I suppose if I had a lot more players switching maps a lot it could be an issue... so I guess a preference setting for it would be necessary if it was a feature of the built in map switcher.

I do, obviously, think knowing where players are and when they are loaded-in to a new map is a good feature to have though. ;)

@sauliuskarmanovas
Copy link
Contributor Author

Rewrote everything to show current zone and loading status in connections panel. Not the prettiest code but seems to work.

@FullBleed
Copy link

Any chance we can get functions to get at this info? While it makes sense that this would show in the connections panel, I don't really want to have to have the Connections panel open and would rather be able to choose where I want the info displayed.

@sauliuskarmanovas
Copy link
Contributor Author

If you don't want to keep the connections panel open I can add a small indicator at the bottom right of the client next to memory usage. Something like: "[loading icon] 3/5" or "[checkmark] 5/5" with tooltip "{0} out of {1} players have loaded their zone".

If you want something custom then src/main/java/net/rptools/maptool/client/ui/connections/PlayerListCellRenderer.java has all the code you need of how the status text is created from a Player object and if you want to subscribe to the status changes then the event is PlayerStatusChanged.

@Pmofmalasia
Copy link

A small indicator with the number of players currently loaded in seems ideal to me, that way you can just quickly glance at it instead of needing to keep the window open

@FullBleed
Copy link

If you don't want to keep the connections panel open I can add a small indicator at the bottom right of the client next to memory usage. Something like: "[loading icon] 3/5" or "[checkmark] 5/5" with tooltip "{0} out of {1} players have loaded their zone".

Nice.

Would it be a problem to add a tooltip with player names and locations?

@sauliuskarmanovas
Copy link
Contributor Author

Ok added more info to the tooltip. After testing it a bit it seems that there's a small issue with tooltips that it doesn't update when it is on screen. So you got to move the mouse a bit for it to reappear and update

@sauliuskarmanovas sauliuskarmanovas changed the title Send a message to GM when we're done loading Show player loading status Apr 8, 2023
Copy link
Member

@cwisniew cwisniew left a comment

Choose a reason for hiding this comment

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

Added a few comments, we want to try adding new events to the event bus rather than adding direct calls from zone renderer etc, as its starting (starting? who am I kidding) to get messy.

@cwisniew
Copy link
Member

It looks like spotless will also need to be run to fix formatting.

./graldew spotlessApply (or .\graldew spotlessApply depending on OS)

@cwisniew cwisniew added the feature Adding functionality that adds value label Apr 16, 2023
@cwisniew cwisniew added this pull request to the merge queue Apr 24, 2023
Merged via the queue into RPTools:develop with commit 5162a7e Apr 24, 2023
@sauliuskarmanovas sauliuskarmanovas deleted the Issue-3890-MsgPlayerFinishedLoadingZone branch April 24, 2023 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

[Feature]: Let the DM know when a player finishes loading assets
5 participants