Jump to content

Problem with Performance - over 4000 Objects


XetaQuake

Recommended Posts

Hey all :D

We have a little Problem, and i have a question about some possibles/work-arounds:

On our Server, there a over 4000 Objects, and the game runs extremly SLOW for around 85% on our Members - including me.

Now, i searching for a method to let MTA run faster. And i already have a idea: I need a script, to let the many Objects disable on Clients - only when they want it - using a command.

I get this to work with dimensions: When i are in another dimension as the objects, i get some fps more - but it still runs with around 10FPS.

The trick with the dimension works only relative good, for example when i stand in a User-Map/City: There alot objects stops to display (because its a City with many Objects) when i enter another dimension, and i get around 15FPS. But when i deactivate the whole resource with the Objects, i have around 35~70FPS - So it runs very smooth.

Now my question: Is there any other way to deactivate the Objects on single Clients? I think the Objects just stop displayed, but not stop rendered, synced, loaded - or so.

Interiors will effect the same result i think, so i need any other function, to prevent the Objects for rendering, or to stop the resource or so - the problem: The Objects are serverside (for sync.)!

Somebody knows how i can get the same smoothly experience as if the Object-Resource are not launched - Just with using a command to prevent the Objects/Resource to render (or what ever) on a single client - the own PC?

I would be very glad when somebody can help me...with 8FPS when the Objects are loaded its no longer playable...but also many Mappers want to continue they work :)

Link to comment

Hey Talidan :)

As i write already, i tried it with different Dimensions already :wink:

I just moved me in Dimension 100, using the Admin Panel. But yea, when i am in another dimension as the Objects, i just get around 5FPS more - but looongly not so much as if i stop the Object-Resource. And thats my problem...

Link to comment

May sound crazy.. but what about if you would destroy objects clientside using destroyElement? can be a prob to recover without reconnecting.. but i can't see any other way, as setObjectStreamable with arguement false when there is so many objects, could cause unwanted results;

Link to comment

Hey Buffalo :)

setElementStreamable looks good - but yea, as you said already, i better doesn't should use this for nearly 4500 Objects:

Note: You shouldn't disable streaming on too many elements as there are limits for every GTA element type. Disabling streaming for some far-away elements will reduce number of elements that can be shown nearby.

Note: Disabling streaming for extremely many vehicles (>80) can cause low FPS and unwanted effect when warping players into far away vehicles.

Hmm...destroying is a bad idea, because new objects can be created (with offedit) on our server (for peaple with Mapper rank) - so, when you destroy all streamed objects on your client and save the map, you destroy the complete map, because i am sure the client objects saves on the server!

Also its a bad idea, because new created objects will be appear...so...destroying objects is not realy a option...

I REALY missing a function like "setServerSideResourceActiveOnClient", or "setClientElementCalculable" or "IgnoreElementInput" or so...

Any ideas?

Link to comment

Anyone suggesting you to destroy the object clientside are wrong - you'll find that serverside elements cannot be destroyed clientside.

As i mentioned earlier, surely using setElementDimension clientside is what you're looking for? You can write your own algorithm to decide when to hide and show elements by setting the objects (not players) to a different dimension. For example you could easily use the onClientRender event to work out when to show elements that are within <20m range.

If you want to do this from the server, its simple enough to code something like hide/showObjectForPlayer using triggerClientEvent and setting dimensions appropriately.

Link to comment

Hey Talidan

Thanks for help :)

The problem with Dimensions is, that MTA doesn't run faster when all the Objects are in another Dimension as the player. I tried it already by setting me in another Dimension (for test purpose).

It doesn't matter wo i'am on the Map. For example, when i stand in los santos, and the objects in the desert (Area 51 or so), mta runs exactly same badly as i would stand by all the objects in the desert. And when i set me in another Dimension - it absolutly runs not better, it runs same badly as i see all the objects on the monitor...

Thats realy strange, possible MTA stream ANY objects to the Clients - also when they not in range? That should be fixed i think?!

Link to comment

Hm? But i think that makes no difference? Its only matter that the Player is not in the same dimension as the Objects i think, huh?

So it should be irrelevant what element i set in another dimension - the main point is that the two elements (object and player) are not in the SAME dimension, right?

Link to comment

Oh my god! I doesn't belive it!!! :shock: I loaded the 4633 createObject's big file now with the latest nightly build: IT RUNS ABSOLUTLY PERFECT! :)

I can see all objects - so they a realy created! ^^ It runs realy smooth...not only a little bit smooth - no, realy smooth! Like in Singeplayer! :)

Woot, i thank you MTA developers, and also Talidan, Hankey and Buffalo :)

Now i just hope for the final release of 1.0 in the next time ^^

Thread are finish :)

Link to comment
Oh my god! I doesn't belive it!!! :shock: I loaded the 4633 createObject's big file now with the latest nightly build: IT RUNS ABSOLUTLY PERFECT! :)

I can see all objects - so they a realy created! ^^ It runs realy smooth...not only a little bit smooth - no, realy smooth! Like in Singeplayer! :)

Woot, i thank you MTA developers, and also Talidan, Hankey and Buffalo :)

Now i just hope for the final release of 1.0 in the next time ^^

Thread are finish :)

So the object streamer is changed in the nightly's?

Link to comment

Well many things changed in 1.0. Ain't it purpose of giving it out and open source?

Though I'd like to see a final release, concluding that I wanna script under really stable environment (I haven't tested latest nigtlys though)

EDIT: lol Xeta you've posted while I was reading, I didn't noticed your post :P

Cheers ;)

Nidza

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...