nimos100's Recent Forum Activity

  • >

    > > I find no difference between On collision or Is Overlap.

    > >

    >

    > That sounds weird, because there is no doubt when I test it that I get a huge difference in performance, do you have any data to show, that would be interesting to see?

    >

    > Like how many objects etc. would like to see that.

    >

    ~1400 objects peak, 60% CPU usage. No difference in CPU usage with On Col or Is Overlap. No difference in collision checks per tick.

    That makes no sense, that would kill/slow down my game if there was so many objects with "On collision". Can you do me another favour and run this program, or if anyone else could as well. And just disable "On collision" and enable "Is overlapping" and next try the other way around and screenshot the debug performance window. Because it seems strange that it would be that different. Have you done anything special with your "On collision"?.

    [attachment=0:dissnu67][/attachment:dissnu67]

    The results I get from this is these which uses 1024 objects:

  • > Its primarily the "On collision" under setup, try to disable that and let it run again. You shouldn't use "On collision" it is a performance killer

    >

    and what you suggest to replace "on collision" ?

    overlapping ?

    and what is the difference between them

    Yeah I would replace "On collision" with overlapping due to performance. I don't know what the difference is, but just that you loose performance using "On collision" it can easily be tested, just make a program as in my example.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • nimos100 not sure but AFAIK the debbuger can add an overhead, to be really fair you also have to make them behave the exact same way too to really evaluate a waste between the two (is overllapping does not have to verify if it was already colliding with the same exact instance in the past, while on collision does, also not sure what happens if you have 2 collisions at the same time that occurs between 1 sprite2 and 2 sprite in the same tick between on collision and is overllaping).

    but that is interesting.

    Im not sure what you mean, what im showing is if you are testing for collisions using the two ways there are. Why waste is important im not sure, because if I increase the number of yellow squares the one using "On collision" will eventually drop in FPS due to amount of objects before the "Is overlapping". So im not looking for exact numbers, just that you can improve performance using one way over the other. Can you explain what you mean differently because Im not sure I understand what you mean?

  • overllaping and on collisions are actually similar, sometimes you can gain a little with overllaping as it is not checked as much in case of movement or creation.

    There is a difference between them as I see it. Take this example, this program does absolutely nothing at all. The code you see is all there is. I let it run for a few seconds so it settles. One is disabled for each test ofc.

    Check the CPU util...now if I increase the number of yellow squares and still this program does nothing at all, than check the CPU changes.

    If these functions are the same then how would you explain the severe increase CPU util from one to the other, when the program doesn't do anything? I agree with you that according to the manual they do the same, but clearly they do not give the same performance.

  • I find no difference between On collision or Is Overlap.

    That sounds weird, because there is no doubt when I test it that I get a huge difference in performance, do you have any data to show, that would be interesting to see?

    Like how many objects etc. would like to see that.

  • nimos100 - I get you, yeah that makes sense I'll go through an optimize that way, turning off collisions on sprites that are just for background art for example?

    I like the distant object off / on example, I wonder how it works with physics, what's the difference between collision properties and collision box 2d?

    You shouldn't spend time disable objects that doesn't require collision checks, that doesn't help. Only those that are involved in collisions.

    Im not sure about the physics, but if you can disable collision for those objects the same way as for normal objects, I can't see why you shouldn't get a performance increase, but I don't know the physics functionality that well, so you would have to check if that's the case or even possible.

  • If you're using On Collision, maybe try Trigger Only Once with it? I don't remember if that's possible, but triggering stuff only once always saves performance.

    heh, "ass_destroyer"

    That the whole problem with "On collision" you can't optimize it. It will trigger when there is a collision. So its like a "On created", "On destroyed" etc. That's why you should only use "Is overlapping". Something is just not very good in "On collision" but don't know what it is. But since its a trigger like "On created" I imagine that maybe C2 uses a lot of resources to constantly check whether it should trigger or not. But honestly its just a guess.

  • You will use some CPU so will never get to zero, I don't think trigger once, will help improve performance. When I say optimize, its to reduce the amount of collision checks that is needed. Trigger once will still do 60 checks per sec, but you can try to disable it and see if you get worse performance, but I would imagine that it would be the same,

    With optimization I mean you actively enable and disable collision on objects that there are no reason for C2 to check. For instant an asteroid not even near the player, there is no reason for C2 to check for collisions on that, so you could disable that, until it for instant is within a certain range of the player. Even though that will require more updating it will improve FPS. But it kind of depend on your program, how you can optimize it best I think.

  • Yeah you should only use overlapping, never on collision. Did this test the other day. which compares the performance. Optimal you want to use "Is overlapping" and optimize it, that will give you the best performance.

  • Its primarily the "On collision" under setup, try to disable that and let it run again. You shouldn't use "On collision" it is a performance killer

  • You can just make a variable called "Combined_ score".

    Set Combined_score = 0
    For each Player
           Combined_score = Combined_score + Player.score
    
    If Combined_score > Goal
    
    [/code:fgt82psg]
  • Mine crashes once in a while, but nothing like you describe, in general I would consider it a stable program, so no different than other program if I can say it like that.

    It doesn't sound like a bug, otherwise I think more people would report similar things. Do you experience things like that with other programs?

    You might want to check your memory, HD etc for errors maybe. Microsoft have some programs that can do that for you I think.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies