Closed ajthemacboy closed 8 years ago
Unfortunately, I'm not familiar with the packet code in MPS but there sure seems to be a lot it (one thing to look at it, another to understand it all). Actually, it looks like there's a packet for everything: https://github.com/MachineMuse/MachineMusePowersuits/blob/experimental/src/main/scala/net/machinemuse/powersuits/network/packets/MPSPacketList.scala
@lehjr I'm no dev but that's certainly a lot... NONE of those, even all of the combined, shouldn't be sent twenty times a second though.
It's probably once per tick On Jan 26, 2016 12:13 PM, "ajthemacboy" notifications@github.com wrote:
@lehjr https://github.com/lehjr I'm no dev but that's certainly a lot... NONE of those, even all of the combined, shouldn't be sent twenty times a second though.
— Reply to this email directly or view it on GitHub https://github.com/MachineMuse/MachineMusePowersuits/issues/699#issuecomment-175123521 .
It is indeed once per tick (per player) and there are several reasons why. But judging by your tone I gather you don't care about the reason and are just angry for no reason so I'm just going to close this.
I'm angry for 'no reason' because your mod is using a ton of bandwidth on my server. I'm not creating drama just for attention. I'm almost positive there are ways to check player location or whatever it is these packets are for without sending updates once per tick. Forge has APIs for this stuff after all.
Hmm, why exactly was this closed? It seems like a pretty significant bug to me.
It is not a bug. It is a requirement for the advanced movement options which are the original use case for MPS. If your server cannot handle 5 kb/s per player then you do not meet the minimum system requirements to run MPS. Even a 56k dial-up modem can handle this amount of traffic for one player.
"I am not a dev but this is unacceptable" might be an appropriate response if I had advertised lower bandwidth consumption and you had paid real live money for the product. Since none of those things are the case, check your attitude.
What specific part of the mod requires so many packets..? Jetpacks? Gliders?
It is a requirement for the advanced movement options
Yes, but what specific part? That's ambiguous.
No, it isn't.
"Advanced movement options" IS ambiguous. Do you mean the options for a JETPACK? A GLIDER?
All of them. If it changes anything about how the player moves from their vanilla capabilities, including how fast, then it needs to notify the server so that it doesn't kick them for moving too fast or floating too long or something like that, and so that fall damage is still calculated correctly.
Jetpack: Mekanism, IndustrialCraft, Simply Jetpacks, and more all create jetpacks without this much bandwidth and these many packets.
Glider: OpenBlocks and Ender IO both have gliders that don't use this much bandwidth or this many packets.
Technically Archimede's Ships [Plus] creates moving and flying entities, sometimes massive, without this much bandwidth or this many packets.
Minecraft itself, RailCraft, Refined Relocation, Steve's Carts, and more create Minecarts that can move in all kinds of ways without this much bandwidth or this many packets.
Pistronics creates massive rotating and moving pistons without this much bandwidth and this many packets.
Every mod that adds frames, RedPower, ProjectRED, BluePower, Framez, etc, create tons of moving blocks and moving entities without this much bandwidth or packets.
Some of these examples might not be applicable, but your mod DOES NOT NEED to use THIS MUCH BANDWIDTH. There are BETTER WAYS TO DO THIS. (Sorry for the caps.)
Seriously, no other mod on my server with 10 players online uses this much bandwidth. Yours uses about 5 times more than any other mod, with players using jetpacks and all kinds of machines.
Edit: Oh and Portal Gun projects and throws entities reallllly fast without this much bandwidth.
edit 2: Iron Man as well.
Then use those mods instead if bandwidth is more of a concern than fidelity.
I love your mod, it's amazing, I don't want to use those mods and neither do most of my players. The problem is that it's not optimized and I'm trying to tell you about a bug so you can IMPROVE your mod!
Why is that such a big deal? You act like I'm attacking you or something >_>
You are attacking, though. You're saying 'There is absolutely no reason why it should be this way', as if I couldn't possibly have thought about it and made a decision. But I didn't design to your requirements, I designed to mine. Yes, MPS uses a 'lot' of bandwidth (compared to other Minecraft mods, but not compared to other games).
These features are part of what set MPS apart in the first place, and all of them require constant velocity & position updates or else you end up e.g. taking fall damage based on how fast you were going half a second ago.
I'm not changing it and this isn't open for debate. I'm not sure why I bothered to explain it at all when you clearly don't want to hear it. I guess for the others reading this.
And don't use that word 'optimized' until you really know what it means.
For an example of another game which is very "well-optimized", designed by people much more experienced and knowledgeable than me, https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
I suppose asking you to add a config option to disable these calculations and updates would be out of the question, since you're so incredibly stubborn. (Now I'm attacking.) Most other mods get away without these 'accurate calculations' and I've never even noticed, I'm pretty sure MPS doesn't need to be the exception.
I know of no other mod with configurable superspeed.
This isn't me being stubborn, this is me being patient enough to tell you why it is the way it is. I hate to say this but you are really not qualified to be telling anyone what their code should do.
Besides, I don't have time or energy to make any comprehensive changes. If you want to fork MPS, 'fix' the bandwidth 'issue', and make a pull request, I promise I'll give it a fair evaluation.
I run a modded server with Numina and PowerSuits installed. When running OPIS to diagnose what's using up all the network bandwidth I found that Numina is sending a ton of packets, very fast.
Here's a screenshot: http://i.imgur.com/ZUrf841.png
I'm wearing a PowerSuit, and the packets stop when I put the PowerSuit in a chest. (If I simply take it off and leave it in my inventory, nothing changes.)
The PowerSuit only has Diamond Plating, Shock Absorbers, Energy Sheilds, and HV batteries installed. The packets are sent when I am just standing still.
There is absolutely no reason these packets should be sent this frequently and they should be no where near as large as they are. There are no config options to adjust packets.