Deltanic Posted February 13, 2011 Share Posted February 13, 2011 Just curious: Are objects in map files the same way loaded as with createObject? And what will be the effects if I load huge maps serverside? Link to comment
eAi Posted February 14, 2011 Share Posted February 14, 2011 Maps are slightly more optimal than using createObject as all the elements created with a map are sent in a single packet, whereas each createObject is a separate packet (though raknet merges them together). I repeatedly recommend people use map files. Superficially for this reason, but also because it's how MTA is designed - map files are a better solution than using scripts. It's like HTML vs Javascript - both have their uses, but the body of a page should be written in HTML, with the decoration in Javascript. The same applies to MTA. Also, maps in map files can be edited with map editors. Link to comment
Deltanic Posted February 14, 2011 Author Share Posted February 14, 2011 Ah, good to know that. But, what about the second question? What will happen if I load huge maps serverside? Will that cause massacre lag, or will it just work a little bit less good then clientside? Imagine a playercount of 5. Link to comment
eAi Posted February 14, 2011 Share Posted February 14, 2011 Well, to load it client side, you need to send the client what you want to load... Which is basically what map files do. We can send map files to clients far faster than a script full of createObject calls (maybe 4x less data?) Also, use a script with createObject calls and anyone can copy your map (if you care about such things)... So, yes, map files are far better than a client-side script full of createObject calls. Link to comment
Deltanic Posted February 14, 2011 Author Share Posted February 14, 2011 Oh, map files aren't downloaded into the cache by the client? Because I thought it was. Well, ty 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