Latest Posts

Topic: Widelands slows to a crawl

grantmasterflash

Topic Opener
Joined: 2009-12-19, 13:12
Posts: 6
Ranking
Pry about Widelands
Posted at: 2009-12-19, 13:18

I have Widelands Build 14 running on Karmic Koala and downloaded the Quiet Lands map from Widelands.org. I've run this version of Widelands before and it worked great. I've since reinstalled the OS so I don't know if it's that or the map but after I'm playing for about 5 minutes the mouse starts moving slowly and the action starts to get jerky. The gameplay degrades to the point that it's probably doing one frame every two seconds. If I can manage to save the game and exit to the main menu everything runs super fast again. If I resume play it starts out fast and after 5 minutes the process repeats. I'm only using 54% of my memory (2GB) but one of my cpu cores is running flat out 100% of the time with Widelands. Any ideas? Is the map just too big?


Top Quote
timowi

Joined: 2009-11-01, 22:08
Posts: 146
Ranking
At home in WL-forums
Location: Germany
Posted at: 2009-12-19, 14:24

There are some possible reasons for that. Fist of all widelands has som performance problem. Especially wiht many computer players. Maybe the computer players are fighting against each other.

I had some problems with the pulseaudio sound server under karmic. Sometimes the pulseaudio server had some sort of a crash. Audio works just fine, but some applications take a lot of cpu. Take widelands 100% of one core even if you are in the main menu? This is a clue that there is something wrong with the sound server.


Top Quote
nebell

Joined: 2010-01-06, 12:10
Posts: 6
Ranking
Pry about Widelands
Posted at: 2010-01-08, 18:56

I saw the same on my Mac OS X. I can start a map with 5 players under 123x speed before it slows down to single pictures. After a few minues I have to drop down the speed less and less. At least the only available speed is 1 to become it under control. The 2 cores very fast jumping up to 100%. Especially if I try to play at the external monitor connected with my MacBook under 1680 x 1050 resolution..... (But it is the best resolution for a 22inch monitor. Sharpest picturing ever. Really, it looks best oly with this resolution at 32bit.

It seems each moving object calls a lot of calculation power, and it seems it is too much for the graphic cards too. Because if I move the visible window to a "low action" area the cpu workload goes down to 20% immediatedly. Ok, it is possible to argue that notebook is not designed for game playing, but the portable computers are the future. Additional I am not sure if I like to bring a desktop PC into the airplane on all my trips ..... face-wink.png

I thik there still will be a lot to do. OR, it will be one of the weakpoints of this game in reason it is not possible to write a complete new rendering engine to become it faster. And this I am fearing. The big plus is the perfect stability of this game. Nerver crashed (so far)!!


Top Quote
grantmasterflash

Topic Opener
Joined: 2009-12-19, 13:12
Posts: 6
Ranking
Pry about Widelands
Posted at: 2010-02-22, 21:42

I have this same issue on Karmic but the confusing thing is I was playing for a couple of days and it was running fine. I did an OS upgrade and rebooted and now it drags so bad you can barely move the pointer. One core is running at 100% all the time during gameplay. It's find on the menu though. Is it that there's just too much going on in the game. This seems like it would be a linear thing as the world got more complex.


Top Quote
ixprefect

Joined: 2009-02-27, 13:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-02-24, 19:26

Widelands uses software rendering, and it seems that many modern drivers are really bad at this. For example, I recently measured, using the profiling tool sysprof, how much time Widelands spends in which routines on a fairly recent system.

Bottom line: About 66% of time was spent on rendering terrain, and then 25% of time was spent in the X server in AMD's proprietary driver. The game logic, on the other hand, was only responsible for 4% of CPU time even after I expanded my territory and built up fairly large economy.

It seems that simply implementing the current 2D-based rendering via OpenGL (i.e. no 3D models, but doing the blitting via OpenGL) could speed things up immensely.


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-02-25, 09:31

ixprefect, I tried this, but i did only manage to get ugly terrain with the triangles clearly visible (that is no really nice gouraud shading). I think it is possible since for example the s25rttr project has a nice engine and is using !OpenGL. But my knowledge of !OpenGL is somewhat limited; if you want a project to get you back into development, that would be a great thing to do ;).

Cheers, !SirVer


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-02-25, 09:32

Ohh, I forgot. We could also replace the current software renderer because !OpenGL is now standard even on mobile phones.


Top Quote