Skip to content

Source Academy Game Modes Integration#3729

Merged
RichDom2185 merged 48 commits intosource-academy:masterfrom
chenyuzhen2007-source:ModeIntegration1.5
Apr 5, 2026
Merged

Source Academy Game Modes Integration#3729
RichDom2185 merged 48 commits intosource-academy:masterfrom
chenyuzhen2007-source:ModeIntegration1.5

Conversation

@chenyuzhen2007-source
Copy link
Copy Markdown
Contributor

@chenyuzhen2007-source chenyuzhen2007-source commented Apr 2, 2026

Description

This pull request changes the gameplay of SA game. Now, Talk mode and Move mode are integrated into Explore mode, and Menu mode is gone. The storywriters can now add "change_location_to(locationId)" action under any objects, and add a optional config "back : locationId" in the location configs to realize the Move mode function in the Explore mode. They can also add "show_topics()" action under any object to realize the Talk mode function in Explore mode. Back button in the Explore mode is now changed to a button with the text "turn around and leave", which will lead the players back to the location indicated in the config "back" once clicked. Now the game is by default in Explore mode instead of Menu mode.

Besides, the code for the Menu mode and Move mode are all deleted. The talk mode code are still kept for realizing the show_topics action, but I feel we can delete part of the Talk mode code.

Also, tooltip object is added to realize the display of the next location name while players put their cursors on the door.

And there are two new icons now put at public/assets to indicate the new move and talk interactions while players put their cursors on the objects.

Here is a video for the new gameplay : https://drive.google.com/file/d/1fFHH3UFplifReBeJp6HlbN1GcdwISjmo/view?usp=sharing

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update
  • Code quality improvements

How to test

https://drive.google.com/file/d/1FqTX61Tvp2fv4RZHyiGdTBrrL-dwfwHi/view?usp=drive_link
here is a modified chapter file that can be used to test the new game play.

Checklist

  • I have tested this code
  • I have updated the documentation

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 refactors the game's navigation flow by removing the 'Menu' and 'Move' modes, making 'Explore' the primary interaction phase. It introduces a new tooltip system and dynamic cursor changes based on object types, such as doors or chat triggers. While these changes streamline the UI, several issues were identified: a critical regression where automatic game saving was removed during location transitions, a potential runtime crash when hovering over bounding boxes, and the inclusion of debug console logs. Additionally, there are architectural concerns regarding the direct instantiation of game modes and the verbosity of the new action parsing logic.

Comment thread src/features/game/scenes/gameManager/GameManager.ts
Comment thread src/features/game/mode/explore/GameModeExplore.ts Outdated
Comment thread src/features/game/Tooltip/LocationNameTooltip.ts Outdated
Comment thread src/features/game/mode/talk/TopicListManager.ts Outdated
Comment thread src/features/game/objective/GameObjective.ts Outdated
Comment thread src/features/game/parser/ActionParser.ts Outdated
Comment thread src/features/game/parser/ActionParser.ts Outdated
Comment thread src/features/game/phase/GamePhaseManager.ts Outdated
Comment thread src/features/game/tooltip/TooltipManager.ts
Comment thread src/assets/footPrintImage.png:Zone.Identifier Outdated
Comment thread src/features/game/mode/explore/GameModeExplore.ts
Comment thread src/features/game/tooltip/TooltipManager.ts
Comment thread src/features/game/parser/ActionParser.ts
Comment thread src/features/game/tooltip/TooltipManager.ts Outdated
Comment thread src/features/game/parser/ActionParser.ts
Comment thread src/features/game/mode/talk/TopicListManager.ts
Comment thread src/features/game/scenes/gameManager/GameManager.ts
Comment thread src/features/game/scenes/gameManager/GameManager.ts
Comment thread src/features/game/Tooltip/LocationNameTooltip.ts Outdated
Comment thread src/features/game/phase/GamePhaseTypes.ts Outdated
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.

Just one typo

Comment thread src/features/game/parser/ActionParser.ts Outdated
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.

LGTM, thanks!

@RichDom2185 RichDom2185 enabled auto-merge (squash) April 5, 2026 07:30
@RichDom2185 RichDom2185 merged commit 10135e2 into source-academy:master Apr 5, 2026
7 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.

4 participants