Tiled background performance question

Just started using Construct 2? Post your questions here

Post » Tue Feb 17, 2015 2:09 pm

Hey,

I have a question about performance as I am working on a mobile game (1280x720). Which of these conditions is best practice, or if neither, can you explain how best to accomplish the goal without sacrificing FPS? I have read in the performance guides and manual that using large objects is not best practice especially when you could be repeating a smaller object with a Tiled Background.


GOAL: Create a single coloured object (no colour deviation) in the UI which is 32x720 for minimum performance cost.


OPTION1: Create an Object and size it to 32x720, fill in the colour, then drag it onto the Layout.

OPTION2: Create a Tiled Background object and size it to 32x32, fill in the colour, then move it into position and stretch it out to be 32x720.

OPTION3: Create an even smalled Tiled Background object (2x2), fill in the colour, then move and stretch into shape: 32x720.


Thanks for your help,
Lncredible
B
8
S
2
Posts: 58
Reputation: 684

Post » Tue Feb 17, 2015 2:20 pm

Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,742

Post » Tue Feb 17, 2015 3:24 pm

Thanks Ashley - I'll give it a go and post results if I find anything meaningful.
B
8
S
2
Posts: 58
Reputation: 684

Post » Tue Feb 17, 2015 4:03 pm

I guess this quote also applies:

'This means our 1920x1080 tile takes up 2073600 x 4 = 8294400 bytes, or about 8 megabytes.'

'In this case the 1920x1080 image will be placed on a 2048x2048 sized texture in memory!'


from blog/112/remember-not-to-waste-your-memory

so if I had an extra wide 32 x 720 tile it would take up the space of 1024 x 1024 sprite in memory, whereas a repeated 32 x 32 would take 32 x 32 in memory.
B
8
S
2
Posts: 58
Reputation: 684


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest