WebGL can't be server!?

I’ve been making a small 2D multiplayer shooter in UNet, and am planning on publishing it on kongregate via WebGL. I thought I could have the player port forward and host the game, which I would put on a list of active games on some sort of web host. Then other people could sort through the list and join their game, which would be open because they portforwarded. But I just found out that WebGL can’t be a host, so I’m at a loss as to how I’ll be able to get my players connected. Can you guys give me advice?

PS. relay server is not an option, nor is paying for servers :frowning:

1 Like

Hey!

Unity offers 100 free player slots for multiplayer look here Game Development Software: Build a Multiplayer Game | Unity
howether that cannot be connected via webgl as Webgl advances it will probably allow this but in the mean time I would say you should portforward a server on your computer as localhost and then have a button that connects to your computers server

So, how would this work if the client wanted to host his own server? Download a standalone that I provide for them?

I just portforwarded 7777 in my router settings, made my unity editor the host, and tried to connect via my public ip with my webgl build all on the same computer. My webgl build couldn’t connect unless I put in my private ip address. Is this because of Reverse NAT or did I do something wrong?

Ok, I uploaded a test build to kongregate, to see If I could host on another computer, but when I put in the ip and press lan client I get a “An error occured running the Unity content on this page. See your browser’s JavaScript console for more info. The error was:
SecurityError: The operation is insecure.” error. I ticked use web sockets in unity is there something else I need to do?

I just tried a webplayer build and can’t even connect to my unity editor, I’ve tried localhost, my internal ip, and my external ip. use web sockets is still set to true. I don’t want to use webplayer I was just testing to see if it would work.