Collision Checks Increase on Middle of the Layout [HELP]

0 favourites
  • 7 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello,

    In my game, when the character is on the left or right of the layout, the collision checks are low (~20/tick)

    But when the character is on the middle of the layout, suddenly the collision checks became ~50-80/tick

    I tried disabling the of the code on my event sheet 1 by 1 until all of them are disabled, and the collision checks still spikes when on the middle of the layout

    Here's the simplified version of the problem (in this case, the collision checks only change from ~3/tick to ~7/tick)

    https://imgur.com/a/kbfek

  • My guess is there's less collision checks because half of the collision box is not on the screen?

    My other guess is that this isn't causing you any problems.. am I right? If not, why worry about it?

  • My guess is there's less collision checks because half of the collision box is not on the screen?

    My other guess is that this isn't causing you any problems.. am I right? If not, why worry about it?

    Well, in the middle there should be less collision checks than the left / right side of the layout

    I worried because this game is for mobile and in 1 level there will be a lot of collision checks, and i'm trying to reduce it right from the start

  • Well, I'd start with the manual:

    Collision checks/sec (e.g. 1144 (~22 / tick)): how many times in the last second the engine had to test for a collision between two objects. Collision checks are invoked by the On collision or Is overlapping sprite conditions, and many behaviors perform additional collision checks automatically. In brackets, the average checks per tick is also shown. For example if there were 600 collision checks in the last second and the framerate is 60 FPS, the estimated checks per tick will be 10. This tells you on average there were about ten collision checks per frame, although the actual value will often vary frame-by-frame.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I'd start with the manual:

    Collision checks/sec (e.g. 1144 (~22 / tick)): how many times in the last second the engine had to test for a collision between two objects. Collision checks are invoked by the On collision or Is overlapping sprite conditions, and many behaviors perform additional collision checks automatically. In brackets, the average checks per tick is also shown. For example if there were 600 collision checks in the last second and the framerate is 60 FPS, the estimated checks per tick will be 10. This tells you on average there were about ten collision checks per frame, although the actual value will often vary frame-by-frame.

    I see

    Thank you so much for the detailed explanations

    and also, you're right, the middle of the layout has more instances of solid objects.

    In this types of game (platformer), which is better:

    1) put the solid behavior on the tilemap directly

    2) put the solid behavior on other object (sprite or tiled background)

  • I'm not sure it makes a whole lot of difference (I might be wrong). I suppose the less solid objects you have to use, the better.

    These are good reads if you haven't read them already:

    https://www.scirra.com/blog/83/optimisation-dont-waste-your-time

    https://www.scirra.com/manual/134/performance-tips

    EDIT: Also, I think if you'll search the forums you can find some threads discussing reasonable ranges of collision checks..

  • I'm not sure it makes a whole lot of difference (I might be wrong). I suppose the less solid objects you have to use, the better.

    These are good reads if you haven't read them already:

    https://www.scirra.com/blog/83/optimisation-dont-waste-your-time

    https://www.scirra.com/manual/134/performance-tips

    Okay, Thank You so much for the help !

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