MoonQuake's Forum Posts

  • 6 posts
  • Searching for Framerate independent got me to the right place: scirra.com/tutorials/67/delta-time-and-framerate-independence

    Searching for Chrome framerate or fps didn't work.

    Thanks Andy

    You guys know why even though hardware accelerated physics intense games aren't so smooth when played in Firefox? Could it have anything to do with the scroll-to behavior?

  • Tried the Physics rolling project that comes with C2 in Firefox and Chrome, and the gameplay is twice as fast in Chrome.

    The fps shows that it runs at 120fps, which should just make it runs smoother, not faster than FireFox's 60fps. Chrome bug? Or Firefox bug (being too slow)? I'm used to working with FF as a test browser.

    EDIT: Not happening with the Space shooter or Platformer projects. Seems like it's physics only, some problem with Impulse applied to objects. Not sure if it's a browser or C2 issue.

    Could be that because the browser runs at 120fps, the impulse is applied every frame and this means twice as many times on Chrome which results in faster movement of the physics object.

    Also, games run way smoother in Chrome... they seem to jitter in Firefox even when running at 60fps. Do we know why?

    Using R99.

    Latest Chrome.

    Latest FireFox.

  • Ah, I understand. Faster than typing it as a sentence. Thanks guys.

    I will most likely come back with more interrogations in the near future.

    MQ

  • Thanks again for the replies, Ashley.

    I'm used to working on large scale projects, so I care about every little 1% optimization I can get... espacially when all these 1%'s add up to 10% faster framerate in the end. It has become an OCD for me. :)

    That bit from 6) is from the "How do I" section on the scirra forums:

    scirra.com/forum/forum_posts.asp

    I've often seen people use that type of language and am still wondering where they use it. Felt like it was used in some sort of advanced coding mode in C2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Updated first post with blue text.

    Thanks a lot for the answers, Ashley.

  • Hello, I'm MoonQuake, first post here! Yay.

    Glad to meet you all! :)

    I've been working on a game with C2 and have been wandering the forums and made quite a lot of searches.

    I am still looking for a few technical answers mainly regarding performance and game optimization.

    Here goes (mainly applies to platformer and physics):

    <font color=blue>

    Should've mentioned that I read the Performance tips page many times, and I still got these questions! :)</font>

    1) By default, are sprites and tiled background objects calculated if they are off-screen? <font color=blue>You know, are they in memory, using CPU/GPU resources? This is a question often asked mainly because we can't find the answer by searching for it and because that's the first thing you want to know when it comes to optimization on an engine you don't know well. Example: are the calculation done for a physics object that is off-screen? That object would not be rendered, but still be active.

    </font>

    2) If a sprite is checking for collision on a physics object, does it do it for every instance of that object (off and on-screen) and every frame? Or just when it touches something? Also, is it better to have the moving sprite do the coll checking or the non-moving phys object? <font color=blue>So I guess a collision check between two objects is as expensive whatever the type of object with C2. It matters simply if there are many instances of these objects? </font>

    3) When a physic object is toggled immovable, does it still consume as much CPU cycles than when it's movable? Like just visually frozen? <font color=blue>What if I was to stack 20 physics objects off-screen at the end of a level. Wouldn't it be better for me to set them Immovable while off-screen? So that their physics calculations aren't done during the whole level but only when visible at the end when toggled Movable? </font>

    Here's a star for making it this far in my post: <font size="6">*</font>

    4) Sorry for not knowing anything about that subject (didn't search for it yet): can you use particles with physics collisions, and if so, is it better to use that rather than just Spawn another object multiple times upon breaking an object? <font color=blue>Any way to achieve that efficiently with C2 without using physics on sprites or particles? :)</font>

    5) Tiled background objects: same as a large sprite with bounding box collision performance-wise? Or do they behave differently?

    <font color=blue>Let me rephrase: if I use a large sprite (512x512px) and set that sprite with a bounding box coll, is it the same performance-wise as a large tiled background object of 512x512px? If not, what is the difference in performance? Like "TB are rendered twice as fast because of this and that". :)</font>

    6) Where do I put bits of coding I see on the forum sometimes? Does this require a plug-in or just a licensed version of C2?

    <font color=blue>e.g.: if (player.x - spearman.x) && (Distance(player.x,player.y,spearman.x, spearman.y) >= 30) > 0 --> spearman.x += 1; set mirrored.</font>

    You just got 2 stars!<font size="6">**</font>

    7) Is there a game in existence that make decent use of physics released on Android made with the awesome C2?

    For that answer: <font size="6">***</font> and you got a Perfect score!!!

    Many many thanks <font color=blue>Ashley</font>! :D

    MQ

  • 6 posts