Several questions about performance

0 favourites
  • 8 posts
From the Asset Store
Several elements of the game interface hidden objects
  • 1: I use about 30 event sheets in my game. For example : character controler, disable /enable colision , Disable animations , Music , sounds , etc

    Is it better to use separate event sheets for each of theese , or 1 huge event sheet? Will plenty of eventSheets decrease Performance?

    2: Will invissible objects icrease performance? Example: Is on screen set visible, is not on screen set invisible.

    3: Will big music files decrease performance? 5 minute tracks per level? Or 1 minute loop is better

    4: Is pin behaviour the same as every tick set position to object?

    5: is it better to use every tick or every 0.01 seconds?

    6: Why CoconJS is much faster on mobile devices than IntelXdk. What can i do to Xdk settings to get the same performance as CoconJs?

    7: Why i cannot use more than 1 else in my eventSheet?

    8: I was making a big game level, but i hit the 10000 margin limit, any way to increase it?

    This is all what i am interested right now, , thank you for advice guys.

  • 1. It's for organization purposes and probably has no impact on performance at all.

    2. Less things to draw would speed up rendering.

    3. Whether the music is one minute long or on hour has no impact on performance, only loading time of the webpage.

    4. Basically. The pin behavior has more features than just that, such as setting angle. And there are cases where doing it with events is more useful.

    5. Any value below 0.0166 (1/60) with every n seconds will be the same as "every tick". Other than that just use the one that makes sense for what you're doing.

    6. As I understand it CocoonJS takes some shortcuts to make rendering faster at the expense of unsupported edge cases, whereas IntelXdk supports everything C2 supports. Making it faster is unknown to me, I do not use it.

    7. Don't know. I'm guessing it's where you're placing them. Else can't be used after a trigger is one reason that comes to mind.

    8. Why not just increase the layout size? Margins are just extra space around the layout for editing purposes.

  • Thank you , helped.

  • I will add that for 2, off screen object are not rendered, to check if rendering is needed, the first thing it checks is if the object is invisible, then if it is off screen, then the size, it might be possible that just checking if it is on screen or not to change the visibily manually will be slower than just letting it be.

  • 2 - No this will not increase performance. All this will do is force the system to test each object each tick to see if it is on screen which would in fact hurt your performance. If you have a really big game with a large number of static objects, you may want to look into enabling Render Cells.

    4 - The pin behavior can have the same result as the set position to object but also has the added benefit of getting rotation from the object pinned to. Also, it is optimized so would cut down on performance issues.

    5 - In almost all cases, using time is better than every tick. Every tick can cause issues because different systems will register a different number of ticks per second.

    7 - You can use more than one else. However, it is only valid immediately following a single easily defined event trigger. Else just means if the last event didn't fire, trigger this event. You can combine an else statement with another condition to create an "Else If" event and have any number of these in sequence followed by i final "Else." See the else section of the tutorial at the following link for more information:

    https://www.scirra.com/tutorials/292/gu ... t-features

  • Thank you guys for suggestions. Here is last one i want to ask. You sayin that what is not on screen is not going to be rendered yes? I have about 30 torches in the level , each torch has 12 frames. So if the torch is not on screen it will not be rendered , but the animations will still be played for all of them? or should i stop animation while not on screen?

  • Animations for off screen items should not significantly affect performance. You could disable the animation if you would like but, it probably won't have too great an effect. In fact, the very act of testing if the torch is on/off screen could completely negate any benefit you would have seen. Take a look at this tutorial about Render Cells for a better explanation:

    https://www.scirra.com/blog/ashley/14/h ... cells-work

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok thank you , gonna read that.

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