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

LARPARDY!

  • 4 Devlogs
  • 16 Total hours

I'm making a Discord activity game inspired by Jeopardy that you can play with your friends!

Open comments for this post

1h 15m 24s logged

oops…

I wasted some time on accident, woops.
I thought Discord’s proxy verification meant that the discordsays.com proxy would send these headers to verify that an actual Discord client had connected with them, but uh, I checked the flowchart again and I got that wrong. Hm. Thankfully, I didn’t get too far into implementing that.

Regardless, trying to implement that still encouraged me to do a small bit of cleanup, which was properly declaring the environment variable. A certified :ts: moment.

(YES I am going to abuse the fact that I figured out that you can use custom emotes here. i am so sorry)

smol devlog

0

Loading discussion…

0
2
Open comments for this post

7h 18m 10s logged

I HATE DOCKER i love Docker!! :33:

So, I didn’t even write a devlog yesterday because I spent the entirety of the time that I did have setting up a Dockerfile and docker-compose.yml for LARPARDY.

…why did it take that long

Because I’ve never used Docker before! Well, I have, to run services on my PC and my homelab server, but I’ve never used it for my own projects before.

Specifically, I want to go ahead and set up Docker because I know that I’m going to need a database (or possibly two! SQL + Redis), and running everything together in a container will make both development AND deployment much easier for me.
I’ve never used it before, so this is, uh, a learning experience, to say the least.

oh also, pnpm

Oh. Also. pnpm has a bug. Apparently.
I’m using pnpm as the package manager for both the server and the client (since they’re both TypeScript projects). Both projects are stored in a monorepo (literally meaning just a repo with multiple projects, basically), which makes it easy to manage for me and keeps my commits together.

Nicely, pnpm recommends a Dockerfile for this exact scenario! I reconfigured the project to use pnpm‘s workspaces feature (which… is seperate from package.json’s workspaces, for some reason) so that this would work.
pnpm deploy is supposed to copy the project with it’s own node_modules since workspaces use a shared one. The problem is that, when it rewrites workspace dependencies (because I have a shared package for both the server & client), it links it to the wrong source, which no longer exists after it’s copied!
I tried to debug and get this working for ACTUAL AGES before I gave up and just wrote commands that manually copy the files instead.
I figured that there HAS to be a way to get this working, considering the documentation itself recommends this build file. But noooope. It doesn’t seem so (cite: this GitHub issue which has been open since… 2023???).
:bleh:

so what did you actually do

The Docker config works now, and that’s the important thing! I currently have the client build into an nginx image, but I’m either going to drop this entirely or have the server serve the client files itself. This will allow me to implement Discord proxy header verification too, if I decide to.

0

Loading discussion…

0
1
Open comments for this post

1h 43m 59s logged

Socket.IO!

As for perhaps one of the most important bits… this is Socket.IO! I had to figure out how to get this working with Fastify first (thank you random GitHub commenter) since that’s my web framework of choice for the backend (for anything not going through Socket.IO), but here’s a basic implementation of it working!

what it do?

Socket.IO works similarly to (and if it’s available, on top of) WebSockets, where there’s a persistent connection with bi-directional communication between the client and the server. Socket.IO adds some extra fancy things on top of that, such as fallbacks when WebSockets aren’t available and rooms, and in general will make my life easier (lol).

This part is, of course, very important for getting a game handled by the backend to work! This will also allow us to do multiplayer. Discord gives you an instance ID for each activity that players are playing together, so I’ll use this to make the rooms, that way players in the same voice channel will end up in the same game!

0

Loading discussion…

0
4
Open comments for this post

5h 48m 34s logged

ho boy…

I’ve wanted to make a Discord Activity basically since the feature began being teased… so, no better time than the present, right? I saw some guys playing Jeopardy the other night and I realized that I feel like the online ways of playing Jeopardy are kinda… uh, bad? I thought I should fix that.

I’ve been getting a lot more comfortable with frontend development recently (I’m normally more comfy with backend stuff!), so now this is really going to test my ability to handle FULL STACK development.
With that said, I’ve been playing around since last night and I have a working setup with (stable) communication with the Discord client via the SDK. (hooray!) Currently, it just shows the name and avatar of connected players.

don’t you love React?

Me too! Unfortunately, I am lying.
I’m trying Vue.js for the first time for this project. There is a LOT that I’m planning that is very new to me for this project. I expect to need Redis, Socket.IO, and (of course) the Discord activities SDK, none of which I’ve ever used. So, here we go?

the name. dude. what. why

I didn’t originally have a name for this (the README still remains “Untitled Jeopardy Clone” for now), so I was using the name “Leopardy” as a placeholder. Someone recommened me to switch to LARPARDY.
I couldn’t say no. I wish I did.

…anyways, next up is actually making some sort of game state work. I’m going to start working on the backend!

0

Loading discussion…

0
4

Followers

Loading…