I’ve hit a dilemma where I cannot fully use Steam’s matchmaking and hosting functionality because I am not using their Networking API. So that means I would have to rewrite my entire networking code if I want some of Steam’s useful networking features to work. I’m hoping it is possible to make a fork of SpiderMonkey that can act as a wrapper of some sort for the steamsockets API when a boolean is true, and works normally without going through steam’s sockets when false.
To give more information why I need to do this:
My game has client/server based multiplayer modes that will last about 10 minute per match, and I plan to host the match on one of the player’s computers during my game’s Early Access phase, because paying for dedicated servers is not a viable option at this point.
And even if I do get dedicated servers, it is still useful to let players host local and custom matches with friends on their own machine so that the dedicated servers can be cleared up for matchmade games that are more competitive and expected to be secure and cheat/hack free.
But when using SpiderMonkey, the only way a player can host a match on their machine is if they have port-forwarded the proper port- something that not many normal users are willing or able to do. (I’m also not even sure if Steam will allow me to list my game as multiplayer if I require players to port forward, based on other things they’ve been picky about so far)
So to get around this, Steam’s support told me I need to use this API and that it will handle all the advanced stuff to get around the need to port forward (I believe Steam uses a relay server to do this and to offer extra security for its users).
The steamworks API looks very similar to SpiderMonkey, so I hope it’s possible to setup a version of SpiderMonkey that converts messages to the steam equivalent before sending them, and back to SpiderMonkey messages upon receival - or something like that so it is effectively using the same code to go through steam’s networking sockets instead.
https://partner.steamgames.com/doc/api/ISteamNetworkingSockets
I will be putting in a lot of work to do this, because letting players host matches locally without needing to port forward or have dedicated servers is a very high priority issue for me. But I will likely need a lot of guidance to get started and to make sure that what I want to do here is possible.
Any help or insight on this idea is greatly appreciated