stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

9h 57m 42s logged

Devlog - 6

This is gonna be a long devlog.

Lets start with the frotend

  • I committed the prev work from the previous devlog as mentioned there.
  • Added welcome, settings page, Added friends sidebar with realtime functionalities.
  • Added a friends store to store incoming friends invites.
  • Fixed some file structure to have protected routes inside (protected).
  • And mostly this covers it for frotend

Now lets talk about backend that made this devlog of 10 hours :cryin: :cry-cursed: :crying-and-praying:

Backend

  • I first connected the socket with the player from the db via jwt tokens.
  • Stored some player data like id, username inside socket.data.
  • Then I changed my room mapper implementation to use player Id instead of socket Id and messed up in some places where socket Id was still getting passed to room mapper :cryign: :cryign: which made me spent so much time looking for what is the issue why isn’t my room details getting sent to me and I was looking in nextjs frontend for the issue. I spent so much time finding this bug
  • I added some more events for player invites and added a new redis key:value pair -> player:playerid to store player details like id, username, socket id, roomId, lastHeartBeatAt also removed lastHeartBeatAt and reconnectToken from room player.
  • Added events for invite, server event of invite:sync and made realtime invite work which took me forever.
  • Made some changes in connection event so it handles reconnection

Finally let me tell you something when visting the website if the thing looks small the implementation of that thing takes so much time.

Bro Literally the friends sidebar took so much code to make in the frontend and in the backend and in the socket server as well. like that small piece of the page took me so much time to make which also made this devlog So long.

Incountered so many bugs along the way. They were all silly mistakes some were logic error but most were silly mistakes as there are so many files in the project now its hard to find some things.

0
38

Comments 0

No comments yet. Be the first!