Scofano's Recent Forum Activity

  • Most of the performance questions in this thread are meaningless. Read the blog post Optimisation: don't waste your time

    Thanks Ashley

  • 37yo, from Rio de Janeiro. Actually working as a creative director on

    I came from gamesalad but after I've discovered C2 I'm never coming back.

    I hope to have interesting things to share with you.

  • What is the (performance) difference between:

    everytick -> do something

    • and -

    if global variable = 1 -> do something

    Would both of them use "everytick" speed?

  • I'm planning to test on ipad and mobiles after i finish from the browser release.

    If I were you, I'd test it right now (if you are really planning to release it for mobile) because at the end, you may find yourself into re-making the whole game for fps increase (if you have an action game).

    Just my 2 cents.

  • Machine!

    (sorry, could not resist)

    Nice game. I love your logo and the game effects.

  • If you have 32 sprites, just create a global variable and when the user click the flag, turns variable into flag´s name.

  • Scofano

    On browser.

    Really i didn't test my game on mobile.

    If you have the time, give it a try.

    I´ve been very upset with the results (but trying to figure it out how to improve them) of c2 mobile on an action game I´m working on.

  • Thanks, both of you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think the layout size had anything to do with the image memory.

    One of my layout's is 92000 by 3000 px, And the size is 40 mb with tons of trees and grass...etc.

    That file size on a mobile or browser?

  • Yes, or toggle them visible/invisible. At least, if you're getting trouble because of your CPU usage. Creating and freeing objects into memory gives a lot of work to your garbage collector. Anyway, you're already setting the position of your active bullets all of the time in your code, aren't you? So by pooling your objects, you'll technically simply remove all of the object creation and destruction calls during gameplay sessions.

    Good luck going forward, and don't hesitate to tell me if you need anything!

    Great and inspiring works of yours, Nathan. Thanks for the response. I'm listening to your tunes, righ now.

    I've doodled what I understood you told me about the bullets. Is that correct?

    So I've got to define how many bullets I can have on my screen (by speed) and create them all at once on start of layout? Then, everytime it goes off the screen or get hit I move it back to the ship?

  • Groups that are not active will be ignored at runtime. Using a single "every tick" condition to check the active type of gun with 3 elseif conditions wouldn't make a significant difference.

    Like I thought: deactivated group = 0 processing. That's nice to know.

    On mobile, it's mainly collision/overlap checks, loops and physics that will quickly eat up your CPU power. Creating and destroying many objects as well, like bullets for example. If you haven't done so by the way, you will need to pool any type of object that's being created and destroyed often (that is to say create them only once, store them in an array for example and reuse them).

    Good luck!

    In a case of a shooter, are you saying that it is best for me to create, let's say 30 bullets (20 of main ship and 10 for the enemies) and just move them around (on and off the screen) instead of spawning and destroying them?

  • Technically though, scofano, as I understand it the first is best, but by such a small amount I doubt you could tell the difference even doing it a bunch of times over a project.

    Thanks, Arima.

    Everything that I test on browser (pc) runs fine. My problem is when I test it on my Ipad(new).

    So I've started to read forums and ppl always blame the everytick (among other things, like number of objects) for performance.

    What I think I should do (please tell me if I'm wrong):

    I'm coding a top down shooter and there are 4 types of guns. So I coded every gun on their own group (inside each group there is an everytick for each gun) and I activate and de-activate the groups depending on the powerup(gun) I get.

    I will be using 1 'everytick' call (go rotate, for example) instead of using them all in a single 'everytick' that is doing things on gun2, 3, and 4 (sprites) but only gun1 is on the scene. Waste of time putting them all on a single event if they are not on the scene, right? (or, is it ignored for the sprite not to be seen?)

    Thanks

Scofano's avatar

Scofano

Member since 2 Mar, 2012

None one is following Scofano yet!

Connect with Scofano

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies