1 (edited by Stroganoff 2008-03-24 23:52:22)

Topic: Performance problems in 0.4.0

I never had good frames with high quality in 0.3 (good begins, when fps never drop below the current refresh rate), but they were stable in low quality.

In 0.4 not all background layers are turned off anymore in low quality mode. Framerates are significantly lower now. Thats bad, but there something more strange about it: They don't drop dynamically but in steps of these kind:

70/71, 46/47, 35/36.

See those screenshots of me on an empty dm2 server, Teewars 0.4.1:

46
http://www.abload.de/thumb/1huom3.png

70
http://www.abload.de/thumb/250r4j.png

47
http://www.abload.de/thumb/3mrex3.png

47
http://www.abload.de/thumb/4y4r9x.png

35
http://www.abload.de/thumb/513gfg.png


Vsync is turned off in game & driver (plus I can see the tearing between upper and lower half of the screen).

AMD AthlonXP 1.4 Ghz
512MB DDR RAM PC2100
North Bridge: VIA VT8366A Apollo KT266A
ATI Radeon 9250 with 128MB RAM
BIOS, Windows and all drivers including ATI are up to date.

Any thoughts or confirmation on this issue?

http://www.abload.de/img/winklv2.png

2

Re: Performance problems in 0.4.0

Same for me sad

Why all backgrounds layers aren't turned off low quality mode? I think my fps drop come from this hmm

aka oop²

3

Re: Performance problems in 0.4.0

Judging by this ticket, the foregrounds and backgrounds have been checked, so the brown cave walls on dm2 look like they're there intentionally:

http://trac.teeworlds.com/trac/ticket/374

It makes aesthetic sense, I'd say. The performance has decreased for me as well, but not by too much. The in-game fps counter rarely goes below 60 with vertical sync on and my poor overheating laptop is quite a bit slower than Stroganoff's computer [AMD Athlon64 3000+ @ 800MHz, Nvidia Geforce4 440GO with 64MB RAM].

4

Re: Performance problems in 0.4.0

I will take a pass and optimize what I can find. It's easier to optimize however if you have a computer that it runs slow on, which I don't have. But I have some ideas on what to improve.

EDIT: HAH! I forgot that I have two gfxcards in my box. One good, one crappy. The crappy one gets crappy performance on dm2. Now I have a good test case, expect it to be fixed in upcoming releases!

5

Re: Performance problems in 0.4.0

That's good to hear.
But please don't forget to re-introduce a REAL "low quality" setting.

6

Re: Performance problems in 0.4.0

Okey, I've done some testing and this is what I've found out. I tested on my geforce fx 5200 (pci-card) in a resolution of 1280x1024 with default setting. I picked the worst spot I could find on dm2 which is down in the cave with the rocket launcher. Got 20fps on that spot. The bottleneck was bandwidth on the GPU. We have some serious problems with overdraw.

I've found one nasty little thing that shouldn't be there and thats trilinear filtering, easy fix. Removing that bumped it up 39fps. Next thing were to remove alpha blending from stuff that doesn't need it. Jumped it to 46fps. The last fix which I've just improvised a test for is to perform scissoring on layers that won't be shown down there. Bumped it up to 66fps.

1) Disable trilinear filtering: Easy, fixed
2) Disable blending on opaque: Bit more troublesome and requires the map to be resaved in the editor, I've fixed it however.
3) Enable scissoring: This on requires some more settings in the map to be able to control it and understanding from the mapper to place and use them correctly. Not an easy fix but could make it into the game later on.

So there you have it. The first two fixes will make it into the next release. The other fix I don't really know what to do about right now. But I'll look into it.

7

Re: Performance problems in 0.4.0

Thx for your research work of fix :>

aka oop²

8 (edited by Innocent Hawk 2008-03-26 19:27:59)

Re: Performance problems in 0.4.0

Great work finding that stuff out! How soon do you think the fix will be out?

I'm not in too much of a rush myself to be honest. My desktop gets 200-300 fps on max graphics lol, but my laptop was noticeably slower. Not unplayable slow, I still get between 45 and 60, but I'd like a fix soon for the sake of playing on my laptop better. smile One thing I thought was weird was that I used to get higher fps in caves, and lower up top. Now the opposite is true. *Shrug*

9

Re: Performance problems in 0.4.0

When we release 0.4.2, and when that is due I haven't decided yet.

10 (edited by Innocent Hawk 2008-03-26 21:25:29)

Re: Performance problems in 0.4.0

Come on, you know you want to! smile You have the problem figured out, and sounds like you already fixed it!

I'm gonna poke you until you give it to us!

*Poke* *Poke* *Poke* *Poke* *Poke* *Poke*

*WHAM*

OW! That mallet hurts! >.<

11

Re: Performance problems in 0.4.0

Yeah, I've fixed the bigger parts of the problem but making a release is a bit of work. Better to get more into the release while we are at it. I kinda expect 0.4.2 to be release this weekend or something like that.

12

Re: Performance problems in 0.4.0

matricks wrote:

Yeah, I've fixed the bigger parts of the problem but making a release is a bit of work. Better to get more into the release while we are at it. I kinda expect 0.4.2 to be release this weekend or something like that.

Muhahah! Victory is mine-- ow ow ow, where is that ice pack? -_<