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

8h 31m 33s logged

Devlog 2

Making this devlog after a long time of doing all this work, the frontend part is still uncommited in github though

Lets talk about backend first ->

  • I first of all was using playerId for the routes to verify the user, but now I’m using socketId
  • And also for reconnection I’m now using a reconnectToken which is created on the socket server and given to the frontend to it can pass it when reconnecting.
  • Also I added a ROOM_KICK event.
  • And I added docker setup too but its still buggy
  • Changed Winning logic so that first correct guess wins

Now Frontend

  • I designed the pages using AI because I am not a good designer rather I am a good coder you can say, because if there is a already made design, I can make a similar one using tailwind and shadcn and other UI libraries
  • I added socket setup for the frontend which goes as follow
  • src/socket -> index.ts, emitter.ts, events.ts
  • src/components/SocketProvider.tsx
  • Socket Provider has the listeners
  • emitter.ts has small functions that can be directly used inside tsx instead of importing socket
  • There are 3 pages currently -> /, /lobby, /play
0
9

Comments 0

No comments yet. Be the first!