Connecting rooms by geo
I know that new rooms are colocated with the first person who enters the room, but is there a way to specify room geos manually? The use case is funneling players automatically into an existing room for their geo or to create one if it doesn't exist. Right now, my game just funnels players into any open room, which can cause some players to get stuck with bad ping.
If I have to do this manually, is there a way to know what geos Normcore supports? Or is the best thing for me to just bucket them on my own and let the buckets connect to whichever Normcore server it finds?
8 Replies
Hi @kyle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Normcore automatically places new rooms in the region closest to the first client who joins, optimizing for low latency by measuring the latency between the client and all available regions and picking the one with the lowest ping. This is designed to ensure the best possible experience for the majority of users in a room, leveraging Google’s premium fiber network for fast packet delivery across the globe Server Placement.
However, the knowledge sources do not mention a built-in way to manually specify the region or geo for a room at creation time. The default behavior is always to colocate the room with the first joining client. There is also no documented API for querying existing rooms by region or for explicitly creating a room in a specific region.
If you need more granular control over room placement or want to funnel players into rooms based on their geo, you may need to implement your own matchmaking logic outside of Normcore, possibly by tracking room regions and player locations in your own backend. For advanced or custom server placement, you might consider reaching out to the Normcore team directly, as some features (like custom room server options) are in private beta and may offer more flexibility Room Server Options.
In summary:
- Normcore auto-selects the region based on the first client. - There is no documented way to manually specify a region for room creation. - For more control, consider custom matchmaking or contacting Normcore support. If you need features beyond what’s documented, the Normcore team encourages reaching out via their Discord or support channels for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
- Normcore auto-selects the region based on the first client. - There is no documented way to manually specify a region for room creation. - For more control, consider custom matchmaking or contacting Normcore support. If you need features beyond what’s documented, the Normcore team encourages reaching out via their Discord or support channels for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
<@401595391549898754> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
no but you can add it to the requested features channel
We’re rolling out the preferredRegions API soon. In general we recommend having folks join by region and the rooms typically land in the right place
ie have folks select a region in the app and prefix your lobby name with it or create public rooms with a region in the name to start
if you give users the ability to select a region, they're naturally going to think that they can actually select the region of their choice, not that they HAVE to select to region that they are actually in. And users selecting a region other than their own is actually quite common in small community VR games.
So then you get the case where an EU player wants to create a NA lobby, they select NA as the region, start the lobby, and now you have an EU lobby that's marked as NA.
You can get around this issue by actually geo-locating the player and selecting the correct region for them, but geo-locating isn't a trivial issue to solve. Last time I looked I couldn't find a free solution with unlimited use, so it would likely have to be another service to pay for. Can Normcore tell you the region you're connected to now? Last time I checked it didn't. If it at least told you the region that would be a big help.
for now, could I get a sense for where the servers are? I've seen California, Illinois, Singapore, Netherlands so far. does that about cover the options for now?
I'm trying a simple solution using cloudflare colos. every cloudflare worker request has a colo, so you just need to map that colo with your geos
Sure but Im guessing you’re already using Cloudflare for something else and not just for geolocation?
I'm using CF for backend generally yeah, but the geolocation thing is just one tiny worker. it just takes
req.colo
and then maps it to a region using this list https://github.com/Netrvin/cloudflare-colo-list. it's like 20 lines of worker code and 350 lines of dictionary