helena's Forum Posts

  • Oh I see. "7.4 mb images" on the level screen.

    It is consistent no matter level size/number of graphic tiles. (on the smaller end being 200 objects and the heaviest level at 780 objects, but averaging 400-600 I think!)

  • Ah ok!

    *googled, found the memory documentation*

    Then question is, is this much?

    The sprites are:

    32x32*4 = 4096 byte per tile, and then times 600 circa, 2457600 bytes... 2,5 mb.

    Doesn't sound much. But maybe I should include ALL the animation frames too in above equation too? (above I just took the "current" frame")

    Then it will go up A LOT.

    *counting*

    86 frames.

    32*32*4 * 600 * 86?

    211 megabytes? hmm. That's a bit different.

    (I think I can optimize down to 80 frames)

  • Hello.

    What is most effective performance wise (FPS)

    Premise: 600+ sprites. Sometimes less, sometimes more. This can't be changed.

    Original: Fade behaviour.

    Disabled in main gameplay, but enabled in level loading/unloading.

    (the loading/unloading is when the stage is filled with the gameplay tiles one by one by random, fading them in/out in succession, using the Fade behavior)

    OR

    Replacement 1: Replace the Fade with custom made dedicated fun animation, 4 frames, 15 different animations, so 4*15.

    OR

    Replacement 2: Replace the Fade with custom events, changing object's opacity manually and using tween plugin.

    OR

    Replacement 3: Make a new sprite object with same content, with the effect enabled there, and once finished destroy those sprites and replace with the effects-less gameplay sprites.

    Those three replacement solutions require more events (exact number vary depending on solution).

    But those events are only run at load/unloading stage and the events are completely disabled in gameplay.

    So the question is:

    Will Fade tank FPS even if it is not actively used?

    (My guess that the Fade Behavior is kind of a merge of a simple Tween and Opacity)

    Or is it so that it is mostly the WebGL effects and/or actively in use that will effect performance?

    Thank you. I am trying to optimize my game as much as I can. On heavier levels it goes down to 52-54 fps at some moments, on i7-6700k 4GHz cpu (and Geforce 970 GTS) but mostly often it hovers around 57-59 fps.

    EDIT: Rereading I think it is not tanking much, because I mistook it for Effect but is actually Behavior. I have edited the text from "Effect" to "Behavior" now.

  • Ah ok! Right now it is for testing purposes so it will suffice.

  • Ah ok! I will try to locate the folder myself by comparing files.

    EDIT: do you mean that I *have to* remove irrelevant files from the nw.js for it to work?

    Suffice to say I don't know much about nw.js only that it is a neater way to display the game..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The latest version on the website is 0.54.0 which is also what is running in my C2.

    I have found that there's newer version on nwjs.io which is version 0.71.0

    It is zip file.

    Question 1. Is it safe to use the newer version with C2? Or would it mess up things?

    Question 2. Since it is a zip file: where should I place the files?

  • Yeah I could do that. But I would need to edit a lot of events.

    I did a ugly workaround now: by changing timescale instead. I think it will work better this way. I can always adjust the count down timer accordingly so it ticks down in same speed.

    EDIT: I didn't even have to adjust the countdown timer as it was running independent from timescale.

  • Thank you for replying!

    It looks like it will only change the animation of the active animation of the sprite, and not all the animations in the sprite.

    Also when I change animation to play another animation (in the sprite), it will revert to the original speed.

    I will try to solve this meanwhile.

  • Hello!

    How do I change the default animation speed of a sprite at runtime so that all the new sprites created onward will have the new value?

    The reason of this is that every level has its own timing setting read in by level data file and then I want to adjust the animations to reflect that.

    I know I could add hundreds of lines to include animation speed for every event instance new sprite is created, but it is a bit heavy (in particular since I only have one sprite object that consists of many different sets of graphics.... it is a puzzle game with potentially 600 sprites on screen) so I wonder if it is possible to change the default speed at runtime.

    Thanks!

  • Thank you!

    I wrote this post because I still think it should be included in the documentation or at very least a link.

  • Hello.

    I am having an issue with the documentation regarding the Regex expressions.

    There's "flag" mentioned:

    RegexMatchAt(String, Regex, Flags, Index)

    Process the regular expression Regex on String with Flags, and in the list of results, return the entry at Index.

    But there's no reference about what those "flags" could be.

    I am using this in context of Construct 2. Maybe it is told in C3, but in Construct 2 I am not told what the flags could be.

  • Thank you, I will attempt to do what you suggested. It sounds doable though!

  • Let's say that I want to replace the second "." that occurs in one string with "!".

    Like thus:

    From

    "This is a house. It has burnt down. How sad."

    to

    "This is a house. It has burnt down! How sad."

    It should be flexible so I can change which of the three "." I want to get replaced at runtime.

    So one time it would replace the first . to !, or another time it would do the last . to !

    I have tried to look up RegexReplace, but I could not find any information on the "flag" part of it. There's no mention about the flags in the manual.

  • Wow, that's cool, R0j0!

  • If possible I would like to stay with Construct 2. 😆

    I know, it is much of me to ask, really.

    Thank you all for your replies so far and willingness to help in the way you are able to.