BIDMCDigitalPsychiatry / LAMP-platform

The LAMP Platform (issues and documentation).
https://docs.lamp.digital/
Other
12 stars 10 forks source link

Total Level Display for Cognitive Games #802

Closed ertjlane closed 1 month ago

ertjlane commented 4 months ago

We would like cognitive games with levels to display level progression during gameplay, illustrating to the player which level they are on out of the total possible levels. This is specifically for the following games:

ZCOEngineer commented 4 months ago

We shall check this @ertjlane

sarithapillai8 commented 4 months ago

@ertjlane Jewels game doesn't have total levels in the game settings? The maze game currently has no settings for total levels, instead we are using 12 as a static value. Do we need to add the total number of levels or just use this value?

carlan1 commented 4 months ago

The hardcoded value of 12 is fine here, as it is for other games that have static values. If it is a value customized in the settings, then just use that.

evinkalengaden commented 4 months ago

Hi @carlan1

We have updated the changes to dashboard staging.

ertjlane commented 3 months ago

Thanks so much. These look great, I've just tested them out.

ZCOEngineer commented 3 months ago

@ertjlane we are working on this, shall update soon

sarithapillai8 commented 3 months ago

@ertjlane We have updated spatial span. For Jewels A, there is some calculation for bonus points. Based on that we are updating levels. So according to current logic, the level change is working fine now. The same logic is for Jewels B, but as there are multiple shapes and more jewels, it seems the level is updating all the time.

ertjlane commented 3 months ago

@sarithapillai8 Thanks for the information. I am still seeing the same issue with the jewels game, unless I am misunderstanding what you said. Looking further into spatial span, I can see that the levels not changing indicates that the user has not moved on/failed, as it drops after two failed levels.

sarithapillai8 commented 3 months ago

The logic of spatial span is like it exits after 2 failed attempts.

The level update for jewels is different, you can go through the logic if you want. The level change depends on the time taken for the last bonus points. https://github.com/BIDMCDigitalPsychiatry/LAMP-activities/blob/master/JewelsPro/src/components/jewels/Jewels.tsx#L213

ertjlane commented 3 months ago

Reviewing Jewels A, I think the parameters for the level change are confusing because even when not meeting parameters to move to the next level, the app provides a prompt after all jewels are selected asking 'do you wish to continue to the next level'. If we make this contigant on the user actually moving to the next level, I think it would be much more clear.

sarithapillai8 commented 3 months ago

@ertjlane So the actual issue lies in the prompt I think. The calculations are there from the beginning stage. Can we change the prompt text to something meaningful?

sarithapillai8 commented 2 months ago

@ertjlane The parameters used for level calculation include the time taken for completion, number of attempts, negative points, and bonus point settings (bonus points required for the next level).

ertjlane commented 2 months ago

@sarithapillai8 Thank you. I wonder if we could change the text prompt when they fail to move to the next level into something indicating what they need to do differently - if it is hard to be specific it can just be something Like 'Good work! See if you can tap the jewels a little faster, or a little more carefully to move on to the next level'.

sarithapillai8 commented 2 months ago

@ertjlane With our calculation, I observed that the user could go to the next level after completing one level 2 times. Do you think this text is appropriate if that is the case? Can you also confirm how to maintain differences in different levels, by shape or by color?

ZCOEngineer commented 2 months ago

Hi @ertjlane could you update your thoughts on this one?

ertjlane commented 2 months ago

@sarithapillai8 Thanks for the follow up on this. I'm still a bit confused by the calculation system. It is pretty counter intuitive that the user would have to complete the first level twice in order to move on to the next level, and writing out that that is the case does not make it less perplexing. Unless I am misunderstanding the issue. Is there a way to change the progression parameter so the user does not need to complete two levels to progress (without manipulating the API)? Regarding maintaining differences on different levels, I think rotating shapes and colors (i.e. level 1 is purple diamonds, level 2 is red squares, level 3 is green ovals, level 4 is red diamonds, level 5 is purple squares, etc, etc).

sarithapillai8 commented 2 months ago

@ertjlane Different values can be given to game settings which can help to update the level in one go. But it depends on the values. So we cannot make sure this text suits there for the popup. If you can suggest another text or can we try one? We can update the levels as mentioned.

ertjlane commented 2 months ago

@sarithapillai8 I don't follow your point, I'm not understanding very well what you mean by 'different values given to game settings', and how that pertains to the text included. Is that the same as or different from changing the levels such that one only needs to progress one level to get to level 2?

sarithapillai8 commented 2 months ago

@ertjlane If you set the 'Bonus level for next level' parameter for Jewel A game settings within the range of 1-34, the game will advance to the next level immediately. For Jewel B, you can try values between 1 and 37. This parameter controls the level advancement, with a default value of 50. The message you suggested implies that clicking the jewels quickly and carefully will automatically advance to the next level. However, level advancement actually depends on this value. That's why I said it's not appropriate in this case. Does this make sense now?

ertjlane commented 2 months ago

@sarithapillai8 Thanks for this - that clarifies some things. So whether or not one must complete two levels to progress to the next level at onset of the game is NOT a default characteristic of the level progression calculation, but is determined by the initial setting configuration done by the investigator in the dashboard. My follow up question would be, what do the bonus points actually DO/how does one get bonus points? My logic being, would it make sense to default the bonus points requirement to the next level to 0, so that if you simply click all the correct jewels in the correct order, regardless of time limit, you will advance to the next level?

sarithapillai8 commented 2 months ago

@ertjlane const totalBonusCollected = stepNumber === totalDiamonds ? duration - Math.abs(negativePoints) : 0; This is how bonus point is calculated for the current level

const level = Math.floor((bonusPoints + totalBonusCollected) / bonusPointForNextLevel); This is the level value calculation

bonusPoints - already collected bonus points in previous levels, initially 0 bonusPointForNextLevel - This value is from the game settings duration - Time duration of the level

So all this depends on these calculations. I hope this clarifies everything.

ertjlane commented 2 months ago

Hello Saritha, yes that is helpful. I think with this in mind then we are good to go on this issue. Once you approve the translation changes I can make a dashboard release. In the meantime, can your team make a release for lamp-activities in order to implement the level and popup changes for the cognitive games?

sarithapillai8 commented 2 months ago

@ertjlane All the changes have been made in LAMP-activities. You can create the release now. Previous issues with the release process have been resolved, and we hope we won't encounter any more issues.