-. .`
|
 |
Join Date: Mar 2001
Posts: 1,000
|
|
color code:
green - information
orange-red - solution/suggestion
Server Side
( with NPC Server)
I need input on this from mostly the people that have staff jobs or just know
1. If i have a arrow script in a .txt file and i try to do like auto arrow gun.. where it keeps putting that npc then the npc script does the rest offline it seems to freeze and lag.. did i do something wrong or is that just how it works and cant lay fast..
Placing scripts will lag the server, because it's creating an NPC. A larger script would probably cause more lag. Assuming you do this serverside though, there wouldn't be a whole lot of client-side lag, since it only recieves position and image.
Try making your script smaller, or make one NPC per level that handles arrows in that level, or do it on a per-user basis. Use showimg if you can, or try to find the new projectile support stuff (I heard something about this a while ago, have yet to see or use it though).
2. Is there like a limit on the amount of server. string u can have on a server.. will a certain amount start laggin the server or do they not really matter
I've never heard of or hit a limit, and don't think there is one.
With the NPC Server you might want to reserve server strings for things that NEED to be server strings (since they aren't sent to the player anyway), and have an NPC on the server that stores all others as personal NPC this.strings.
3. What is the max size of a npc weapon that is allowed.. in kb's please..
I think the hard limit was like 56K or something...but I've far exceded that before, so I think it might be higher now.
4. Is there like a average size for npc weapons.. like if u have a couple 5kb npc weapons will they cause the player to lag.. or does it matter..
Well, considering I have, on average, a few 10K-12K weapons along with a 70K chunk of weapon, it shouldn't lag much with 5K weapons. Of course, downloading will take longer with larger weapons, and loading.
6. Showimg.. the index's i heard before like certain ones where client side and so on can someone tell me .. whats what
NPC Code:
- showimg colors,layer, and zoom is sent to other players (even
when the layer is 4, then only values between 0 and 440 allowed)
Yah, doesn't mean much to me either. Basically though, if the layer is 4, 0 <= index <= 440 will be sent to all players. I believe there may have been a showimglocal command at one time...
Personally, I use indexes above 1000 for all clientside-only stuff (which is usually stats). Just find a high number that works for you, and you should be safe.
Client Side
( without NPC Server)
1. If i have a arrow script in a .txt file and i try to do like auto arrow gun.. where it keeps putting that npc then the npc script does the rest offline it seems to freeze and lag.. did i do something wrong or is that just how it works and cant lay fast..
Putnpc is your enemy. Every NPC placed must be sent to EVERY player, then executed. This can create server lag, client lag, and machine lag. Avoid it's use at all costs.
Use showimgs. They're stabler for clientside stuff. If you HAVE to use putnpc, make the ammo for your weapon either extremely rare or pricey, and minimize it's use.
2. Is there like a limit on the amount of server. string u can have on a server.. will a certain amount start laggin the server or do they not really matter
I've never heard of or hit a limit, and don't think there is one.
Since this is clientside, and every server string is sent to the client, I'd at least try and restrict their use a bit. They can be VERY useful if you're without an NPC Server, but if they're changed all the time, or accessed by multiple players, it could cause problems with lag.
3. What is the max size of a npc weapon that is allowed.. in kb's please..
I think the hard limit was like 56K or something...but I've far exceded that before, so I think it might be higher now.
4. Is there like a average size for npc weapons.. like if u have a couple 5kb npc weapons will they cause the player to lag.. or does it matter..
Well, considering I have, on average, a few 10K-12K weapons along with a 70K chunk of weapon, it shouldn't lag much with 5K weapons. Of course, downloading will take longer with larger weapons, and loading. Additionally, your levels containing the weapons will become very large, and take a while to load, since you don't have an NPC Server to store the script, and all scripts in the level are sent upon entry.
6. Showimg.. the index's i heard before like certain ones where client side and so on can someone tell me .. whats what
NPC Code:
- showimg colors,layer, and zoom is sent to other players (even
when the layer is 4, then only values between 0 and 440 allowed)
Yah, doesn't mean much to me either. Basically though, if the layer is 4, 0 <= index <= 440 will be sent to all players. I believe there may have been a showimglocal command at one time...
Personally, I use indexes above 1000 for all clientside-only stuff (which is usually stats). Just find a high number that works for you, and you should be safe. Also, I'm not too sure on the new clientside rules (haven't dealt with them), but I think they're the same.
----------------
Additional: Why did you answer all of these questions in such a detailed manner?
Because none of them were, "Will somebody script this/that for me, because I'm too lazy to look up some dumb commands", and they were good questions that not many people would know the answer to, since they deal with client/server architechture.
Try asking questions that are very specific and don't have someone make a script for you, but help you figure out how to do it yourself. Also, if you want to make your scripts work better, or decrease lag, feel free to ask how, as long as you ask detailed questions, and don't just post your script and say, "Make this better for me because I'm too lazy to figure out what might make it better."
----------------
- Kyle |
|