dugasz1 Posted September 17, 2016 Share Posted September 17, 2016 (edited) Hello! So, i would like to use a lot of collision shape for interactions (i don't like click on things). And my question is will it cause fps drops or low fps for the clients? I never used that much collision shapes. Any suggestion or experience? I don't know now how many col shape will be exactly. Let's say 5000 or 10000 Edited September 17, 2016 by dugasz1 Link to comment
Captain Cody Posted September 17, 2016 Share Posted September 17, 2016 Best way to check; make them see if it lags. If it does there's ways to preventing that such as removing the col shapes that are to far away and creating / removing them on the fly. Link to comment
dugasz1 Posted September 18, 2016 Author Share Posted September 18, 2016 Well, i looped throught 10 000: for i=1,2500 do createColSphere(2496 + i,-1670,13, 2) end for i=1,2500 do createColSphere(2496 - i,-1670,13, 2) end for i=1,2500 do createColSphere(2496,-1670 + i,13, 2) end for i=1,2500 do createColSphere(2496,-1670 - i,13, 2) end And it's looks fine, uses ~0,25% CPU and 125kB memory (according to performancebrowser resource) So, i guess it's will be oky? Link to comment
Moderators IIYAMA Posted September 18, 2016 Moderators Share Posted September 18, 2016 For what purpose so many colshapes? Is it serverside? Because for every time you enter/exit an colshape, you will be sending this information to the server. Also, colshapes are elements, your players might load less objects of custom maps, because of the streaming engine. It will be ok because of the streaming engine(if colshapes can be streamed out???), but there is an 'impact' in your server. You will have to test it with multiple clients. 1 Link to comment
dugasz1 Posted September 18, 2016 Author Share Posted September 18, 2016 I will use them to everything. Interacting with the 3d world for example if there is an atm, you don't need to click to the atm. If the col shape created on server side the client will send infromation to the server when he/she hit/leave it? So if i don't want this unnecessary data transfer i should create them on client? Link to comment
NegativeIQ Posted September 18, 2016 Share Posted September 18, 2016 1.Im pretty sure even 100000 collision shapes would not make your server/client lag. 2.If my logic serves me right. Collision shapes created on a client will trigger handler (callback) only on client side. And collisions created on server side only handler on a server. Since player has to send his information like position every few milliseconds to server server, server can perform its own check on server side so i dont think there would be additional data transfer. Also sending information from client to server about triggering something does not make server eat all the network speed. Problems are syncing things like position, animation, speed, camera...Things that are sent each few milliseconds. Calling a simple trigger can not impact on any server with a decent network speed, specially since its download and not upload. 1 Link to comment
dugasz1 Posted September 18, 2016 Author Share Posted September 18, 2016 Ohh i missunderstood something about the concept of col shapes. It makes more sense then what i tought. Thanks for the answers. Link to comment
Moderators IIYAMA Posted September 18, 2016 Moderators Share Posted September 18, 2016 You can't delete serverside-colshapes clientside. (but you can do that with objects/markers and some other elements) Try it yourself. Which means that serverside is most likely relying partly on clientside detection too. Link to comment
dugasz1 Posted September 18, 2016 Author Share Posted September 18, 2016 I will do it on client side. It looks the best choice. Thanks all Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now