Can Multiplayer plugin handle large scale game like IO games?

From the Asset Store
Shark.io
$49 USD
Shark.io in the sea full of killer sharks, Sunday of life is the game. Who knows what is happening under the sea?

    Hi there

    I make online multiplayer game using Multiplayer plugin, and use VPS server as a host.

    My game type is a fast-paced top down shooter game, a room will have at least dozens of players, including 10 bots. Bots are controlled by host (using Panthfinding, line of sight and turret behavior), peer only receive a movement.

    I test it using Firefox and Lubuntu (light version of ubuntu) as OS with 1 CPU and 2gb of ram. and i get 100% of cpu (server), with 1 peer connected.

    I just realize there are so many collision (bullets) that my server can't handle.

    So, i decide to upgrade my server plan to 4gb ram and 2cpu with Opera as browser.

    Then i make a simple version of "Real-time game" example template, to just sync player movement only and remove unused functions. Just to find out how far it will go.

    With this server specs, Host only can handle 25 connected peers with lag, and only 10 connected peers are playable.

    Average ping speed is 40-60ms

    Is multiplayer plugin (p2p) can only handle small number of players ? Or i need more bigger server specs?

    Any chance to make IO games similar to surviv.io or agar.io using Construct ?

    Thanks

    Everything depends on the scope and design of your game and the way you put it together.

    When talking about supporting many players, the limiting factor is (usually) bandwidth per update on the host - all traffic has to go through the host. Construct has tools that let you measure bandwidth use, so you'll have to make your own benchmarks and test in the context of your own game.

    I don't see any reason you can't make those types of .io games in Construct. But keep in mind they are probably hosted on significantly more powerful servers than what you are thinking about.

    Be sure to read again the manual article about the Multiplayer plugin.

    And the tutorials linked.

    Especially : construct.net/en/tutorials/multiplayer-tutorial-concepts-579/players-join-game-9

    which pretty much answers your question.

    The main problem with multiple games with lots of players, is the bandwidth requirement increases exponentially with the number of players. This affects all kinds of multiplayer games and is a difficult design problem to solve regardless of the technology involved.

    I wonder how Planetside 2 does it, considering they have quite big battles at times.

    As for if it is possible, absolutely. Erigato has made some like knuckol.club but afaik he didn´t use constructs multiplayer plugin.

    This might also be interesting, I´ve stumbled on it a while back and now dug it up again, the dev talks a little about diep.io and agar.io But it´s also from 2016 so take it with a grain of salt.

    news.ycombinator.com/item

    But he hints at github.com/uNetworking/uWebSockets

    oosyrag I just test it using a simple game mechanism, only sync x,y position, and with these servers specs it's can only handle 10-15 peers smoothly, so, how big server specs i need for a complete game.

    Kyatric i already read it several times and get a bit confused about it's number

    Ashley So, there is no chance to make dozens of peers on same room using default Multiplayer plugin or p2p ? I hear about websocket, but on plugin manual they say "WebSockets are not currently a suitable choice for this.". How most io games handle dozens of peers at same time? what technology they used?

    WackyToaster I just played knuckol.club and it's so smooth and fast on kill another player, it's look like a local game with bots, but nope.

    You are asking questions about an aspect of gaming that is a science unto itself. Here's a place to get started:

    https://medium.com/@narengowda/how-does-any-mmo-games-backend-work-df19b44f73a7

    To answer your question about how much hardware do you need: To sum it up, there's an old saying amongst those who hod-rod cars and such, there's no substitute for cubic inches (I guess liter's in today's world). The bigger the engine, the faster you can go. Same goes for game servers. There's no substitute for hardware and bandwidth.

    Running a game server on a shared host with 1gb ram and a platter style hard drive is NOT going to come close to a dedicated server with gobs of ram, an M.2 drive and massive bandwidth.

    Now that being said, there was an old multi-player game from the late 80's that easily handled 16 players on a server with bullets, lasers, and gobs of other events, all on 386 machines over dial-up using just one server to host the game.

    en.wikipedia.org/wiki/Netrek

    Has anybody looked at setting up a signalling server that could split the load between hosts?

    I mean multiple player/host instances.

    redfoc The multiplayer plugin uses WebRTC data channels to transmit data. These can be set to a UDP style mode which is low latency, but is "unreliable". It's also peer to peer so one player acts as the game server, if that user has a limited bandwidth then the other players will suffer.

    Websockets can only work via TCP which is "reliable" but with higher latency. As it's done via a dedicated server you have to manage server resources for your game, but data centers have good internet connections so bandwidth problems are going to be less of an issue. Only individual users who have poor connections suffer.

    As your dealing with trying to sync data over the internet some level of prediction and correction will be required to maintain smooth animation. This can be really gnarly to get right, and causes "snapping" or "rubber banding" in online games when user latency is high.

    Websockets can definitely be used for this style of game, after all this is what the original "io" games used. But you will have to deal with the latency and prediction issues somehow.

    Typically MMO style games use "sharding techniques" so that players are on different servers depending on where they are in the game. When you have large numbers of players in one area they tend to churn because of this. They will also design their gameplay so that split second timing is less important, and limit how much players can interact with each other.

    For general MOG discussion, I found this book series pretty informative:

    amazon.com/Development-Deployment-Multiplayer-Online-Games/dp/3903213055

    The rest of the series is work in progress and early versions are here:

    ithare.com/contents-of-development-and-deployment-of-massively-multiplayer-games-from-social-games-to-mmofps-with-stock-exchanges-in-between

    Fengist

    You're right, i just test to run my game on a dedicated server with relatively same specs just more ram, and CPU usage for handle same peers count are lower than VPS with relatively same specs, but the price plan is also quite higher. Thanks for your link reference i got a new things here.

    Nepeo Thanks for your explanation

    I just realize why i got lagging (player movement) if there are a dozens of peers because my PC CPU are going to 100%, i test it by opening an url on new window as peer. Since i can operate my PC smoothly to browsing and open an app while my CPU are going to 100%, so i did't realize it's my CPU problem.

    When i open my game on Smartphone while my game that running on my PC are got lagging, game are just run smoothly (and another peers movement) on my Smartphone like there is no problem.

    So, with 2cpu and 2gb of ram (VPS) and 35 peers connected, server cpu are going to 75%, i think this server specs can handle upto 50 peers at same time until got 100& of CPU usage.

    I test it with my actual game (described above), there are many collision checks and bot movement that need to by handled by server.

    Just to put into perspective, a commercial game server can easily have up to 32 cores and 64 gigs of ram on Gb connections. And they aren't limited to just one. Again, that depends on the scope of your project though. If you're efficient about it, you can handle many players on a lower end system, but it all depends on how you put your game together.

    Also, high CPU% is not a cause for concern, it is a good thing that your CPU is being utilized. It only becomes a problem when it results in your FPS dropping.

    The main thing missing from the multiplayer plugin is filtered selective syncing, but that would make things a magnitude more complicated than they already are. For an MMO you'll need a reliable database system supporting it anyway, which is outside the scope of Construct. There are definitely ways for Construct apps to communicate with external databases though.

    I wonder how Planetside 2 does it, considering they have quite big battles at times.

    As for if it is possible, absolutely. Erigato has made some like knuckol.club but afaik he didn´t use constructs multiplayer plugin.

    This might also be interesting, I´ve stumbled on it a while back and now dug it up again, the dev talks a little about diep.io and agar.io But it´s also from 2016 so take it with a grain of salt.

    https://news.ycombinator.com/item?id=13266692

    But he hints at github.com/uNetworking/uWebSockets

    Thx for mentioning my little game,You are correct i would never use the official multiplayer plugin for things outside of a local co-op game,The official multiplayer plugin is indeed good for somethings but lacking basic things like interest management that can easily be created if you follow along a basic guide like dynetisgames.com/2017/04/05/interest-management-mog really gives it a 1 star out of 5 for me.Using the websockets plugin is more than enough to create a smooth multiplayer experience but it's far from beginners friendly since it will require you to know javascript and have looked into multiplayer architects

    Maybe because he's not lying. While the multiplayer plugin may work, I've found it to be wholly inadequate for doing much more than a lan game. Were I to write a multi-player app that were going to work over the internet, I wouldn't even look at that plugin, I'd write my own websocket server (In C# mind you, not JS).

    IMHO, He answered the question honestly and with a link to a very interesting article on server design.

    Either way, at least he didn't bomb the thread by asking people to donate cash in order to get an answer.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads

    New accounts bumping a thread with vague information and a link ticks a lot of spambot boxes and we routinely delete similar posts, but it can be hard to tell sometimes. This one basically got let through because I can't tell, I'd rather not ban someone who might be a legit user, and if they're a spammer they'll end up banned soon enough anyway. Either way there's no need to get angry about an odd post, or start taking digs at people. Closed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)