#Multiplayer discussion
1 messages ยท Page 1 of 1 (latest)
I do. I'm working on my first multiplayer game so I have many questions.
What's your AWS setup/architecture? Do you use gamelift + docker? Kubernetes + agones? Or do you keep it pretty vanilla, using EC2 instances? Or, heck, do you leverage a multiplayer offerings of a service like unity or photon?
What resources have you consumed to help you sort through the details of how to set up your game? What resources have helped with infrastructure details?
For me, I'm using a lib for multiplayer and extending it to fit my needs. My game is simple: facilitate getting users into a room so they can play loosely defined games together. A challenge I'm trying to think through is... Should have room get its own unity instance (#horizontal scaling), or should I try to batch many rooms onto an instance so I can have fewer game instances in my fleet (#vertical scaling).
Do you use gamelift + docker? Kubernetes + agones? Or do you keep it pretty vanilla, using EC2 instances?
Just vannila stuff, but is more because it we already had it for different projects rather thananything else. AWS have quite usefull tools for gaming, but it depends on your game what you need and what you dont. Also depends on integrations of other parts, like API's or websites and etc.
Or, heck, do you leverage a multiplayer offerings of a service like unity or photon?
We are using Mirror for multiplayer part. Reason is it gives a lot of freedom, is free and easy to modify, the community is really good. And at the point of project start NetCode for game objects did not exist. Sadly I cannot say which one is better currently as dont have exact compasrison data.
But Mirror is really good plugin for multiplayer. Unless you making fps or physics based games, then you better with Photon stuff.
Kubernetes + agones?
sadly not yet, kubernetes is in the planning, as it makes way easier to handle stuff. But if you have some free time you can manage without it.
Should have room get its own unity instance (#horizontal scaling),
Depends on your game. And how many people will be in one "session". If there is like 4 people per game, it is better to have multiple games running on one server. But if room is of 200 people, then multiple instances is better. Once again it is very dependanton game. We going with horizontal scaling per room as target in one room is about 200 people (maybe more in the future). But our game have very simple stuff on it. As you need to think not only about server, but about Client as well, 200 people on screen for webgl is a nightmare. unless character are super simple and animations are limited + optimisations and stuff
What's your AWS setup/architecture?
+GateWay (for supporting more ports and evading manual ports forwarding on AWS)
+NGINX (for all server setups)
+WebServer
+Multiple instances of Unity servers running on one virtual machine. Servers starts and stops automaticly, virtual machines needs to be started manually.
or should I try to batch many rooms onto an instance so I can have fewer game instances in my fleet (#vertical scaling).
You can combine them both. more work will be needed but still works possibility,. all again, these questions is 100% depending on game.
Thanks for these details. Keep 'em coming, if you have more. This is great content
I do. I'm working on my first multiplayer game so I have many questions.
If it is your first game... I strongly suggest dont make it on WebGL. As you will need to sacrifice too much time for this and it gives almost no advantages.
- No VFX - no pretty performant visual effects
- No multithreading - as currently multithreading is out of question (there are mirrors it might be supported in future, but not now). So performance on bit sad.
- network Transport layer will be WebSockets, so you lose a lot of optimizations and hit a lot of limitations here as well. So your cost for networking will increase.
- more bugs than other platforms, need tons of work around.
- Webserver setups can be confusing and lead to a lot of frustrations
- Webgl 2.0 was not updated for ages, so you working with quite old tech. so you looking at 20-40(maybe less)% performance of what you could get otherwise. FOr exmaple ThreeJS will give you way better performance on every aspect.
Do you collect telemetry/analytics on your game?
I would use webgl of unity only if you have plans on releasing on other platforms and want it to be connected and play together. Or you Boss is very mean and told you to sacrifice your soul in fire and continue work on webgl :"D
Ha, I'm pretty committed to webGL. They got unreal games running on old iPhones. I'm sure I can get what I want, even if I have to do more smoke and mirror techniques to help create the illusion of a more detailed game than it is actually
Collecting data only on server, from client data is collected and sent to server which writes data to database. But for now the data collection is minimal.
Iphones and webgl are not friends. As you will have limit of around 500mb RAM, anything above that will not work and crash on webgl. So you will have way better luck creating Iphone Application and android aplication and run it. Only thing you will need to handle Apple store and Google store stuff.
so there is no such things as : oh cool games runs on Iphones because it is on webgl. Native app will run 2-4x better.
sorry for bit of demotivation, but just want to warn you before you will see problems you will meet beforehand.
One more tip, if you want to work with webgl regardless of all problems mentioned, work with latest 2022 or maybe even 2023 unity versions. As unity team works on webgl improvements little by little, but most of these upgrades does not reach older unity versions
Makes sense. Is it worth upgrading from 2021 to 2022?
In my opinion it is A MUST
Thanks for the warning! I'll probably see where those limitations are at. Easy sharing is a major selling point for what I want. It won't work if first time people have to install apps. Native apps on the road map if enough people decide they want to play my game ๐
Well if you targeting for NFT and other web 2.0 stuff yea I guess. And you dont need pleasing gameplay, nice visual and pleasant experience then yea, WebGL is way to go. Otherwise I would suggest go with native threeJS.
and other tip if you will continue working with webgl: start using addressables form the start and learn shader stripping just in case ๐