Skip to content

Addition of the Skip Feature in the Source Academy Game#3732

Merged
RichDom2185 merged 45 commits into
source-academy:masterfrom
ItsByt:Personal
May 13, 2026
Merged

Addition of the Skip Feature in the Source Academy Game#3732
RichDom2185 merged 45 commits into
source-academy:masterfrom
ItsByt:Personal

Conversation

@ItsByt
Copy link
Copy Markdown
Contributor

@ItsByt ItsByt commented Apr 3, 2026

Description

Summary of change:

This PR proposes the new implementation of the skip feature in the Source Academy Game, which enables users to skip through dialogue.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

Motivation and Context:

Users may feel that some dialogues are particularly too lengthy, and would want some way to skip through it conveniently without having to repeatedly click through the dialogue. This feature enables users to skip through dialogue with the click of a button (the skip button), or by clicking the "s" button on their keyboard. To prevent accidental usage, users can also toggle in their settings whether to have a confirmation appear whenever they use the skip button. If on, they will be prompted with the confirmation on their usage, and if off, any use of the skip feature immediately skips through the dialogue.

We also note that the skip feature only skips until the next required prompt by the user (e.g. location changes, questions that require the user to give an answer etc.), or the end of the dialogue. Trying to re-use the skip feature will not skip any further in such cases.

Also note that the default setting for the confirmation setting is for the confirmation to be turned ON. Users will have to manually turn this confirmation off should they want no confirmation. However, once turned off, the settings will be saved between chapters and users need not re-turn it off every time.

How to test

Choose any chapter (I chose Chapter 0 for simplicity and as it is the easiest to illustrate)

Basic.Usage.of.Skip.Feature.mp4

When in a dialogue, there should now be blue button at the top right corner of the dialogue box. Click it to skip through dialogue. The above is with the confirmation settings turned on.

Using.no.confirmation.setting.mp4

The above is when the confirmation settings is turned off.

Using.the.s.keyboard.shorcut.mp4

The above is when we use the "s" keyboard shortcut to skip through the dialogue. Note that this works regardless of whether we have the confirmation turned on or off. It is simply the equivalent of clicking the skip button.

Skipping.when.not.able.to.is.useless.mp4

We note that trying to use the skip button is useless if they are already at a point in the dialogue that cannot be progressed any further without their direct prompt. In the case where a user is explicitly required to answer a question, I have hidden the button so that it is not clickable directly on their screen until the prompt is answered, and temporarily disabled the "s" keyboard shortcut so clicking it does nothing in that instance.

Checklist

  • I have tested this code

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a dialogue skip feature, allowing players to fast-forward through dialogue until the next prompt or the end of the sequence. It includes a new skip button, a keyboard shortcut ('S'), and a 'Skip Confirm' setting in the escape menu to toggle a confirmation prompt. The implementation also refines the game's saving logic during location changes to avoid redundant saves. Feedback focuses on fixing a potential hang in the skip loop, improving the responsiveness of the skip delay, avoiding fragile 'any' casts for private member access, and externalizing hardcoded asset paths.

Comment thread src/features/game/dialogue/GameDialogueManager.ts
Comment thread src/features/game/dialogue/GameDialogueManager.ts Outdated
Comment thread src/features/game/dialogue/GameDialogueManager.ts Outdated
Comment thread src/features/game/scenes/gameManager/GameManager.ts Outdated
Comment thread src/features/game/dialogue/GameDialogueRenderer.ts
Comment thread src/features/game/dialogue/GameDialogueManager.ts
Comment thread src/features/game/dialogue/GameDialogueManager.ts
Comment thread src/features/game/effects/Prompt.ts
Comment thread src/features/game/scenes/settings/Settings.ts Outdated
Comment thread src/features/game/scenes/settings/Settings.ts
@sayomaki
Copy link
Copy Markdown
Contributor

Thanks for updating the PR! As noted by sentry (and I do think its a valid point), there appears to be an issue when trying to access the 3rd item (index 2) of the optHeaderPos, as it is reading from getSettingsHeader. You should add the missing entry to the header to fix the problem.

Comment thread src/features/game/scenes/settings/Settings.ts
Comment on lines +196 to +206
}

if (!this.skipButton || !this.skipButton.active) {
this.isSkipping = false;
break;
}

if (hasPrompt || hasActions) {
this.isSkipping = false;
break;
}

This comment was marked as outdated.

Comment thread src/features/game/dialogue/GameDialogueManager.ts
@martin-henz martin-henz requested a review from sayomaki April 17, 2026 09:49
Comment thread src/features/game/effects/Prompt.ts
@RichDom2185 RichDom2185 enabled auto-merge (squash) May 13, 2026 16:44
Copy link
Copy Markdown
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@RichDom2185 RichDom2185 merged commit 1b275fc into source-academy:master May 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

game All game related ideas, bugs, fixes

Development

Successfully merging this pull request may close these issues.

6 participants