60FPS, Microlags, wtf?

0 favourites
  • This is my second runner game with such lags.

    I disable everything and changed logic, but lags remained. The game is almost empty, where are they?

    https://giphy.com/gifs/p3n7gEOE6vN3BG8X1l/html5

    *see how the machine twitches back

    https://drive.google.com/open?id=1lEPnM ... ZtyftDumxd

    *capx

  • You are using a deprecated version of the tween plugin.

    Try replacing it with a new version:

  • thanks, but if I remove the tween, the problem remains

    https://drive.google.com/open?id=1FJTMY ... GzWl84z8uB

    *capx without behaviors

    r250

  • exactly the same lags also in C3,

    no behaviors

    no effects

    5 events

    and can the browser affect such lags?

  • exactly the same lags also in C3,

    no behaviors

    no effects

    5 events

    and can the browser affect such lags?

    Just tested in FF, Chrome and NW.js and silky smooth in all three. (C2 r254 x64, Win7 Pro x64)

    Have you tried in other browsers?

    Have you tried with browser addons disabled?

  • Change the first action to this:

    Main_car move 5*60*dt pixels

    This should fix the car jerking, but the background is still lagging. I see it too in Chrome and NWJS.

    Strangely, it lags much more when I touch the screen, even after I removed Touch object completely from the project.

  • thank you for testing,

    Yes, I have tried FF, Opera, Chrome

    and I tried in Chrome on my Android phone

    all the same

    in my previous game, people complained about such lags, so I'm afraid to keep making the game. I'm sure the lags are related to the overall performance at a given time, because the more links open in the browser, the more this lag occurs

    here is a link to html5

    Lenovo A1010a20, android 5.1 - lags still have

    http://q3olegkagames.com/project/test/

    *r250 export

  • but the background is still lagging

    Yes, I deleted this action. And added a "scroll to" and "8 direction" behaviors for the machine, and the lags began with the background. I still thought that these lags are related to "scroll to"

  • Does your browser support webgl? webgl test

    Also, you're moving the car 5 pixels per tick, but that is not a framerate independent value... it should be 300*dt (assuming you want 300 px / sec).

    Regarding the scroll-to lerp, you should really use the technique shown in this blog, so the pan works at all different framerates. This means that the Scroll To X should value should be: lerp(scrollx, main_car.X + 300, 1-0.05^dt).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Does your browser support webgl?

    Yes

    Also, you're moving the car 5 pixels per tick, but that is not a framerate independent value

    thanks, but it still does not solve the general problem, the background is still shaking. As I said above, I tried different logic (behavior scroll, 8 direction).

    The lags are not very noticeable at the moment, but they are in an almost empty project and there will be more of them when the project is filled with events and behaviors.

    When I run Twitch.tv (lol) in another browser tab, the lag becomes much more noticeable

  • For me touching the screen makes the lag much more noticeable.

    Try moving (re-positioning) the tiled backgrounds instead of resizing them.

    Add "Destroy outside of layout" behavior to all rocks/grass etc.

    This will probably not fix the problem completely, but it may help.

  • For me touching the screen makes the lag much more noticeable.

    that's weird.

    Try moving (re-positioning) the tiled backgrounds instead of resizing them.

    Add "Destroy outside of layout" behavior to all rocks/grass etc.

    This will probably not fix the problem completely, but it may help.

    unfortunately the lags remain, even if you remove all events except the movement of the machine

    I'm trying to figure this is a bug of C2 or something else? because the project is too small for such lags

  • This sounds like just another case of v-sync accuracy. There's already a bunch of threads about it on the forum. It also appears to affect other tools and varies depending on the system, so I think it depends to some extent on the OS, drivers or hardware.

  • I don't know if its a thing, but constantly increasing the size of a background can't be a good thing.

    Also I'm pretty sure its not lag, but your placement events which are using comparisons that happen every tick.

  • I don't know if its a thing, but constantly increasing the size of a background can't be a good thing.

    Also I'm pretty sure its not lag, but your placement events which are using comparisons that happen every tick.

    right,

    usually I don't use every tick check for such events

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