Creating load of objects makes a lag
#1

Aye

When I load a map, I create a pretty much huge amount of objects, and when I spawn the player the objects get streamed all at once, and it usually creates a little lag. How could I prevent it?

any ideas are welcomed!
cheers
Reply
#2

Most efficient way is to create a timer that freezes the player when he enters an area where there are a lot of objects for 5 seconds until the objects appear and then unfreeze the player.

You can also make it look better by making something like a loading screen ( black screen + some images with a loading progress bar )
Reply
#3

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
Most efficient way is to create a timer that freezes the player when he enters an area where there are a lot of objects for 5 seconds until the objects appear and then unfreeze the player.

You can also make it look better by making something like a loading screen ( black screen + some images with a loading progress bar )
This is not what I asked for. I asked for an idea to avoid the lag that occurs when a load of objects being streamed for a player at once. (When he gets teleported to the spawn point)
Reply
#4

you said
Quote:

any ideas are welcomed!

its a good idea btw . but good luck
Reply
#5

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
you said

its a good idea btw . but good luck
Yes, I said any ideas RELATED to my request is welcomed. Please avoid from posting just for increasing your comments and rep.
Reply
#6

You can play around with the relatively new Chunk Streaming feature of Incognito's Streamer (requires newest version, I think):

Код:
native Streamer_ToggleChunkStream(toggle);
native Streamer_IsToggleChunkStream();
native Streamer_GetChunkTickRate(type, playerid = -1);
native Streamer_SetChunkTickRate(type, rate, playerid = -1);
native Streamer_GetChunkSize(type);
native Streamer_SetChunkSize(type, size);
Enable chunk streaming and set a chunk rate and size for STREAMER_TYPE_OBJECT. The rate should be similar to the Streamer TickRate and the size is afaik the number of objects to stream in one chunk. Play around with the values to find the right settings.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)