Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: bokkers on November 04, 2012, 07:31:47 PM

Title: Parallax scrolling - Optimizing performance
Post by: bokkers on November 04, 2012, 07:31:47 PM
Hi everyone,

currently experimenting with Wintermute in "fearless noob" mode. Built a scrollable scene that has a resolution of 2500x720. (1280x720 being the general resolution of my project.) With 2 layers that I imported as png files (foreground layer 2667x720, main layer 2500x720), the parallax scrolling works fine and smoothly.

However, with the introduction of a third scrolling layer in the middle between those two (2550x720), the scrolling of the new layer becomes very jerky, while strangely the foreground layer still scrolls smoothly.

I'm aware that the png files are quite huge (most weigh about 3-5 MB each) and maybe that affects performance, but I thought I might be overlooking something. I'd really love to have 3 parallax-scrolling layers, and hope there must be a way to accomplish that smoothly with Wintermute. Any ideas what I could do/try?

Thanks in advance for any help & cheers!
Title: Re: Parallax scrolling - Optimizing performance
Post by: 2.0 on November 05, 2012, 10:30:13 AM
Hi,
Your problem may be connected with hardware limitations.
Texture with size 2500x720 in videomemory takes a place equal a texture with size 3072x1024 and requires 3072x1024x4 = 12 Mb.
3*12Mb = 36 Mb.
It is not so much, but... which videocard do you use? Some videocards (especially integrated) has some videomemory and texture size limitations.
Can you anyway decrease texture size to 2048x512 (for example) and test parallax scrolling with such textures?
Title: Re: Parallax scrolling - Optimizing performance
Post by: bokkers on November 06, 2012, 10:59:36 AM
Thanks a lot for the ideas! Will test the thing on other systems and play around with layer sizes like you proposed, and then post results here.

EDIT: Tried making the textures smaller, and indeed the performance is much better now. Thanks!

EDIT2: I'm building and testing this on an iMac with an ATI Radeon HD 5750 graphics adapter.