[REP++] Question - Streamer Dynamic Spheres
#1

Can streamer handle 50.000 dynamic spheres?
The spheres are created individually (for each playerid) because the locations are different, so what do you think?
Reply
#2

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Yes. The streamer simply allocates memory for each new entity, as long as your machine has enough memory you can create as many as you want.

However, there may be an affect on performance, it really depends on your hardware. 50,000 should be okay though, I've worked with numbers around there before.
I understand. From your point of view, what would you choose (in terms of performance) between this 50k spheres and a 0-50 for instruction that checks for a specific value in array?

+rep.
Reply
#3

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
I'd need more information on the context, what do you mean by checks a specific value in an array?
I have an array with 50 different values, i am thinking to drop the option with the spheres and transform the objects to pickups, if i do this, then i need to check whenever a player enters a pickup in order to destroy that pickup permanently.

My for instruction would look like this:

pawn Код:
for(i = 0; i < 51; i++)
{
    if(pickupid == arrval[i])
    {
       ...
       break;
     }
}
So what would you recommend me to use between this 'for' used every time a player enters a pickup and that spheres that only check whenever a player is near an object. (the spheres are created with the same object coords)
Reply
#4

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
If you already have the pickups, just use them. A loop through 50 elements is basically nothing for a CPU. No need for expensive distance checks (even if those checks are done via the streamer plugin - still not worth it).
Alright, thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)