Slower game on Cheese 2 map
Sat, 2012-11-24 03:35
I noticed a significant slowdown of the game when playing the map "Cheese 2" which I published here almost a week ago.
I don't have that high-end hardware, but I never ran into problems on any other theme and any other map.
Can anybody else confirm this problem on this particular map?
Hi, I am a Hedgewars developer.
For your interest:
I chatted with nemo today and this is what I've found out:
The slowdown happens because I used a 1px×1024px sized background Sky.png for the background. Why just one pixel wide, you ask? That's because it is just a gradient. There's no point to make a wider image! But this has caused the slowdown. After I scaled the background to 64px×1024px everything is smooth again.
Version 0.2 of "Cheese 2", which I posted today, includes this workaround.
Actually, it is not the background which causes the slow down, it is the engine itself because the background is rendered inefficiently if it is very thin. nemo explained to me that each the repetition of the background is inefficient because it causes a lot of more function calls than it should. And because my background was only 1 pixel wide, it caused thausands of function calls, one for each repetition.
I am not really a coder, so don't throw a melon after me if I got some things messed up.
As far I know this problem has not appeared on the bug tracker list so far.
Hi, I am a Hedgewars developer.