Conversation
This more properly reflects the meaning of the time shown -- wait time implies that it's the time before the user boards an elevator. Commute time is clearly the time before boarding plus the time it takes for the elevator to travel to the desired floor.
To display more stats we could use more space. Turn the average/max stats into a table so we get more vertical space.
Give players more information about the commute times experienced by individual elevator users so they can design better algorithms.
Showing individual wait and travel times is tricky since showing all three time values at once will result in an even-more cluttered display. So we will add code to allow the user to select which time to display on the individual users by clicking on the appropriate row in the time statistics table. We must stop re-rendering the stats template on each stats change because it interferes with receiving input in the stats area. Replace the templatized rendering with jQuery code searching on specific element identifiers.
Let the player select which timer values to display by clicking the corresponding row in the statistics table. Clicking the row with the clock icon disables timer display. Like the time scale and code, the value to display is saved in local storage.
There are enough statistics that small numbers of floors (such as 3 found on the first level) clip the statistics display. Change the layout so that the statistics box is never clipped by the floor level.
This doesn't seem to affect the appearance but it is more consistent with the rest of the values in style.css
Contributor
Author
|
Comments? Questions? |
Owner
|
Several good changes but I'm worried about performance. |
Contributor
Author
|
I haven't looked at rendering performance. If it does make it worse my guess is the table layout code is what would do it. Since the table's number of rows and columns never change the most likely thing that could cause the layout code to do work is a change in the value of the table entries reflecting the stats. I used jQuery's text() rather than HTML to try to avoid any layout reflows but that may not be sufficient. If I can't use a table there then the stats list gets rather long. I could probably use div + span with hardcoded widths -- after all, the size of font and total available width are already fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series adds some summary statistics, reformats the statistics box to more compactly show the average and max stats, and enables displaying of time values on individual elevator users so that players can better understand the flaws in their code.
This should solve the following issues reported on github:
Issue #77
Issue #52