Skip to content

WebRTC: The Painful Love Story 💔

"Chhaki Suna" Edition – When Tic Tac Toe Turned Into Tic Tac No

"All I wanted was a simple real-time game. What I got was trauma, sockets, and existential dread." – Kahnu, still recovering

🎬 Previously on WebRTC: The Love Story

In Part 1, we discovered that WebRTC is:

  • A browser sorcerer 🧙‍♂️
  • A peer-to-peer romantic
  • A tech that whispers, “Hey, can I stream your face...?”

I thought we had a connection. We made eye contact through getUserMedia(). I believed in the dream.

And then... I tried to build a real-time multiplayer Tic Tac Toe app — or as we call it in Odia, "Chhaki Suna".

Chapter 1: Let Me Build A Game, They Said… 🎮

The goal was simple:

  • 3x3 grid ✅
  • Two players ✅
  • Real-time updates ✅
  • Peace of mind ❌

I opened VS Code like a warrior ready to write the greatest P2P game Odisha had ever seen.

“This will take two hours max,” I whispered to myself at 10 PM.

Narrator: It did not take two hours.

Chapter 2: The Signaling Hole 🕳️

“WebRTC is peer-to-peer! You don’t need a server!” – Every tutorial, lying to my face.

So I coded confidently.

Then WebRTC whispered:

"Umm... you do need a signaling server... 😅 just to say hello..."

I blinked.

Suddenly I’m writing WebSocket code.

Suddenly I’m debugging RTCPeerConnection.

Suddenly I’m googling "why ICE candidates ghost me?"

Chapter 3: ICE Is Not Cool ⚠️

If there’s one thing more confusing than a relationship status on Facebook…

…it’s ICE Candidates in WebRTC.

I thought ICE was:

  • A cold drink ❄️
  • Or a rap group 🎤

Nope. It’s a chaotic network negotiation protocol from a parallel universe.

WebRTC:

“Hey, can I connect to you directly?”

Network:

“No.”

WebRTC:

“Fine. I’ll ask STUN. And TURN. And maybe karma.”

Meanwhile, my Tic Tac Toe app still hadn’t rendered one single “X”.

Chapter 4: The Infinite Waiting Room 🫠

Every time I connected two peers:

  • Nothing happened.
  • Then something flickered.
  • Then it broke.
  • Then I refreshed.
  • Then my laptop fan screamed like a banshee.

In one test, Player 1 saw Player 2's move...

But only after two minutes.

Me: “Bro, are you playing Chhaki Suna or submitting a PAN card application?”

Chapter 5: Game Over? No, Browser Crashed.💀

At one point:

  • My game worked!
  • Players connected!
  • Moves appeared in sync!

And then I accidentally refreshed one tab.

Everything broke.

  • Both players disconnected.
  • Grid disappeared.
  • Console errors screamed.
  • I screamed back.

"Cannot read property onicecandidate of undefined"

– My browser, my enemy

Chapter 6: Acceptance😔

I stopped fighting.

I stopped debugging.

I made tea ☕ and stared at my code like it betrayed me.

All I wanted was:

  • Real-time Chhaki Suna
  • Browser to browser fun
  • A 3x3 legacy of greatness

Instead, I got:

  • A tangled mess of ICE, STUN, and TURN
  • 17 versions of peer.js
  • 5 different signaling servers
  • A nervous tic every time someone says "WebRTC"

Developer KPIs from the Project📉

MetricValue
Attempts to complete the app14
Times it almost worked6
Times it worked and broke again12
Times I cried😭😭😭
Actual completed game sessions0
Odia curses muttered at Chrome108+

😂 But What Did I Learn?

  1. WebRTC is powerful.
  2. WebRTC is chaotic.
  3. WebRTC is not your friend — unless you feed it 3 servers, 8 protocols, and 1 blood sacrifice.
  4. Sometimes... it's okay to just use Firebase.

🤡 Final Words: The Game That Never Was

To this day, Chhaki Suna remains unfinished.

A legendary game trapped in the webRTC void.

A codebase commented entirely in frustration.

But one day… I will finish it.

And when I do, it will be glorious.

Or it’ll crash again. Who knows.


💡 Moral of the Story:

"Just because you can use WebRTC to build real-time Tic Tac Toe... doesn’t mean you should. Especially if you value sanity."


This blog post was brought to you by too many sleepless nights, too much coffee, and one brave Odia dev who believed in the dream of Chhaki Suna.

Built by noobs, for noobs, with love 💻❤️