Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Level Design (https://forums.graalonline.com/forums/forumdisplay.php?f=6)
-   -   Less Lagg in Levels (https://forums.graalonline.com/forums/showthread.php?t=55384)

xAndrewx 09-18-2004 07:40 PM

Less Lagg in Levels
 
After a lot of lagg on certain servers i have came up of a way to reduce alot of the lag, This is what i have so far:

//#
In NPC's what have
//#NPC MADE BY I AM GOD OK.
or just messages
//#THIS IS THE MAIN PART OF THE SYSTEM
And such, These create more lagg, Please do not add them onto the script into a level. By doing this you will create alot more lagg.

Gmap
By making the whole server a Gmap you can lose alot of the lagg also, This way you can drive cars/moter bikes and all the other transportation.

Serverside
By scripting most of the systems serverside you will also lose lagg(from what I have heard anyway). I am not to sure if this is true but I decided to add it in just in case it was.

Images/Gani's
By making Tree's or any other kind of walk under object, By making the image into a gani can also reduce a hugh amount of lagg.
By doing this you would remove the tree image from the image box. And probably make the tree into a class:
join tree;
In the class there would be a setshape2 ofcourse.

If you know any other ways to reduce a serious amount of lagg post it here please.
-Andrew.

Crono 09-18-2004 08:55 PM

Quote:

Originally Posted by xAndrewx
//#
In NPC's what have
//#NPC MADE BY I AM GOD OK.
or just messages
//#THIS IS THE MAIN PART OF THE SYSTEM
And such, These create more lagg, Please do not add them onto the script into a level. By doing this you will create alot more less lagg.

Can anyone confirm this? It doesn't sound right to me.

Quote:

Gmap
By making the whole server a Gmap you can lose alot of the lagg also, This way you can drive cars/moter bikes and all the other transportation.
Well, it does take TIME to load gmaps but I agree on the fact that gmaps rule.

Quote:

Serverside
By scripting most of the systems serverside you will also lose lagg(from what I have heard anyway). I am not to sure if this is true but I decided to add it in just in case it was.
I'm sure clientside is less lag...



Quote:

lagg
You mean lag*?

calum 09-18-2004 09:06 PM

Quote:

Originally Posted by Gerami
Can anyone confirm this? It doesn't sound right to me.

//# is used for states like clientside so it may produce lag to use it with comments the correct comment start is //<comment> or
*/
<comments>
<comments>
/*

Quote:

Originally Posted by Gerami
I'm sure clientside is less lag...

Using clientside is better for everyone as a whole as using serverside will create server lag which will annoy all the players - I Think (Its sounds right)

Loriel 09-18-2004 10:50 PM

Quote:

Originally Posted by xAndrewx
//#

This may be true.
However, the increase of productivity that comes from properly documented scripts is by far exceeding the marginal loss of performance you claim to experience.

Quote:

Serverside
Indeed. However, now the loss of performance will make the NPC server run less blazingly fast and do worse than lag.

Quote:

Images/Gani's
I am certain that an image is not causing lag. Also, displaying an image should be more performant than displaying a gani that displays an image.

Quote:

If you know any other ways to reduce a serious amount of lagg post it here please.
Fighting lag is overrated.
A cleanly designed system that is easy to maintain and to extend is worth far more than a system that is a bunch of hacks that you think will decrease what you think is lag.

Quote:

-Andrew.
This forum features a feature that is called ``signatures''.
Use it.

xAndrewx 09-19-2004 09:13 AM

We got told by stefan that if we made our systems serverside and our tree's would be changed as a gani alot of the lagg would be gone.
The systems what will be serverside:
HP/BULLIT SYSTEM.
And alot of people hate lag, That's the main reason why I posted this.

Curt1zzle 09-20-2004 05:02 AM

This was all sort of...obvios? :o

xAndrewx 09-20-2004 11:29 AM

Not many people know about it curt :P

konidias 09-20-2004 05:30 PM

I think what you mean by images is that you shouldn't use a lot of setshape and images and should try to use the gani that has a built-in setshape. Especially should avoid using setshape2 unless you absolutely have to.

As for comments in scripts... Removing the unnecassary would speed up level loading I would imagine... But there's nothing wrong with leaving important comments in your scripts. Though I never really saw a reason to put your name at the top of it. Like wow, you need to give yourself recognizition for a light or something? :rolleyes:

But the default if created, if playerenters script that is put into every new npc... that definitely should be removed. I know a lot of level makers put "blank" npc images all over the level but tend to forget that every one of those npcs has like 6 lines of code. Sometimes people use like 30+ "empty" npcs like that, and you can remove all that unneeded script and it cuts the level filesize nearly in half.

Loriel, the npc server can take the abuse. As long as the scripts are done well, and you don't have some crazy script looping with sleeps and for loops in a timeout or something... then it will be faster.

Clientside sends the information to every client individually. People think clientside is better, but in reality, clientside is only better for people with incredibly fast computers. Serverside is pretty much the same for everyone.

Loriel 09-20-2004 06:37 PM

Quote:

Originally Posted by konidias
I think what you mean by images is that you shouldn't use a lot of setshape and images and should try to use the gani that has a built-in setshape. Especially should avoid using setshape2 unless you absolutely have to.

I fail to recognise that setshape2 violently affects performance. GK uses it all over the place.

Quote:

As for comments in scripts... Removing the unnecassary would speed up level loading I would imagine...
I assure you that you will not be able to measure any performance gain in scripts by removing (normal amounts of) comments.

Quote:

Though I never really saw a reason to put your name at the top of it. Like wow, you need to give yourself recognizition for a light or something? :rolleyes:
That is because you work alone.
I find it pretty useful to know made a script. By putting your name on a script, you take the responsibility for what it does, make it clear who to contact about issues with it or for information and suggested improvements, etc.

Quote:

Loriel, the npc server can take the abuse. As long as the scripts are done well, and you don't have some crazy script looping with sleeps and for loops in a timeout or something... then it will be faster.
I think that performance gain should absolutely not be a reason to put things serverside instead of clientside. The most important ones are the immense power of the serverside and the added security, I think.

Quote:

Clientside sends the information to every client individually.
I do not really get what you mean there. The things that you do serverside get sent to clients as well.

Quote:

People think clientside is better, but in reality, clientside is only better for people with incredibly fast computers.
In reality? There is no such thing as reality for performance considerations, there are only certain distinct situations.
I think that there is only a relatively small amount of code that could be put equally well serverside and clientside. For that, I suggest that it is put clientside, so there is no lag, and less work for the server, etc.

Quote:

Serverside is pretty much the same for everyone.
In other words, incredibly slow. We have had to disable certain especially unperformant parts of the serverside scripting on GK when the load gets too high, because the game becomes nearly unplayable then.

xAndrewx 09-20-2004 07:18 PM

Quote:

Originally Posted by konidias
I think what you mean by images is that you shouldn't use a lot of setshape and images and should try to use the gani that has a built-in setshape. Especially should avoid using setshape2 unless you absolutely have to.

As for comments in scripts... Removing the unnecassary would speed up level loading I would imagine... But there's nothing wrong with leaving important comments in your scripts. Though I never really saw a reason to put your name at the top of it. Like wow, you need to give yourself recognizition for a light or something? :rolleyes:

But the default if created, if playerenters script that is put into every new npc... that definitely should be removed. I know a lot of level makers put "blank" npc images all over the level but tend to forget that every one of those npcs has like 6 lines of code. Sometimes people use like 30+ "empty" npcs like that, and you can remove all that unneeded script and it cuts the level filesize nearly in half.

Loriel, the npc server can take the abuse. As long as the scripts are done well, and you don't have some crazy script looping with sleeps and for loops in a timeout or something... then it will be faster.

Clientside sends the information to every client individually. People think clientside is better, but in reality, clientside is only better for people with incredibly fast computers. Serverside is pretty much the same for everyone.

Yep :D, Go Koni, This is what I was trying to say, You put it into better words :D.

Admins 09-22-2004 07:29 PM

Loriel the problem with the npcserver being slow on kingdoms had to do with the mudlib and is fixed now (except some lag spikes which are caused by the mudlib too). Playerworlds should use the npcserver more, most npcservers are quite bored. In general it is good to avoid any clientside script, so levels load faster, scripts don't need to be compiled etc. Setshape2 is a nice thing but it should not be used too often - if you have 100 trees in one level then the trees should use ganis (and possibly setshape) instead. I can possibly post a little optimize-howto here.

Spark910 09-22-2004 09:35 PM

Quote:

Originally Posted by Stefan
I can possibly post a little optimize-howto here.

Go ahead
:)

Crono 09-22-2004 09:41 PM

Quote:

Originally Posted by Stefan
I can possibly post a little optimize-howto here.

Should have done this when you released the npc server, no?

xAndrewx 09-23-2004 04:40 PM

Woot, My thread is going to a good cause, Sure why not stefan :D

Nidonemo 09-26-2004 04:54 AM

Quote:

Originally Posted by Stefan
Playerworlds should use the npcserver more, most npcservers are quite bored.

They live... :eek:


All times are GMT +2. The time now is 11:59 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.