feat: Add Otter Stop! — go/no-go rapid reaction game#39
Conversation
Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/07ea0f02-41b2-4f67-bdcb-8ce85a0c7635 Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
acrosman
left a comment
There was a problem hiding this comment.
This is a good start but need a lot of work. Like the other games it should have a screen with instructions and then a separate game play around.
In the game play area the images need to be larger to make the interface more immersive.
Most importantly, the game requires no interaction – this is totally wrong. If I do nothing at all the game thinks I'm doing it right. It should require interaction after the go images the player should be shown the image for equal time as they have to react with the space bar or mouse click. If they don't act on the image they are wrong.
…ulus Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/13ee31ca-bdfb-458f-a9a8-026c059453ae Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/13ee31ca-bdfb-458f-a9a8-026c059453ae Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Fixed in commit 3867233. Here's what changed: Go images now require active response. When a go image's display window expires without a press or click, it's scored as a miss and "Too slow!" feedback appears for 800 ms — same pause as no-go feedback. There is no longer any way to score points without interacting. Differentiated feedback messages:
Mouse click support. Clicking anywhere on the stimulus area counts as a response (Space or click). The element is a Larger stimulus. The display area grew from 300×300 → 500×500 px with images up to 440×440 px for a more immersive feel. The instructions and reminder text were also updated to make clear that responding to every go otter is required, not optional. |
|
@copilot the game now does require player input, but is unplayably fast. The first few rounds should be slower, more like 1 second or 1/2 second. |
…en as own step Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/15bb188a-4cc8-435a-b21e-81cfb5db4a99 Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Fixed in commit 5c7919d: Slower start speed — Base interval increased from 700 ms → 1500 ms (matching the starting pace of other games). Speed reduces by 50 ms per level as accuracy improves, down to a 150 ms floor. Return to Menu fixed — The button was dispatching Intro screen as its own step — The Play Again button now calls |
|
@copilot That's better. But we still need to adjust the startup process. It needs to have screen with instructions that disappear when the player clicks start game. The display also needs to prevent the default event when the player presses space to avoid it scrolling down. Ideally the whole game would fix vertically without scroll on most displays. |
…iewport fit Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/49faad99-3d10-41be-9d84-71f2b53af101 Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Fixed in commit 9c28ce5: Instructions screen — The root cause was that Space bar scroll prevention — Vertical fit without scroll — The stimulus area changed from a fixed |
|
@copilot The main layout issues are fixed, but we still have at least two issues to fix. First, when the success and failure images appear they are below the game area. The should display in the area. Second the advance and step back levels don't behave as expected. It should more clearly delineate when it is going up a level and back down. 3 rights answers in a row is three successful ignoring of no-gos. After a wrong answer, always start with a go image. |
…ions, force-go after wrong Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/c847055a-1c95-4b65-b54f-a9f5ed44f485 Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Fixed in commit cf4e961: Feedback overlay inside the stimulus area — Moved Level advancement — The Force go after a wrong answer — A |
|
@copilot We are getting close. The success and failure images should display at the same size as the go and no-go images. Move all go images into a folder, and then instead of loading the list by a pre-defined list of name, load all PNG and JPEG files in that folder as go images. |
…feedback images Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/134faae7-9eed-4b72-9bde-7fe8dd3726e4 Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Fixed in commit 061a9a5: Feedback images same size as stimulus — Changed Go images moved to |
|
@copilot the otter stop game does not appear to save high scores, at least not in a way that allows them to be loaded on the main screen card. It should record results like other games and display the best score on the main screen. |
…ter Stop appears on game card Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/18b7ae7b-dcd7-4fd9-a389-07cb946249db Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Fixed in commit 70421de. The It now follows the same load→merge→save pattern as the other games:
The game card will now show Top Score and Max Level for Otter Stop! the same way it does for the other games. |
…m:acrosman/BrainSpeedExercises into copilot/create-rapid-choice-reaction-game * 'copilot/create-rapid-choice-reaction-game' of github.com:acrosman/BrainSpeedExercises: fix: save highScore, highestLevel and lowestDisplayTime on stop so Otter Stop appears on game card
Adds a new inhibitory control training game where players must respond to each otter stimulus by pressing Space or clicking the image, except when the designated no-go otter appears. Implements an adaptive staircase: 3 consecutive correct no-go inhibitions advance one level (faster display), 3 consecutive wrong responses drop two levels.
Game mechanics (
game.js)images/go/— drop any PNG or JPEG into that folder to add it as a go image; no code changes neededno-gostimulus against however many go images are presentPlugin controller (
index.js)endTrial()inlineinit(), calls thegames:listImagesIPC channel to populate go image keys fromimages/go/before the player clicks StarthighScore,highestLevel,lowestDisplayTime,sessionsPlayed,lastPlayed) intogames['otter-stop'], then saves the full record; best score and max level are displayed on the game selection cardbsx:return-to-main-menuto navigate back to the game selection screenpreventDefault()while the component is mounted, preventing page scroll on any screen (instructions, mid-trial, end panel)UI
clamp(260px, 50vmin, 500px)so the game fits vertically without scrolling on most displaysrole="button",tabindex="0", pointer cursor) as an alternative to Space barIPC additions (
main.js/preload.js)games:listImageshandler accepts{ gameId, subfolder }and returns a sorted list of PNG/JPEG filenames from the given game's image subfolderpreload.jsexposesgames:listImageson theinvokeallowlistImage layout
Placeholder 1×1 PNGs are committed; replace in place with final art using the names above. Additional go images can be added by dropping files into
images/go/.Structure
Follows the existing plugin layout:
manifest.json,game.js(pure logic),index.js(DOM/controller),interface.html,style.css,images/,tests/.