Skip to content

Conversation

@Satvik-Singh192
Copy link
Contributor

@Satvik-Singh192 Satvik-Singh192 commented Nov 12, 2025

Description

This PR introduces a functional Tic-Tac-Toe mini-game triggered by an interactable pillar in the Level1 scene.
The design ensures the mini-game is played in a fully paused environment, with the AI logic running independently of the main game's time scale.


Methodology Overview

The integration relies on three distinct architectural components working together:

🧱 Physical Trigger and Prompt

  • The PillarInteractor.cs uses a trigger collider (Is Trigger) to detect when the player (tagged "Player") is in range.
  • It manages the display of the "Press E" prompt text.

⏸️ Flow Control (Pause/Resume)

  • Upon pressing E, the interactor activates the game canvas and immediately sets Time.timeScale = 0f, fully pausing the main game loop, movement, and physics.
  • The TicTacToeManager handles the close function, resetting Time.timeScale back to 1f when the player exits the mini-game.

🧠 Time-Independent AI Logic

  • we handle AI turn execution inside the Update() function, driven by a simple boolean flag (isAwaitingAIMove).
  • This ensures the AI moves instantly after the player's turn, bypassing the paused time scale and preventing the game from freezing.

Semver Changes

  • Patch (bug fix, no new features)
  • Minor (new features, no breaking changes)
  • Major (breaking changes)

Issues

closes #81


Screenshots and videos

Testing Video

1.mp4

Prompt near the tower

2

MiniGame Screen

3 ---

GameOver Screen

5

Additonal Fixes:

I fixed a bug in Level 1 and level 3 where after any collison the velocity given to the player after knockback became residual and hindered the player movement. now there are no residual velocities on player if there is no input

Checklist

  • I have read the Contributing Guidelines.

@Satvik-Singh192
Copy link
Contributor Author

@Just-Here-TO-Code please review my pull request

@Satvik-Singh192
Copy link
Contributor Author

@Just-Here-TO-Code please review my latest commit , i caught a bug where the game crashed cuz a script was accessing a absent property of a material on a collectible.

@Just-Here-TO-Code
Copy link
Collaborator

Good work @Satvik-Singh192
Merging your PR.

@Just-Here-TO-Code Just-Here-TO-Code merged commit 5f7ea4f into OPCODE-Open-Spring-Fest:main Nov 12, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add a Tic-Tac-Toe Mini-Game Inside a Level

2 participants