Change or Interpolate Text Size & Color?

Is there any way to modify or interpolate the size and color of text?

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I'm afraid you can't use Attributes in either of those settings. If you created your text as images you could then adjust the size and color using Interpolate, but you loose the ease of use of using the display text behavior of course.

  • SocksSocks London, UK.Member Posts: 12,822

    @rainwaterstudios said:
    Is there any way to modify or interpolate the size and color of text?

    That all depends on the particular circumstances of your game, for example here is a Display Text behaviour with changing colours (file attached) but this particular approach relies on a black background.

  • rainwaterstudiosrainwaterstudios Member Posts: 198

    Interesting, thanks for the sample @Socks ! Any thoughts on growing or shrinking text size?

  • SocksSocks London, UK.Member Posts: 12,822

    @rainwaterstudios said:
    Interesting, thanks for the sample @Socks ! Any thoughts on growing or shrinking text size?

    Like @jamie_c says the best way is to probably rasterize the text as an image, it allows a lot of flexibility with sizing and colouring and so on, otherwise you will need to use a bunch of tricks/workarounds, all which come with various (significant!) compromises.

    The only way I can think of growing or shrinking text would be with the camera, but that obviously comes with a bunch of issues !

  • rainwaterstudiosrainwaterstudios Member Posts: 198

    It seems strange to me that such a simple feature is so hard to achieve. Why can''t attributes be used for text size? It's too much of a hassle to have to deal with rasterizing and displaying constantly changing 4+ digit numbers... Why don't the developers just add an expression editor for the text size like there are for position and direction???

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2017

    @rainwaterstudios said:
    It seems strange to me that such a simple feature is so hard to achieve. Why can''t attributes be used for text size?

    I suspect it's because text needs to be rasterized to pixels to be displayed on a device's screen, so - for example - if you have text growing in size over time from very small to very big, filling the whole screen, then you'd effectively be asking the engine to create (rasterize) these images in real time, a screen full of growing text on an iPad would be 60 x 2048 x 1536 pixel images every second.

    I also suspect this is the reason for the Display Text's font size limit, to prevent users generating very large image files.

    @rainwaterstudios said:
    It's too much of a hassle to have to deal with rasterizing and displaying constantly changing 4+ digit numbers...

    Just make ten individual single numbers (0-9) to generate a custom font (Google GameSalad Custom Font).

Sign In or Register to comment.