SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/02/2020, 06:00 PM   #1
Davi52
Little Clucker
 
Join Date: Sep 2018
Posts: 40
Reputation: 0
Default Object streaming tips?

Hey! Im angry about that object limit for 1000 object, but I hope that you can help me. So I loaded a map with 1400 object in an interior area, not too big, and that's how it streams:

Can I do something against that? So its very disturbing when in a small area your objects are not visible from 50 meters... Any tips how to fix this?
Davi52 is offline   Reply With Quote
Old 16/02/2020, 06:13 PM   #2
jasperschellekens
High-roller
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Holland
Posts: 1,167
Reputation: 165
Default Re: Object streaming tips?

Have you heard of the streamer plugin? My script has over 10k objects using Icognito's streamer and using dynamic objects.
PHP Code:
native CreateDynamicObject(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rzworldid = -1interiorid = -1playerid = -1Float:streamdistance 300.0); 
__________________
Undead Wasteland Roleplay | Visit website
The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
jasperschellekens is offline   Reply With Quote
Old 16/02/2020, 08:42 PM   #3
Davi52
Little Clucker
 
Join Date: Sep 2018
Posts: 40
Reputation: 0
Default Re: Object streaming tips?

Sure, I use it, but as far as I know, there can only be max 1000 objects at a streamdistance at the same time for a player even with this.
Davi52 is offline   Reply With Quote
Old 17/02/2020, 08:13 AM   #4
jasperschellekens
High-roller
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Holland
Posts: 1,167
Reputation: 165
Default Re: Object streaming tips?

Yea, there is a reason for this limit. More then 1000 objects at a time are likely to crash your client. Your client wont be able to handle more than 1000.
And for the sakes of user experience. If you are having 1000 objects in one area I doubt you'll be able to look very far, streamer will render those closest to you. I've never had any problems with this so far, even not in a heavily mapped apocalypse map.
__________________
Undead Wasteland Roleplay | Visit website
The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
jasperschellekens is offline   Reply With Quote
Old 17/02/2020, 12:40 PM   #5
RoboN1X
Huge Clucker
 
RoboN1X's Avatar
 
Join Date: Feb 2011
Location: Indonesia
Posts: 453
Reputation: 145
Default Re: Object streaming tips?

Set higher priority for base object (i.e. the building). Set lower stream distance for smaller object models.

Also reduce of detail objects/unnecessary objects.

Furthermore if it is a custom interior that you script, load/unload only object sets in a segmented area.. example only load objects when player enters the room/floor from a door...
__________________
Need Help? Use Search, WIKI, and FAQ
RoboN1X is offline   Reply With Quote
Old 17/02/2020, 05:27 PM   #6
Davi52
Little Clucker
 
Join Date: Sep 2018
Posts: 40
Reputation: 0
Default Re: Object streaming tips?

Thanks for your tips! First I realized that the max streamed objects were set to 500 by default, so I set up to 1k and removed all of the default CreateObjects from the whole server. But to handle the problem, I will handle the stream distance for the details, and baseobjects differently. Thanks!
Davi52 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Streaming Luke_James Scripting Help 5 25/08/2015 10:46 PM
[Tutorial] Making the most out of audio streaming! - Tips and tricks Abagail Tutorials 2 19/10/2014 05:09 PM
[HELp]With Object Streaming donhu789 Server Support 1 28/01/2014 12:51 PM
[Tutorial] Fix object streaming Wizza Tutorials 1 01/12/2013 11:21 AM
Object Streaming in 0.3b Franjdea Help Archive 9 24/08/2010 09:08 AM


All times are GMT. The time now is 01:10 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.