Rezoner

Wilds.io - Multiplayer hack'n'slash

Recommended Posts

This game is impressive, and your approach to how data is handled in multiplayer via a tweening method resulted in an incredibly smooth experience with little to no lag. Amazing! I felt kind of skilled being a single axe, no name midget actually taking out larger players who use two axes.

Share this post


Link to post
Share on other sites

@danzel The library is great in terms of performance (clearly faster that websockets/ws) but I am getting serious spikes/lags for an unknown reason.

Arrival times between packets. 0 means that two updates arrived at the same time - so it either fails to deliver or postpone delivery. That's not the case with websocket/ws

rBxO39g.png

Share this post


Link to post
Share on other sites

Urgh, that is a bit wonky. If you could make a reproducible testcase and post it on their github they might be able to fix it up.

On a related note, what do you use for running ticks at the server end? I found using setInterval wasn't very good at keeping accurate time and would drift out, so I'd end up with the server running at 95% speed of what it should be.

I ended up writing a Fix Your Timestep CPU accumulator and using setTimeout for timing.

 

Edit:

You can check out my game over here :)

 

Share this post


Link to post
Share on other sites

Hey @Rezoner, so far it is really impressive.

Regarding ws, what module are you using for nodejs?
And regarding compression, we found that protobuff performs really well in terms of data reduction as well as parsing speeds.

Regarding extrapolation and client-side prediction, with tanx we had to go through a lot as well. Initially we had simply interpolation, and had people complaining quiet a bit about a lag. This has a lot to do with TCP as well, as it can get latency unreliable with network quality spikes.
So we had to come up with some weak extrapolation mechanics, that allows to implement decent client-side prediction, and avoid a need to create time-machine on server side storing game states and resolving paradoxes. And it worked pretty well. For those who have latency below 150, experience improved a lot. Those who have above 150ms latency, it got better a bit, but then it can get too crazy so it gets unplayable, not much we can do. What you going to do in that scenario regarding high latency players?

Another few interesting questions:
1. How do you cluster space on server side?
2. Do you send delta data tailored to each client, or generic delta of object?
3. Do you have visibility list, and send to clients only what they potentially see?
4. What is bandwidth requirement for good quality play?
5. Below which latency it gets "not playable"?
6. What is your update rate on server side?

It is great to see html5 multiplayer projects, as I believe it is great platform as being one of the most accessible, just a link.

Share this post


Link to post
Share on other sites

I just started your game and I love it I'm pretty good at it so I started playing ranked a guy tried to attack me but I circled around him and defeated him he didn't hit me once so he called me a hacker and went on to report me and now I get this message every time I try to play it

403 Forbidden

it really sucks since I wasn't using any cheats my in game username is ZISGAMING21 could you pls remove what I have probably an IP ban

 

Edited by ZISGAMING21
bad grammar

Share this post


Link to post
Share on other sites

@ZISGAMING21 It's not your fault mate - the game has been under DDoS attack. It should be working by now.

@danzel Lovely idea. I would add up more juice to it - the fade out animation doesn't feel rewarding for clearing out the blocks - especially you should differentiate visual reward between clearing up 3, 4, 5 or more blocks. 

1) If you want to decrease the bandwidth usage with one line of code - compress your JSON with LZW

2)Tho I would change this {x: 44, color: 6, type: 0} into a fixed [44, 6, 0] and go with BiSON - https://github.com/BonsaiDen/BiSON.js

Above all - if you are sending the same message to all players - the main secret is to compress ONCE and then send to everyone - disable perMessageDeflate and set { compress: false } when sending data - because you compress the same thing 20 times.

I wouldn't bother with any binary stuff for this game - and focus on gameplay instead - it's almost turn based.

ps: I have asked uWebsocket author about the spike - but I don't really understand the answer - https://github.com/alexhultman/uWebSockets/issues/137

@moka Ok - so despite of everyone thinks - I am not a technical nerd - so some of my answers may sound silly to a professional (:

As for extrapolation I will be adding movement prediction - and fire the attack right away - my attitude to that is more psychological - I believe that players are ok with some delay as long as it is constant - that create certain flow of the game. Not my words actually, but guy who did networking for Age of Empires. Also my game is much slower than regular FPS or any kind of arcade shooter.

1) If you mean how do I take advantage of multi-core architecture - I don't - I am using bunch of 1 core servers.

2 and 3) I send same data to all the clients - which of course makes things like hiding in bushes impossible to implement or at least very prone to abuse. I compress a bulk of data once and send it to everyone.

4) The game eats up between 6 to 12 KB/s

5) IDK, I don't measure the latency - but I guess anything resulting above 200ms response time becomes annoying

