DanzLuaJoin Date: 2010-02-25 Post Count: 312 |
Does anybody know a method that allows a server to hold high amounts of npcs moving around at the same time so that it doesn't lag? Disregarding using a module script.
"Today you are you, and that is truer than true. There is no one alive that is youer than you!" ~Dr.Seuss |
|
|
Don't use while true do or anything like that for movement. Try to keep your calculations to a minimum and use pathfinding for really long paths. ROBLOX will handle the rest. Low processing power = low lag. |
|
QJD1996Join Date: 2009-01-20 Post Count: 1472 |
Possibly try to make the NPCs local? By this, I mean they will only be seen on the client and won't actually be on the server.
However, that would only really work for a single-player game. |
|
|
Wait, ROBLOX as a working pathfinder?
~MightyDantheman |
|
|
|
Wow. This is exactly what I need for a random dungeon generator. I could use this to see if it's possible to get to the end of the dungeon, right?
With or without that, it's still pretty cool.
~MightyDantheman |
|
DanzLuaJoin Date: 2010-02-25 Post Count: 312 |
Surprising or not, the game will actully be single-player based. So to make this clear, Would making the NPCs run locally result in less lag? Would this cause the client to run them instead of the NPCs?
"Today you are you, and that is truer than true. There is no one alive that is youer than you!" ~Dr.Seuss |
|
|
Yeah, the local scripts will only be run on the client. You can do your nasty while loops there and your pathfinding |
|
DanzLuaJoin Date: 2010-02-25 Post Count: 312 |
Muhaha, Thanks guys. :)
"Today you are you, and that is truer than true. There is no one alive that is youer than you!" ~Dr.Seuss |
|
|
If your running a single player game, wouldn't it technically be filter-enabled?
~MightyDantheman |
|
QJD1996Join Date: 2009-01-20 Post Count: 1472 |
No, not at all. FilteringEnabled means that there is no communication between the Client and Server. Neither can modify each other without the use of RemoteFunctions/Events.
Just because it's singeplayer doesn't mean it can't be exploited. If anything, people can get away with more exploiting because there'd be no one to report them.
|
|