How do I tell which is a better use of system resources

Get help using Construct 2

Post » Mon Jan 18, 2016 4:55 pm

I want to put a graphic, in this case, a text frame, in different locations on screen (ie. near whoever is speaking at that time).

Can anyone tell me if it's more resource-efficient to create and destroy the text frame as needed (maybe 50 or more times), or to always leave it on screen, but set it to invisible when no one is speaking (turning visibility on and changing its location as required, then setting visibility to off).

Thanks!
B
22
S
5
G
2
Posts: 26
Reputation: 3,565

Post » Mon Jan 18, 2016 5:25 pm

I'd vote for switching visibility and position. Also keep in mind that Text object is way more resource consuming than Sprite font object. So if you plan to use Text object and export it on mobile devices you will notice a small lag (at least on devices like SGS4 or so) before Text object will get rendered.

Anyway C2 engine does not render invisible objects (as well as objects outside the game window), so everytime you create a new object C2 will have to build and render it. If you play with visibility, C2 will build it only once, put it into the memory and every next rendering will be faster.

However if you gonna use Sprite/Sprite fonts and export it to any other plaftofm than mobile, I don't think there will be any noticable performance difference no matter which way you choose.
Image
B
27
S
16
G
60
Posts: 893
Reputation: 34,400

Post » Fri Jan 22, 2016 4:19 pm

Thank you very much @BackendFreak - very informative.

Since I'm aiming at this for desktop it seems like I can go with either one, but it's nice to know the easier (IMO) way of implementing is with the Visibility manipulation.
B
22
S
5
G
2
Posts: 26
Reputation: 3,565

Post » Fri Jan 22, 2016 6:43 pm

However, if you get a lot of text on-screen, this will slow your performance simply as a result of it being Text. We had to use SpriteFonts for lots of text.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,370
Reputation: 4,734

Post » Mon Jan 25, 2016 3:22 pm

@gumshoe2029 Was your project desktop focused? Good to know either way, it's sounding like sprite fonts might just be a best practice (and it's easy, though time consuming, to make them in Inkscape with any font you want to use).
B
22
S
5
G
2
Posts: 26
Reputation: 3,565

Post » Tue Jan 26, 2016 4:18 pm

Yea, our project exceeded the graphics capabilities of phones a few months ago.

We are planning on building simplified client for phones eventually, but that is longer term.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,370
Reputation: 4,734


Return to How do I....?

Who is online

Users browsing this forum: BlueGuy3, ColombageEnPLS, FlyingRam, Zaksoid and 3 guests