SA-MP Forums Archive
Numbers Of Npc's connected - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Numbers Of Npc's connected (/showthread.php?tid=155355)



Numbers Of Npc's connected - clavador - 18.06.2010


I'm making a server and I connected like 40 Npcs, 10 are drivers, the rest are peds.

Everyone of them has an AI that runs a loop.

Drivers run a simple timer of 250 milisecs.

Peds run a timer of 100 milisecs with a "for" loop inside to control data between the other players in the server (only humans).

The question is: How many npc's did you test in your server without lag?

With 40 npcs i have cpu usage peaks of 100% most of the time and the npc's really lag.




Re: Numbers Of Npc's connected - [L3th4l] - 18.06.2010

when i had my older server, i had 73 NPCs, mostly peds and the rest drivers

i did not noticed any lag at all


Re: Numbers Of Npc's connected - clavador - 18.06.2010

Quote:
Originally Posted by N000000b :)
when i had my older server, i had 73 NPCs, mostly peds and the rest drivers

i did not noticed any lag at all
But did they have some kind of AI?

I not mean basic AI.

My peds have a actual AI: you can talk to them, they can answer, they fight, they die, they have a life status, etc...

And every single one of them has a for loop that controls everything they do.


Re: Numbers Of Npc's connected - clavador - 18.06.2010

I will have to remove the AI and leave just the basics I guess... I'm getting too much CPU usage

And I have a Athlon 5200+ with 2 Gigs of RAM and a 8800GTS :O