BuildCraft|Factory

BuildCraft|Factory

7M Downloads

Laser sends a lot of network packets.

AlexIIL opened this issue · 5 comments

commented

The position of a laser is calculated on the server, not the client. The client should really calculate where the laser is (small scale), although it is still the server's job to calculate which table should be targeted.

commented
commented

@JustWannaFly is this something you would be willing to look into fixing?

commented

Yes I can take a look at this.

commented

I've got the lasers to a point where there is no change to how they behave but with the following optimizations

  • the laser beam position is being calculated from the client side
  • the server only sends a network update when the laser changes its target as opposed to sending an update every tick

Does this take care of the performance concern or do we want to look at even further optimizations that would change the behavior slightly?

commented

that would take care of the performace issues for networking, the targeting itself could also use some tweaks to be alot more efficient but i'll open another issue for that, feel free to PR this optimalization already