Skip to content

feat: add in game pause#165

Merged
prairie2022 merged 1 commit into
developfrom
feat/in-game-pause
Jul 8, 2026
Merged

feat: add in game pause#165
prairie2022 merged 1 commit into
developfrom
feat/in-game-pause

Conversation

@Ian747-tw

Copy link
Copy Markdown
Contributor

Related Issue

Summary

  • add in game pause menu
  • add safe cleanup after exiting mid game/shutting down

Changes

  • implement pause logic/safe shutdown in game_manager.gd
  • add pause_menu.gd

How to Test

  • manual ui flow

@prairie2022

prairie2022 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

想問你的細節問題

  1. game_manager.gd 中,你在
    SceneTransition.transition_to("res://Scenes/menu.tscn")
    前還要手動 disable 各種物件是因為 scene_transition.gd
    get_tree().change_scene_to_file(target_scene)
    之前要先播一段 Tween 動畫,怕在這段時間會發生什麼事情嗎?
  2. get_tree().paused 的這段期間,agent 是不是還能持續發送 request,這樣會不會囤積很多而造成什麼問題?
  3. 順便說一下 Paused Menu 預計只在單人模式有效(雙人對戰時不能暫停),但雙人模式還沒出來所以之後會再補特判。

@Ian747-tw

Copy link
Copy Markdown
Contributor Author
  1. 那是在遊戲中回到menu時為了保險起件把一些stale state重製,算是一個清理,因為之前都是直接離開遊戲,所以只是保險一點把東西都清掉,確保重新開始遊戲不會有遺留state, 不過好像沒差,就只是一個保險,如果不需要可以刪。
  2. 我記得trap_request_scheduler有限制max_queue_size, 所以如果暫停,request就是堆積在queue, 然後超過就會reject。
  3. 這部份我也有想過,有一個問題是如果要暫停就要兩個電腦同時暫停,不然其中一個可能會一直傳輸更新到另一邊,continue後可能會炸 (?)

@prairie2022 prairie2022 force-pushed the feat/in-game-pause branch from e406d23 to 80407c4 Compare July 8, 2026 07:43
@prairie2022 prairie2022 merged commit 80407c4 into develop Jul 8, 2026
2 checks passed
@prairie2022 prairie2022 deleted the feat/in-game-pause branch July 8, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add in-game pause menu

2 participants