sizcoz's Forum Posts

  • Hi

    If you want to save the data as a file to your server, here is the php script.

    <?php

    $myfile = fopen("text.txt", "w") or die("Unable to open file!");

    $text = $_POST['my_data'];

    fwrite($myfile, $text);

    fclose($myfile);

    ?>

    You have to create a file first on your server, I have used "text.txt"

    Then you send your text from Construct as a variable, I have used "my_data", but it could be anything.

    From Construct your Ajax Post would look like this.

    This refers to your php file, which in this case I have called it texttest.php, which you will have to put on your server in the same directory.

    Hope this helps.

  • > For those of you, who are interested in this stuff, I have found a good test to run your browser in.

    >

    > https://www.testufo.com/animation-time-graph#scale=10&ppf=2&measure=animation&busywait=0

    >

    I tried the above and get no lag no matter what. And this is on FF and Chrome, on my lappy that has a not exactly spectacular i5 and an intel gfx card.

    So I'm not really sure why your setup is struggling.

    This is worth looking into.

    Nothing like this then.

    Canary chrome latest build

    This is on integrated gfx, on same laptop, on power save and battery.

    Firefox, with the same test faired a lot better.

    And this is when I plugged it back in.

  • For those of you, who are interested in this stuff, I have found a good test to run your browser in.

    https://www.testufo.com/animation-time-graph#scale=10&ppf=2&measure=animation&busywait=0

    My Results on the Animation Timing test.

    Laptop Asus core i7 Nvidia 745m

    Chrome browser

    1 tab open - test tab

    Test settings = Scale 10 milliseconds Pixels per plot = 2 Refresh rate = 60 Hz

    1. Laptop Plugged in with high performance power setting

    Result = A very rare stutter / jank

    Framerate = steady 60 fps

    2. Laptop Unplugged (on battery) with high performance power setting

    Result = Continuous Stutter

    Framerate = 57-61 fps dropping every 1-3 seconds

    3. Laptop Plugged in with balanced power setting

    Result = Stutter every 3-10 seconds

    Framerate = steady 60 fps

    4 Laptop Unplugged (on battery) with balanced power setting

    Result = Continuous Stutter

    Framerate 56-61 fps

    Would like to point out, this has nothing to do with c3 engine, this is a browser problem.

  • To make life easier, I have a screenshot of the said events.

    Line of sight is set to >Range 100

    And the c3p file

    https://www.sizzle-games.com/los.c3p

  • Dont't use "For each", instead always compare to a instance variable, that meets your condition.

    It's a normal misconception ('gotcha'), that "For Each " picks all that meet an condition. It doesn't.

    This is explained in the manual.

    Have a look at this post, it has the answer for you.

    https://www.construct.net/forum/construct-2/how-do-i-18/how-do-i-get-all-objects-to-st-137546#forumPost949518

    See below post for example.

  • Awesome, thanks sizcoz for the reply and helpful tip!

    I guess the other thing I'm wondering is how do I make it so the player doesn't have to click on the textInput box to type? Like the game putting the cursor in the box (for each box that pops up for the next word, and the next word to type) for the player automatically?

    Thanks again!

    you put textinput> set focused, to get the cursor inside the input box.

  • system > Compare two values > left(TextInput.text,1)="c" > do something

    system > Compare two values > left(TextInput.text,1) does not equal "c" > do something

    left(TextInput.text,1)

    The 1 being the first letter of "cat"

    you can also use Right() and Mid()

    and of course there is obviously Textinput > compare text, but i'm sure you know that.

  • sizcoz Tested your export. These are my results:

    Surface pro 4:

    Firefox: See very noticeable janks.

    Chrome: 69, janky.

    Canary: janky but a bit less.

    Now here comes the twist though!

    I connected the power cable because my surface was getting a bit low on battery. Hmmmmm....janks suddenly decreased quite a lot. Chrome 69 and firefox still had some, but not as frequent, and not as heavy. I thought, that's odd so i tried something else. I clicked the battery icon in the task bar, and changed setting to best performance.

    Result after setting:

    Firefox: no janks

    Chrome: no janks

    Canary: no janks

    Are you testing on a laptop? or using balanced power scheme?

    Results on Sony Xperia XZ1

    Chrome: Some very rare janks far between.

    Edge: Some occasional jank.

    So on windows, power mode setting seems to make a huge difference. In other desktop games(non html5) this usually only lowers framerate when on battery, but does not cause janks.

    I only have laptops, tablets and mobiles to test on. No regular gaming computer, workstation or anything like that.

    I'll test on macbook pro when I'm back at work tomorrow.

    I'm on laptop, power cables always plugged in, but guess what, I went to additional power settings, and set up a custom power plan, and set it to High performance, and got very minimal jank.

    Next dilema, persauding your users to ditch their powersaving modes.

  • > In my experience jank is most of the times a problem with Intel HD graphics ... besides the time v-sync was broken.

    >

    > Laptops and sometimes even desktop PC's don't use the dedicated GPU for browsers, you can add the "rendererDetail" expression to see which GPU is in used.

    Tried that expression to endless runner text object, Was using AMD radeon pro 560 instead of the intel, on Macbook Pro in Chrome 69. Still very janky.

    For me jankyness kan differ greatly from run to run also. Some runs quite smooth with very little jank, some runs completely unplayable even on the same browser, a few previews in between. Have to close preview and try again. Might be a longshot, but can it be that the game starts before everything is ready, before things are loaded properly, causing something to get out of sync? No idea? Very odd though.

    But from todays tests with apk and nw.js export seems way better than preview and html export. Little to no jank in apk and nw.js but some very noticeable janks in preview and html5 export.

    So I've trimmed the runner down to two events, 1 Tiled Background and have it scrolling, nothing is created or destroyed at all, all it does is reset its postion to the right., I have reduced the bullet speed to 200.

    My events.

    And the html export

    https://www.sizzle-games.com/Endless%20runner%20template/

    If you wait and observe at least 20 passes for me I can still see the odd jank, and on occasion a big one, which is obviously disappointing.

    Does this 2 event export jank for you, or is it just my imagination ?

    Hope this gets fixed soon by whoever the powers may be.

  • For those affected, is it fixed in Canary? If so it's probably best just to wait it out...

    No I just tried an html export on Version 71.0.3543.0 (Official Build) canary (64-bit)

    Just as bad.

    Try the export here, platform disabled

    https://www.sizzle-games.com/Endless%20runner%20template/

  • I created a bug report with Chrome here:

    https://bugs.chromium.org/p/chromium/issues/detail?id=881174

    It might be helpful if everyone posts there with names of devices that stutter. Maybe Ashley might have something to add.

    Done

  • Hello.

    Is it possible to remove the screen that starts the game that says: Powered by Construct 2?

    I have the license (paid version) of Construct 2, I would like to know how I can remove this screen.

    Thank you!

    Properties > Loader Style (paid version)

  • Guys, try Canary

    at least for me it seems it back to as it was. i.e pretty much no jank (maybe 1 or 2 when first start but after minimal)

    69 is a jank nightmare though.

    Just tried 71.0.3543.0

    No improvement for me.

    Just for the record

    device 1) Specs asus Laptop, with core i7 and geforce 745 - bad jank with endless runner

    device 2) Specs moto g6 android 8 -bad jank with endless runner

  • > Here we go again... No, honestly the Original Poster (OP) has a good point... But still, here we go again.

    >

    > Anyway, yeah it's even worse on mobile. I personally experience the janks, but at the end of the day, it comes to.

    >

      >
    1. Can you prove it?
    2. >
    3. Do you have time and resources to make a case?
    4. >

    >

    > I'm thankful someone addressed this though. Because we really need proof and a test case right now.

    It's easy to prove. Just run devtools and record performance and check the for the hickups. Most times it's major GC causing it.

    Whatever the cause I'm only interested in real world scenarios (finished Games), not the whys and whatnot's and technicality's, and in a real world scenario, the endless runner isn't good publicity for a flagship piece of software, if anything it would put people of purchasing it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Looking at the devtools memory profiler, C3 games looks like the above graph.

    Below: Static memory allocation for javascript. I don't know if static memory for C3 games might solve it, or even possible but the jank needs to go.

    FWIW, I just checked endless runner in Firefox, and it's just as bad. :(