• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion Vector sprites (swf) processing limit?

Hello,

I'm using a font generated by a vector sprite (swf). Because I need to draw texts in several different sizes (300px, 200px, 150px, 120px, 80px, etc.), which would generate a lot of memory expense with all the generated images for each different size from the same source.

Also I can not just use the larger font and resize with draw_text_transformed, because that would leave the edges serrated, which is unpleasant. (and the largest size is 300px, loading all the characters I need would already generate a huge expense with all the generated images)


Everything flows well in my tests on windows. But, when I test on android, it does not work properly. Some texts are simply not drawn.





Apparently it's some GameMaker optimization to prevent fps loss. But how can I circumvent it? I prefer the game to be slower than having elements fade from the screen to the player. I have several other huge images (the game is being made in 1080p) and it is more advantageous to use vectors.


How can I ensure that everything that is being requested will in fact be drawn on the screen?


Code:
///On Create:
            font_CenturyGothic = font_add_sprite_ext(spr_font_CenturyGothic,"!\"#$%&'()*+, -./0123456789:;;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}¦©®°²³¹º¿ÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝàáâãäçèéêëìíîïñòóôõö÷ùúûüýÿ‘,’‘“”•…'\"∞",true,80);      
            font_scale  = 1;
            font_s300px = 0.37;
            font_s200px = 0.275;
            font_s150px = 0.206;
            font_s120px = 0.165;
            font_s100px = 0.145;
            font_s70px  = 0.1;
            font_s60px  = 0.087;
            font_s50px  = 0.075;
            font_s40px  = 0.057;
            font_s30px  = 0.041;


///When to draw text:
//Example1:
            draw_set_font(font_CenturyGothic)
            font_scale=font_s200px
         draw_text_transformed(10,10,string(VAR_GRANA),font_scale,font_scale,0)

//Example2:
            draw_set_font(font_CenturyGothic)
            font_scale=font_s50px
         draw_text_transformed(x,y,"Zen",font_scale,font_scale,0)

Thank you in advance for your attention!
 
Last edited:

Nocturne

Friendly Tyrant
Forum Staff
Admin
This is something that seems better suited to YoYo Games than the forums... I would suggest that you file a support ticket and include a link to a YYZ of the game (use the File > Export option to generate a YYZ).
 
This is something that seems better suited to YoYo Games than the forums... I would suggest that you file a support ticket and include a link to a YYZ of the game (use the File > Export option to generate a YYZ).
Where exactly do I generate a support ticket?

And thanks for responding.
 
Top