Jump to content

Performance question


Recommended Posts

  • Moderators

Afaik using https://wiki.multitheftauto.com/wiki/LoadMapData will load faster and probably using less cpu. The more mta functions you require, the slower the code.

But I haven't test the speed of the loadMapData function yet, so I can't really say how much faster it is.

This function will also be called behind the scenes when you start a resource which includes in the meta.xml a .map file. When you do not include this file in the meta.xml, you can start it manually using the loadMapData function.

Afaik the only reason why people started using clientside maps, is because your can use the function https://wiki.multitheftauto.com/wiki/Tr ... lientEvent This function will make it possible to show a custom download bar. (which indicates how long it takes before the map is downloaded)

Link to comment

Well, thank you for the fast answer, currently i'm creating my own server from scratch and i'm trying to create every script optimized so good as possible to prevent potential performance problems of my players.

In some servers when i'm near some map big many objects , fps drops a bit. But however my PC isn't the best and maybe that's the reason why i had this problem, also i had some doubts because some big servers are using maps as lua files client side.

Thanks again IIYAMA ;)

Link to comment

Actually, maps are being sent to client-side through tables in order to load them uniquely from an specific player's client-side. (multi-gamemodes)

Though yeah, loadMapData loads the map server-side hence creating all the objects, vehicles, etc. for everyone.

Link to comment

The same performance are required no matter if it's loaded on the server or the client, however. A server with good performance could probably use this function to optimize a bit for the clients. If there are many online players it might slow down the server instead, I think it depends a lot on each individual case. Which of the server or client has most performance available to load maps, note that clients are a group of clients with various specifications on their hardware. The only way to find out is to try it and measure how much CPU time you need to load a relatively large map.

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