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

  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • Thank you very much - 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.

  • 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.

  • 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).

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)