Comments (5)
Line 247? - Well, it is the for-loop which iterates through the number of "wheels touching ground", so when there are many wheels on active vehicles/equipment, there is a lot of network-events being sent from server to clients.
Try this - Comment out the lines 74 & 101:
74: -- and self.isServer -- Only on server
101: -- g_server:broadcastEvent(WheelLanesEvent:new(cuttingAreasSend));
^^
Doing that will cause the script to not send any network-events from the server to clients.
Instead it will cause all clients (and the server) to locally calculate the 'wheels areas of destruction', but only if the wheel(s) hasGroundContact
- which in FS2013 is a server-only variable, so it might not work correctly on clients.
Thinking out loud...
Another possibility could be to have the server not send the 'wheels areas', but instead just the vehicle-id and then let the clients locally calculate the 'wheels areas' (disregarding if they have ground contact or not.) - This would reduce the size of the network-event packages being sent, but still not the iterations required in the WheelLanesEvent.destroyFoliageLayers()
method.
Even yet another method could be to 'even out' the required number of calls to setDensity...()
over several rendering-frames, instead of just one. But this will probably be impossible to keep in sync.
Or figure out if there is a possibility to reduce the number of calls to GIANTS' game-engine's setDensity...()
API methods, because of the mod's requirement of not destroying the grass
fruit-type and the specialty with potato
& sugarBeet
.
from farmsim_mod_wheellanes.
Unfortunately commenting out line 74 & 101 indeed caused lack of wheel destroying effects on client side.
Other suggestions are out of my coding abilities, which are just basic.
from farmsim_mod_wheellanes.
@Dzi4d3k - Would it be possible for you to test my recent v0.8.0-BETA changes in multiplayer?
from farmsim_mod_wheellanes.
@DeckerMMIV
Of course, with pleasure. We will test it and I'll back with results.
from farmsim_mod_wheellanes.
Its been a while since last update, with quick thought I can say that there is a lot improve in performance. However because of summer time we didn't manage yet to do "massive lag test" what we calling to 5-6 people cutting, tedding, baling grass on one filed. On previous version it was a nightmare with 10-15 FPS.
I'll get back if I have update in mean time I have possibly another issue #2.
from farmsim_mod_wheellanes.
Related Issues (8)
- Plants destroyed by one side of vehicle HOT 3
- Exception for Alfalfa/lucerne HOT 4
- Typos in code? HOT 2
- Wheel Lanes and plowing cover crops HOT 2
- Removing the grass HOT 3
- PiQup does not destroy crops. HOT 2
- FS17 upgrade? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from farmsim_mod_wheellanes.