#Multiplayer discussion

1 messages ยท Page 1 of 1 (latest)

quick river
#

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).

shut stump
#

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.

quick river
#

Thanks for these details. Keep 'em coming, if you have more. This is great content

shut stump
#

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.
quick river
#

Do you collect telemetry/analytics on your game?

shut stump
#

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

quick river
#

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

shut stump
shut stump
#

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

quick river
#

Makes sense. Is it worth upgrading from 2021 to 2022?

shut stump
#

In my opinion it is A MUST

quick river
shut stump
#

and other tip if you will continue working with webgl: start using addressables form the start and learn shader stripping just in case ๐Ÿ™‚