6) 20 times per second - I have experimented with rising up this value - but it doesn't improve the feeling much.

Now for the technical juice part - I am using websocket/ws (I can't understand popularity of socket.io which is just an abstraction over another abstraction over websocket/ws). I have high hopes for uWebsocket pointed out by @danzel - the performance is AWESOME - but the spikes it has are untolerable (see this https://github.com/alexhultman/uWebSockets/issues/137)

I am most successful with UTF8 and BiSON without even deflating that - and I have tried tons of compression combinations. From binary methods I have only tried BSON (not BiSON) - which was 50% CPU gain over UTF - but for some reason my servers became very laggy after an hour.

I believe that Protocol Buffers (or simply any form of fixed structure encoded into a binary) is the cutting edge of what you can get. I will be switching to that too - soon - I just don't have time to rework my architecture now. I am also using fixed structure binary packets, although I send them over UTF-8 - read specs of BiSON - it's not much different than BSON or PB... or any binary format since decades ;p

If some of my answers are not adequate - don't hesitate to tell - I am not a native english speaker so if you rephrase something for a 5 years old it might click :)

Share this post


Link to post
Share on other sites

are there any ideas of new game modes and new classes maybe a domination or capture the flag mode since the game is already pretty awsome how it is but it would be way more awsome to have even more competetive feeling to it so you want create a tribe and call a friend to play some capture the flag or something together make strategies and all that stuff

 

Share this post


Link to post
Share on other sites

@rezoner thanks for the feedback. Things like this are definitely on the list, needed to get the game out there and proven first :)

On the uWebsocket thread, i think alex has misunderstood you. 'Tick' probably has different meaning to him (it's pretty game development specific). I'll reply as I'm also interested in this being fixed :)

Share this post


Link to post
Share on other sites


@danzel Thanks for your intervention on Github - I would leave it as is if you haven't poked the topic and now we have that fixed - and dear God - this lib IS fast.

@ZISGAMING21: There are TONS of ideas - but there are two problems - I am working alone currently (splitting the time for freelance as I still have commitments to fulfill) - the second one is that the game is not popular enough to add more modes that require match making - it results in extremely long waiting times - nevertheless yeah - there will be mage, and shaman hero soon - then archer. Soccer and CTF game modes.

Share this post


Link to post
Share on other sites
1 hour ago, ZISGAMING21 said:

np I'll help spread the game I love this game and its very awsome that you can make such an awsome game all by yourself

 

is there a youtube channel since that could be a way to show gamemode betas and help spread the game and the subs can then help spread the game to gaming channels and you're able to make some earnings from YouTube

 

Share this post


Link to post
Share on other sites

@Rezoner

Your comments really helped! I realized my WS lib was shitty and moved to websocket/ws, and performances greatly improved (also used the perMessageDeflate: false trick). My servers can now handle twice as many players, it's really huge. Thanks a lot!

I've spent a lot of time on ws optimization, I tried binary sockets, msgpack, and even custom obfuscation, but none of these seemed to improve performance (I mean, they reduced messages' sizes but increase CPU usage too much). The only thing that really was a huge improvement in the end was the use of differential packets (not sending the whole world state, only what has changed). It proved complicated to implement but immensely rewarding.

Can't wait to hear more about your project and experiments. One of the few that try to push HTML 5 to the next level.

 

Share this post


Link to post
Share on other sites

Hello, it is quite a nice game !!

I just wanted to let you know that I know that feeling of constant update needs, bug tracking and fixes and so on .. and how it becomes frustrating. I was in simmilar situation two years ago with my MMORPG I made alone. When I launched it, it was cool and I enjoyed it really well with other players  but after 6 months I felt totally exhausted and wasnt able to keep it up all by myself - thats why I have to suspend that game temporarily (but probably forever).

What helped me was creating "simpler" games instead - games that scale on their own (no predefined content that need to be scaled up) I am still hoping to revive my MMO some day, but I will not do it alone anymore as it is unbearable (with full time job to earn for living).

I have one question if I may - how did you promoted  your game in the first place ? I mean .. I am facing the same problem all over again with all my multiplayer games - there is never at least several players online at once. Someone comes in and is alone there, leaves and never come back again, lot of people wrote me that game itself is fine but unplayable without some other players, that made me think about meaningfulness of creating multiplayer games at all cos such games are usually boring when played solo. I am not sure if I described that problem well but I think you know what I am talking about - the constant flow of players that actually meet each other ingame is what I have never succeeded to have.

My last project (I will publish it here today) is also multiplayer but it is focused mainly on solo play against NPC´s with multiplayer just as a cherry on top - it is sad but I didnt want to make the same mistake again :)

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.