Akki-jaiswal / Akki-jaiswal/pong-game

Bug : Game doesn't start properly on clicking 'Pong Game'

Aperta
#170 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
22
Fork
116
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Upon clicking the "Play Game" button, the game screen loads but:
- The game does **not start** — no paddle or ball movement.
- The **difficulty** and **theme** dropdowns don’t display their options properly.
- After a few seconds of inactivity, it **automatically displays "AI Wins"** — even though the player didn’t play.

**Steps to Reproduce:**
1. Go to the game: [Game Link](https://akki-jaiswal.github.io/pong-game/)
2. Click on "Play Game" without entering a name.
3. Observe:
- Game doesn't actually begin.
- No movement or control is possible.
- Difficulty and Theme dropdowns are mostly non-functional or invisible.
- After 5–10 seconds, it says "AI Wins" without any gameplay.

**Expected Behavior:**
- Clicking "Play Game" should start the match.
- Ball and paddles should be visible and active.
- Difficulty and Theme options should be visible and functional.
- "AI Wins" should only appear after a valid game ends.

**Possible Causes:**
- JavaScript game loop may not be starting correctly.
- Game state might be marked as "running" without rendering.
- Dropdown styles may be conflicting with the dark background.

![Image](https://github.com/user-attachments/assets/ac64d5b9-5ec6-4399-816a-a4d8af106c4a)

![Image](https://github.com/user-attachments/assets/0775d713-864a-49b3-8475-c03b075a7ce4)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.