Skip to content

Running score display

Keep a points tally in the corner of the screen that updates after every scored trial.

Use this to gamify a block: a visible tally rewards correct answers, keeps participants motivated through long runs of repetitive trials, and gives children or patient groups a concrete goal. Showing the score only at the end of the block loses the trial-by-trial reinforcement, and per-trial feedback screens interrupt the pace of a speeded task, whereas a corner overlay costs no extra time at all. The tally advances between trials, not during one, so pick explicit feedback screens instead when the current trial’s outcome must be announced the moment it happens.

typestimFormatstim1keyboardkeytopLefttopRight
testwordDOGa laBlock 1Score: 0
testwordCHAIRa llBlock 1Score: %correct.count[2_0]%
testwordHORSEa laBlock 1Score: %correct.count[2_0]%
testwordSPOONa llBlock 1Score: %correct.count[2_0]%
testwordCATa laBlock 1Score: %correct.count[2_0]%
testwordTABLEa llBlock 1Score: %correct.count[2_0]%
testwordFISHa laBlock 1Score: %correct.count[2_0]%
testwordBRUSHa llBlock 1Score: %correct.count[2_0]%

topRight renders its text as an overlay in the top-right corner for the duration of the trial, with %...% variables substituted just before it is shown. %correct.count[2_0]% counts the correct answers (the 1s that key scoring writes into the running history) from trial-file row 2, counted with the header as row 1, through the most recent recorded response. Each trial therefore shows one point per correct answer so far.

The overlay is drawn at trial start, before the participant answers, so the current trial’s own outcome can never be part of the tally; the score the participant sees always covers the trials already completed. That is also why the first row carries a static Score: 0 instead of the variable: at that point no response exists for the aggregate to count. The overlay is cleared at the end of every trial and redrawn on the next one, which is what makes the tally step forward between trials while staying fixed during each trial.

topLeft holds the static block name in the opposite corner and works identically. Both columns are display-only: nothing ever reads them as a response option or click target, and both render their cell as HTML, so markup styles the text. Scoring itself is ordinary: keyboard collects a or l and key marks the correct one, and any row without a key would contribute nothing to the count.

  • Style the tally with HTML in topRight, for example Score: <span style='color:green'>%correct.count[2_0]%</span>.
  • Show accuracy or speed instead of points: topRight of Correct: %correct.perc[2_0]%% or Mean RT: %RT.mean[-4_0]% ms over the last five trials.
  • Swap the corners, or run two readouts at once, since topLeft and topRight are the same overlay on opposite sides.
  • If the block also uses a timer, move it: the timer’s default position is the top-right corner, where it would visually overlap the score.