agar.io-clone
agar.io-clone copied to clipboard
Change to 60FPS?
Why not change networkUpdateFactor in config.json from 40 to 60 to change fps to 60?
That's a good question. But still if I change it there is some jittering in the image, like it draws at the same position twice
Network update speed isn't the only issue, other factors like rendering also take up time.
Maybe add some interval between updates and apply interpolation on the client side? If you have that in mind i could help.
How I understood, you have no interpolation on client side? Only change position by server data?
Yes, at the moment the position is only changing by server data. But setting up movement prediction on client side shouldn't be a big problem.
Ok. Thank You for fasten answer. I discovering sources becouse I making similar game and noticed, that in original agar.io animation is more smoothed.
You're welcome. I'm also working on a similar game, but I would suggest you not to start from this project because there are a lot of things that aren't "production ready" in it. ;)
No, I found this repo only after I started) My game with star ships))
Can you please be more specific about what isn't production ready?
2016-08-07 16:06 GMT+03:00 Novikov Denis Yurevich [email protected] :
No, I found this repo only after I started) My game with star ships))
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/huytd/agar.io-clone/issues/397#issuecomment-238081430, or mute the thread https://github.com/notifications/unsubscribe-auth/ARCJwPtumTPCsb-pQm0MvJErA-woGMqCks5qddhOgaJpZM4Hu1Gu .
Socket.io isn't really appropriate for this kind of game. Websockets packets are too big. Too much nested for loops. Movement prediction is missing. The quadtree is recreated for each player when it could only be recreated once per update. But the project was still really helpful to me when I was only a beginner. It was a really good startpoint. :)
Hmm, native websockets should be better right? As for the packets, what's the maximum size they should have?
I'm using einaros ws. This websockets library is one of the fastest that I know. I don't think there is a maximum packet size. The smaller the better.