News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Performance Issue due to too many animations possible?

Started by Leartin, August 28, 2015, 05:10:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Leartin

So I had a neat idea for my buildings today - see attachments.

Having animated smoke in winter images. I'm sure I'm not the first to have that idea, but if I do it, I would do it with pretty much every building that has a chimney (since you only need to change the dat for that)

Can too many animated buildings on the screen affect the game performance noteably, or shouldn't this be a concern?

Ters

It will force more of the screen to be updated every frame (of the animation, which is less than the game's fps). It shouldn't be any worse than what you get when panning around, or locking the view to a moving vehicle. I don't have problems with that on my Windows HD laptop, but my older Linux pre-HD desktop struggles a bit more with such things (though better now than it originally was).

Vladki

I remember turning off the sea animation. That helped a lot on older machines.

Leartin

Even though it's not exactly the same question, I think it's best asked here:

Does it matter how many frames an animation has in total, in regards to performance?

It's only about the total framecount - I have a window-washer-lift in a frontimage, and I move it up and down a single pixel at a time using offset and a shorthand dat - so it's only one image that changes position ~ 200 times.

TurfIt

I'd say image count doesn't really matter. All you're doing is increasing the memory footprint, which is already blowing out the caches anyway.
Important would be the frame rate; It's the changing and redrawing of the image that has the impact. And the total number of such animations on screen at once.

Ters

Mostly what TurfIt wrote, but as for the frame rate and/or number of visible animations, it shouldn't get much worse than having the viewport track a constantly moving vehicle.