Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

I actually wasn't sure what Netfox or Noray was until I just looked them up. I did not use either. 

The way it works:

When we make merges to our main branch, we kick off a pipeline that builds two versions of the game. One for the client that gets pushed to itch.io and another image that is the server export for linux that gets stored in a registry. Whenever you go to the lobby to create a room, you're actually sending an https request to a python application that acts as a orchestrator on a cloud instance. The orchestrator sees you sent a get request and then reaches out to the registry to pull the latest image of of the server game and deploys it. Then your unique id and along with anyone you share the room code with gets assigned to that game room. Once the start button gets clicked, we send a message to that game room to start, and in return the client instance get handed off into the game room. .... in a nutshell.

I'm not sure if this is how other games do it (first game for me) but this is what I thought about implementing as soon as I realized how client server games worked when building locally for the first time. We always had to have two instances of the game running and one would act as the host and the other we test our builds on. 

Hence the bug when auto starting another game after the end of the first game you play fails, because we never told the server instance to start the game XD.

Anyways, I'm glad you enjoyed being able to look above your head and see your money. That was my partner's ingenuity and I had a great laugh about it as well.

Thanks for sharing! I've done some multiplayer but it was using a P2P model with Noray acting as a relay which I don't believe works for web exports due to browser restrictions on UDP.

(+1)

Browser restrictions was definitely pain. I had to use a domain to create a dns record and get certbot and everything on the cloud instance. Very cool when you see it working though and play with friends. I really want to reuse this method and maybe working on a longer run game dev project some day. Turns out I really enjoy doing a little game dev.