Spritefont horrific lag on mobile, Ejecta, CocoonJS

0 favourites
From the Asset Store
a ready made template of Mobile Advert, Google Play and Mobile IAP Plugin,
  • Sisyphus WebGL is supported on Safari Chrome Firefox

    , thanks for the idea, but it doesn't work in Ejecta unfortunately. I don't think that Construct 2 can tag a project to be exported as nonwebgl in Ejecta.

    Maybe try to disable webgl, and export to cocoonjs?

  • Sisyphus CocoonJS has terrible performance on my project without WebGL. It's also riddled with a slow startup because Ludei insist to load everything at startup. Might work for other people though.

  • You can disable WebGL directly from CocoonJS app the mobile device itself btw.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • disable webgl in construct will help just little in ejecta

  • I can't disable webgl in construct for Ejecta. It reads it as enabled... although I use latest unstable build of Ejecta.

    In terms of FPS, webgl is supposed to help you run your game faster, but there is a bug with spritefont on mobile, and it runs bigger spritefont texts awfully.

  • I can't disable webgl in construct for Ejecta. It reads it as enabled... although I use latest unstable build of Ejecta.

    In terms of FPS, webgl is supposed to help you run your game faster, but there is a bug with spritefont on mobile, and it runs bigger spritefont texts awfully.

    can you sen me the link of lastest ejecta unstable ?

    thanks in advance

  • matrixreal here you go https://github.com/phoboslab/Ejecta/archive/master.zip Latest development build. same way you use Ejecta 1.5 <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • The problem is the sprite font of the size in your project has 30,000 characters, meaning every frame must render 30,000 quads, which is far beyond the budget of most mobile devices.

    I've optimised the Sprite Font plugin for the next build so it only renders the on-screen characters. This substantially boosts performance for your given project, but won't do much to help if it's slow with the entire sprite font on-screen. (On iOS Safari this is probably solely down to lack of WebGL support which is supported in iOS 8.)

    Sprite Font+ obviously isn't fixed because it's a third party plugin, and this is one of the disadvantages of using unofficial plugins, but if you ask the dev then they may be able to diff the runtime scripts and add the optimisation to the third party plugin as well.

    I'd still recommend splitting the object up in to smaller paragraph-sized objects if at all possible, regardless of whether you use sprite fonts or text objects. This allows the engine to quickly skip entire offscreen objects without having to determine whether individual lines/characters are within the viewport.

  • Ashley , I suspected that it's something like that, that it was rendering them separately and not only onscreen ones. THANK YOU for the optimisation, I'm going to go with text object though, but others will surely benefit. I have yet to find an automated method to load in the massive text quantity that we have. So we are just adding continue or choices along the way to break it up. I can't have more paragraph sized objects since there is really big amounts of text. It's practically a whole novel

  • I don't understand why you can't have separate objects. Of course it's a lot of text, you just need to break it up in to separate objects, so instead of one object with 100 paragraphs, you have 100 objects with one paragraph, positioned in the right places for appropriate text layout. That will probably be far more performant no matter which object you use, since word and glyph layout and rendering only happens on a paragraph level, not on a novel-length level.

    One other thing to try if you really must have extreme-sized text objects is to disable WebGL mode. Rendering text in WebGL mode requires an intermediate texture which caps you at the device maximum texture size, which is sometimes as low as 2048x2048 and commonly 4096x4096. Rendering text in canvas2d mode can be done directly and the maximum texture size (probably, depending on browser implementation) does not apply. Even so each time you draw text the browser may need to do a full text reflow to calculate word wrapping, kerning etc., so it will still be a significant benefit to break it up in to separate objects.

  • Ashley I'd have to load each paragraph separately, and gauge how many words the paragraphs have before loading. Right now, I either AJAX load the text into the text.object or manually via action, but I load a big chunk of text, about 1500 words.

    If I load separate paragraphs, I'd have to go through the whole novel (which branches, a LOT) and cut separate pieces and stick them in the project. I'm the only one doing the implementation of the assets, everybody else is working on other aspects of the game.

    About WebGL, I tried turning it off, but ejecta (unstable build, because I need lazyloading) doesn't read the switch to no WebGL, and plays everything in WebGL no matter what I select.

    Also I tried using no WebGL in CocoonJS, just to test it, and it runs slow. So I guess I need the speed bump. It's still an interactive visual novel So it has a lot of other aspects that take up CPU GPU.

    Regardless, the project is moving forward well, and apart from a small lag on release date, we will be on schedule

  • hi

    really its difficult for me

    i don't understand what ashley and damjancd speak about

    iam using sprinte font to set score every 1 secondes (and webgl desabled) ...

    if i will use ashley's new beta or text font ... it will optimise some lagging ?

    thanks

  • hi

    really its difficult for me

    i don't understand what ashley and damjancd speak about

    iam using sprinte font to set score every 1 secondes (and webgl desabled) ...

    if i will use ashley's new beta or text font ... it will optimise some lagging ?

    thanks

    If i get it right, next beta or stable release. But if you use it only for score, you will not notice any lags, lags appear only if you had 500+ or more characters.

  • i don't understand why for exemple .... iphone 4 can run complicated games in appstore faster and very playable

    and my games made by c2 are little slow ... is it because using ejecta and wrapper ? or there is something i forget ?

    any one can give us an exemple of complicated game running good on iphone 4 ?

  • i don't understand why for exemple .... iphone 4 can run complicated games in appstore faster and very playable

    and my games made by c2 are little slow ... is it because using ejecta and wrapper ? or there is something i forget ?

    any one can give us an exemple of complicated game running good on iphone 4 ?

    I guess this is because iphone 4, the device is very weak for html5.

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