Multiplayer Test is live!


Woooo boy. Okay, so, I made this entire game as a singleplayer experience in about 3 days. It was pretty quick, it was pretty painless, and it was a great exercise in procedural generation with the asylum! But _then_, I thought those words that I dread thinking.

"But what about multiplayer?"

Now, adding netcode to a game is no small feat. At all. You want to add a feature to your game? Well, now it takes five times as long to do it if you're new to netcode (as I am!). It was a very rough learning experience, but I've come out of it a lot more confident with the Mirror networking package in Unity. One problem still eludes me though- In order to do multiplayer I have to have the player port-forward their client. Now, this used to be fine and dandy 15 years ago, but with NAT punching and everything nowadays it just feels unacceptable. I have two options to fix this: 1) Buy a steam page for the game to use the Steam network to do it for me, or 2) set up a lobby matchmaking system using a raspberry pi at my own home. #2 doesn't really feel reasonable to me, so for now the workaround is to just use hamachi (what a throwback! is it even free anymore? I don't know) You also could just, you know, port-forward your router but I by no means am expecting folks to do that.


The hardest part of the netcode conversion? Changing that damned red light to green when you flip a breaker. I had an awful time trying to figure that one out, as the player has special authority over the _player_ in Mirror, but not objects that aren't the _player_. it took me hours. and I mean HOURS. to get the little light to turn green. It was an incredible feeling when it finally worked though.

Mirror made syncing the animations and positions and variables of the game quite a bit easier though. to sync the animations, I just add 1 thing to my player. I don't even have to set anything up! What a dream that was.

Anyways: Holy cow. I can never finish a SINGLEPLAYER game, let alone a multiplayer game- yet for some reason the first one I would consider the closest to 'finished' I went crazy hard in the paint on and made it multiplayer. Then added even more! This has been a blast to make, and it's even a type of game I would play myself, which is the crazier part! It's a lot harder to make a game you would play yourself, believe me haha


if anyone got to the bottom of my rambling here, here's a few new things since the singleplayer version came out a few days ago:

- New type of map generation! You have about a 50% chance of getting the caves, have fun in there!

- player model! finally! what a day this is! Enjoy playing as George, the facility's newest employee!

- 4 dances to mock the monsters with (f1, f2, f3, f4)

- updated monster behaviours to handle edge cases better and >1 player!

- overall lobby score, so you know how long you have survived!

- swaying flashlight! (this one is a personal favorite. makes it feel more real than just a static flashlight, you know!?)

- lobby area to screw around in! I will be adding toys and goodies to waste time with while you wait for your friends here. I imagine a lot of folks will be sitting here a while, and we can at least keep them from boredom! (racetrack, anyone!?)

- better lighting!


I hope you all have fun in the facility, don't get too spooked ;)
PS: Keep an eye out for the notes you'll see appearing in the next few days around the facility! It may give you a better clue or two as to countering these foes!

Files

WhoLeftTheLightsOn_MultiplayerTest.zip 509 MB
Dec 25, 2023

Get WHO LEFT THE LIGHTS ON

Leave a comment

Log in with itch.io to leave a comment.