-
Notifications
You must be signed in to change notification settings - Fork 4
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
reusable components for new games #59
Comments
In phetsims/make-a-ten#279 (comment), @ariel-phet said:
Assigning this issue to @amanda-phet. |
(1) Reusable designs
Make a Ten and Equality Explorer
|
I wouldn't have included Area Model in the discussion because the game model is much like all other PhET games, but the status bar does break from convention a bit because it doesn't use a start over button and it displays the score in terms of stars instead of points. I can see continuing to use that score representation, especially for younger users, but that is not the same as the score display for Equality Explorer and Make a Ten. I can also see continuing to use back buttons instead of start over buttons for games in case you want to switch between levels but don't want to lose all progress. |
The "status bars" in Make A Ten, Area Model and Equality Explorer all have significant differences, see below. Are you proposing to somehow unify/standardize them? Area Model, from design doc: Equality Explorer, Figure 5.3 from design doc: |
I wasn't proposing anything (yet), just identifying what the games have in common. Area Model looks like this in the latest dev version: (@pixelzoom edit: There are 4 "Area Model" sims. This is area-model-multiplication.) |
In the preceding status bar "3 of 6" seems unclear, may be better to specify "problem 3 of 6" or "challenge 3 of 6" so it doesn't get confused with level, score or something else. |
2/8/18 design meeting notes. 3 reusable UI components identified: (1) "score display" - support for 3 representations: (2) "status bar" - Back button, arbitrary text to the right of back button, "score display" on right end of bar. (3) "level selection button" - Modify existing VEGAS/LevelSectionItemNode to display stars as "{number} ⭐" for games that don't have finite number of challenges. Uses "score display". I'll be doing the vegas work. Using in sim will be up to developer who is responsible for the sim. |
@andrea-phet said she would be willing to tackle this. Feel free to have an initial consultation with @pixelzoom - he will let you know what is easy, where a good starting point might be, and what might be a "can of worms" |
Score DisplayFurther specification of "score display": From #59 (comment):
Mockups of (a) (b) (c) respectively: • This component will be used in "status bar" and the existing LevelSectionItemNode. Open questions, @amanda-phet please specify:
|
Status BarFurther specification of "status bar". From #59 (comment):
• Back button is SCENERY_PHET/BackButton Mockups of status bars showing "score display" options (a)(b)(c) respectively: @amanda-phet please verify that the above is what you want. |
Level Selection ButtonsFurther specification of "level section button". From #59 (comment):
Take the existing LevelSectionItemNode and modify it to use "score display" (described in #59 (comment)). We'll probably only need options (a) and (b) for "score display", but might as well also support option (c). Keep all other existing features of LevelSectionItemNode. Mockup examples showing "score display" options: reactant-products-and-leftovers, "Game" screen using "score display" option (a): equality-explorer, "Solve It!" screen, from design document, using "score display" option (b). Note how zero stars is displayed. Hypothetical example, using "score display" option (c). Again, this option is not currently needed by any sim, but since "score display" is reused here, it should be easy to add now, and more expensive to add later. @amanda-phet please verify that the above is what you want. |
(a) and (c). (b) should only ever be an integer number of stars.
Likely just 0.5, but I'm not sure if you are also wondering about stars. In the case of Arithmetic the points are integers, but the stars are fractional. I think a point is 1/36th up to 1/144th of a star.
(b) should not have a fraction. (c) should be left to the designer. Right now we don't have a game with fractional points (I think) so I don't feel comfortable making that call. My guess is the latter, "3"and "3.5". The level selection buttons you include in the above comment look good to me. For (a) the number of stars is optional, right? For (c), I wonder if the text should have an option to read "best score" or "last score" or something like that. This seems like an opportunity for a designer to be specific. Or perhaps, just leave this as "score" and we can discuss a "best score" design in the future. (@phet-steele and I have discussed this in the past and there are some ways we can probably improve the way we share best score vs. last score, and best time.) @arouinfar feel free to chime in as another sim designer. I am not an expert on designing games! |
@amanda-phet said:
I believe that's correct. In some games (e.g. BCE) we award 2 points for a correct answer on the first they, 1 point for a correct answer on the second try. So a perfect score is 2 * numberOfChallenges.
Correct. I've added that to #59 (comment). |
Thanks @amanda-phet! Your recommendations all sound reasonable to me. I haven't designed a game, so comparably, you're definitely the expert. 😄 |
Revising the Equality Explorer game design is a pre-requisite to implementing these game components. See phetsims/equality-explorer#34 (comment). |
Would it make sense to include a "refresh" button in the status bar as an option? It seems like many games have something like this. It could also just be specific to the sim if it doesn't work in the bar. |
@amanda-phet In all of the examples I've seen so far, the designer have chose to put the Refresh button with the challenge, and not in the status bar. But if you want that flexibility, please revise the specification and mockups in #59 (comment) asap. |
PhET Girl DialogAnother component that we need to generalize and move from make-a-ten to vegas. This screen appears when you reach 10 stars in make-a-ten: Need an option to specify which "score display" to use. ("Discrete stars" display may not make sense here. What do you think @amanda-phet?) Client should control when this is displayed. I.e. it's not tied to reaching any specific score. Associated artwork (.ai and .png) will need to be moved from make-a-ten to vegas. Associated strings will need to be moved from make-a-ten to vegas. We'll need to come up with a good descriptive name for this. make-a-ten calls it |
@andrea-phet and I had a Zoom call to go over the requirements, questions, etc. I recommended doing things in this order: Score Display, Status Bar, PhET Girl Dialog, Level Selection Buttons. She's going to pilot, I'll co-pilot. @andrea-phet If you want to see how this will be eventually used in Equality Explorer, see phetsims/equality-explorer#34 and the design document. @ariel-phet FYI, the scope has expanded a bit. We identified one additional reusable component, se #59 (comment). |
Self-assigning because I'll be involved in this and don't want to have to keep searching for the issue. |
I discussed it (I think with Kathy) and don't think we should have that option. I originally brought it up just to consider all possibilities! But I don't think it's a good place for a refresh button so we shouldn't include it at this time. |
@amanda-phet see also the question for you in #59 (comment).
|
Correct. This dialog is only relevant in games where you have an infinite number of challenges, so we should only be choosing between score displays (b) and (c). |
@andrea-phet in the commit immediately above, I replaced a group of options with |
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
The level selection button API seems quite inconvenient for my use case (in the fractions sims): You can see:
Naively putting in things like this results in a mess, because it looks like LevelSelectionButton always forces a rescaling of its icons (and not a consistent rescaling): So to currently get the effect desired, I'd need to:
So a few thoughts:
Additionally:
The older Java games had this size down nicely. |
Also in the mockup: with three stars, there is no padding to the left or right between the stars and the black border. With the current implementation, how can I accomplish that, or is that not something that will be done with level selection buttons? |
@andrea-phet Since the new level-selection button is now named General note: Because of the way that |
Re @jonathanolson's issues with
|
I'm not sure how this example applies, as the images used are all the same size. If I apply a random scale to each image, I'm sure the text size and all alignment would go crazy? Also, since there's another case where these level titles are used, isn't that an even better argument for adding common support for it? |
Your "resulting label sizes are all over the place" because you're doing nothing in your client code to ensure that they meet your client's requirements. My example from Graphing Lines shows that it's possible to do that on the client side with a minimum amount of work. The fact that Graphing Lines has uniform image file sizes is irrelevant - I could have easily dealt with that. If you want to add additional responsibilities to LevelSelectionButton, I'm happy to discuss. But it's possible (and I would argue not "inconvenient") to accomplish what you need with the current API. |
It just seems to me that auto-scaling presents problems, and having titles as a feature of this sounds useful, as it will be used by at least 2 sims.
I'm fine being responsible for the icon, but the titles don't seem like an "icon". I guess I'm just concerned, where if I were to create the buttons myself the code would be a LOT simpler. The assumptions made for the common code don't seem well suited to the current use case.
Yes, that is one of my suggestions. |
4/12/18 design meeting: Requested changes/additions (including addressing the above LevelSelectionButton concerns) appear in #66. Items to complete for this issue are:
|
Moving sims from deprecated to new types will be tracked in #68 and phetsims/area-model-common#118. |
Work here is completed. Code review to be done in #70 |
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
Over in phetsims/make-a-ten#279, we noted that several newer sims (Equality Explorer, Make A Ten, Area Model, ... others?) have deviated from past game designs. This is likely due to the need for other types of games, as well as better ways of designing games in general. Equality Explorer's game (for example) is “less formal”, more open-ended, and operates differently than older games. But it has much in common with the game in Make A Ten. And Area Model is also planned to have similarities.
Three things that need to be done with respect to these new games, in this order:
(1) Specify reusable designs. Each of these games has much in common, but also significant differences. We need to identify what these games have in common, what can be reused. Designing for reuse may involve making compromises and/or design changes to existing games. And the subsequent designs will become part of the PhET designer's toolbox.
(2) Implement reusable components. So far, each sim with a newer game has implemented its own UI components. This is undesirable, especially considering PhET-iO and a11y. The designs identified in (1) will need to be implemented, reviewed and tested, as part of the vegas repository. Hopefully some of make-a-ten can be generalized and migrated to vegas (see phetsims/make-a-ten#279). These components will become part of the PhET developer's toolbox.
(3) Replace custom code with reusable components. Sims that have implemented their own components must be switched over to the new vegas components. This will ensure leverage of common code, PhET-iO and a11y.
The text was updated successfully, but these errors were encountered: