Jump to content

Collision settings on server side.


bandi94

Recommended Posts

I am done with ClientSide objectGenerating ](*,) , it's to much work and a lot of idiot bug's with sync loading, for client's some of them have just suck connection , slow download , i need to wait until all player's from a group finished the download , etc . For some of them the loading freez then it f**** up the whole waiting list/system , etc.

So no more thing's like that , i will rescript the whole generating system to server side so all sync would make no more problem , but the generated object would need to be Visible/Collision enabled only for some of the player's.

With the Visible part no problem there is "setElementVisibleTo" , but this function on Collision is only on client side "setElementCollidableWith" , again i will not send the object tabel to clientSide and make it there bk i will end up like with the Client side Generating.

So how to make some object's created on server side non collidable for some player's ?? (dim setting is an option but in my case is not , i just can't use it bk i need all the objects in dim 0)

Link to comment

Well i already did it . For Training Area ,where every player can select on what map to play , it's working without any problem's. But in Area's like DM , when need to load the map for more player's at the same time , no more happy time's , it's acting creazy , normaly should load map+script's for every client , spawn them , etc .. Then feedback to the server that the client is ready , on server side i am checking on every 1 s all clinet's if they are done then starting CountDown. But there are time's where the nextMap image freez for some client's or some player has slow download, ... and the CountDown start's acting creazy , etc... I am trying to fix this from coupel of day's but fixing one bug , another is borning. So i say'd that's it Load the map on server side and done , CountDown sync better / faster bk don't need to check every client , etc.

I have 4 race Area i will add one dim for each one and done, on training area i keep the ClientSide load bk there is not problem with it .

Link to comment
  • Moderators

You have ever take a look at this function?

https://wiki.multitheftauto.com/wiki/Tr ... lientEvent

and for showing the download:

https://wiki.multitheftauto.com/wiki/Ge ... entHandles

triggerLatentClientEvent (player,"lovely_function",10000,player,mapstring) 
local table = getLatentEventHandles ( player  ) 
local handler = table[#table] 
  
if handler then 
 outputChatBox(tostring(getLatentEventStatus( handler)["percentComplete"])) 
end 
  
--- etc.... 

Player won't be freeze, when you limit the bandwidth(to the value you want) and network traffic is not blocked.

Next to that you can cancel the map transfer when you send the next map.

https://wiki.multitheftauto.com/wiki/CancelLatentEvent

Link to comment

yes i know that function , and yes i am using it to show the download , and yes i limited the bandwidth to 100kb/s (100000) , well the Loader - Client Ready sync - function's must have some bug's / not the best optimized scripting methode ..

(With freeze , i don't totaly mean that the whole game freeze , i had only 1 player saying that all MTA freez'd , the other freeze is that the NextMap image won't disappear , the funny thing is that this happen when more player's download the map at the same time, 5-6 player's if there are 2 -3 player's no such problem)

On the end i almost finished the ServerSide loader , i will test it today if it's working better then i will keep the ClientLoader only for Training area , if the serverSide loader will not be working how i wanna to work , then i will try to optimize the ClientLoader and let's see .

Link to comment
  • Moderators

Did I had replied on one of your other topics about loading objects? (I can remember a topic about that)

Maybe you can splits the map data in 4/8/16 and send with a small delay the parts. So the client can already start building up the map.

Link to comment

finaly got it to work. I optimized a bit the mapLoader , and rescripted the countDown sync logic , and now seem's to be no problem loading the map's , now i need to do same thing with the script/mp3 data send , and start sending the mp3/script's only after the player get spawn'd.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...