Saturday, May 17, 2008

Pre-alpha gallery

working hard to do a run-through of chaper 2 myself before releasing an alpha version. Still got a problem of major lag in two areas and not having much luck pinning down why (lighting might be causing one as I did go a bit overboard, the other just puzzles me...). Anybody got experience of lag in an area and any unsuspecting things that might cause it (i.e. other tha grass/trees, what are key culprits or things to check)?

Quick gallery of screenshots fom my playtesting today

9 comments:

Amraphael said...

void main()
{
object oPC = GetFirstPostingCreature();
if (!GetIsPoster(oPC)) return;
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
SendMessageToPC(oPC, "Hooray, that's great news, Wyrin!");

}

Josh said...

There are usually a few major reasons for a laggy area.

1) You're exceeding the 5 Tree Type and 4 Seed limit, and you have shadows enabled.

Solution: Well, there's not really an easy way out of this other than replacing the trees or just saying to hell with it.

2) Your area has tons of trees in which the amount of shadows that are being drawn, bogs down your computer.

Solution: You can lower Shadow Intensity in your area settings to help some, but this won't help as much. The main thing you can do to help is to go through your Area Contents window and go through each tree and looking at its location. If it is a bush or a tree beneath an even larger tree, you can edit its Appearance properties to casting pointlights only.

3) Your game is rendering too many placeables on your screen.

Solution(s): First I would try doing 1 and 2 before this one. Set your fog clip to a lower number so it does not render as much, or delete some of your placeables.

4) There's a spot where 4 or more lights have intersecting spheres.

Solution: Unfortunately, you have to wait for 1.13 to see if this is really an issue. Chances are if you're approaching a series of lights and it starts to lag, then this would be the issue. Otherwise, if its an entire area kind of thing, then it is definitely something else.

5) One of the more elusive causes of lag is the amount of grass seed you have. This is directly tied to shadows like 1 and 2.

Solution: Cut back on the amount of grass used in that spot, or just set your Shadow settings to Medium rather High while in game.

6) Too many scripts firing within the area and/or in other areas.

Solution 1: Check your heartbeat scripts. Minimize their usage.

Solution 2: Add all non-specific NPCs to the Creature Cache (currently does not work - have to wait until 1.13).

Solution 3: Within the specific area create spawning encounters when the PC enters the area, and despawning encounters. This isn't always desirable behavior, but the alternative to this is to have them stop walking their waypoints whenever a PC is not within a visible range.

7) Your area is just too big.

Solution: Bigger areas often take a whole heck of alot more memory to maneuver about it. Between shadows and scripts, this can become a nightmare. Try minimizing those two as they are the major sources of lag. If that does not work, you may have to split your area in half.

Josh said...

Oh, and I like your screenies :)

Anonymous said...

Maybe we can see more screens of the elf? Just wondering.

Wyrin said...

lol @ amraphael

josh - thanks thats a really useful checklist. I think it's probably lighting causing the interior area to be laggy so will have to play with that.....

kaida - i took the elf in the team for the majority of my playtest, and happy to report he rocked ;) If I get a chane I'll drop in some more screenshots

Josh said...

For interiors, it is more often than not either 4 or more lights intersecting or too many placed effects bundled together. :)

EC said...

Looking good!

Josh gives all good advice. Texture normal mapping also can have a huge fps hit. Although I know very little about these matters, it wouldn't surprise me if some of the OEI terrain textures were worse than others in this regard.

See if turning normal mapping off in game improves performance in those areas, and if it does then you'll know the culprit. In that case, you could switch textures or advise players that have problems to turn it normal mapping off, neither of which is really ideal I admit...

Quick question for Josh if you come back (or anyone else for that matter! :) ): re the 4 intersecting lights issue: is that only a problem if they are casting shadows? or is it a problem even if shadows are turned off on those lights?

And more generally, does the quantity of no-shadow lights impact performance (presuming four of them don't intersect)?

Wyrin said...

Thanks E.C. The culprit is an area witha few different textures so could be it.

as for the interior - I've gone through and converted some lights to not cast shadows, and it's helped a bit - hard to say how much, yet

Anonymous said...

I WANT TO TEST THE ALPHA! I read your lastest post. I'll go to the fourm thing.

Really? Good I want to see what he's like! He seems awesome!!