Scale/performance question


(billy2000) #1

I just want to ask if bigger scale(x2 / x4) affects in any way performance of the game . TY :smiley:


(Bora Kasap) #2

absolutely yes. iā€™ve no doubt about that.


(billy2000) #3

hmmm how much does it affect? is it equal with actually putting in a double sized image(for scale x2)?


(Bora Kasap) #4

it depends on, your background image, count of pixels, count of transparent pixels and maybe things more what i canā€™t guessā€¦


(Bora Kasap) #5

Iā€™m using a really slow netbook computer & thereā€™s not ā€œso muchā€ performence difference between fullscreen(900x900) & window(500x500)ā€¦


(billy2000) #6

oh k ty very much :slight_smile:


(Ultima2876) #7

Surprisingly little. If youā€™re talking about the global scale (FP.screen.scale) then very little at all. FP draws to a buffer then just scales that, so drawing at 1280x800 (2x scaled) isnā€™t too much slower than drawing the same ā€˜sceneā€™ at 640x400. Itā€™ll probably actually be quite unnoticeable.

However, drawing 1000 sprites all individually scaled at 2x will cause a large performance hit. This is because sprites with scaling/rotation transforms are slower to draw than those without - much slower (5-10x slower than drawing an untransformed sprite). This is why Stamps donā€™t support scaling/rotations - they are a fast alternative for simple sprites.