collision in cocoonJS solved

  • I have been working on my game for android and have had serious lag issues with cocoonJS. the main issue i had i just solved thru trial and error and wanted to share. to stop object collisions causing slowdowns or stops.

    do this object 1,2,3,4

    object 1 is overlapping object 1 set object 1 x to object1.x+10

    object 1 is overlapping object 2 set object 2 x to object2.x+15

    object 1 is overlapping object 3 set object 3 x to object3.x+17

    object 1 is overlapping object 4 set object 4 x to object4.x+20

    object 2 is overlapping object 1 set object 1 x to object1.x+10

    object 2 is overlapping object 2 set object 2 x to object2.x+15

    object 2 is overlapping object 3 set object 3 x to object3.x+17

    object 2 is overlapping object 4 set object 4 x to object4.x+20

    object 3 is overlapping object 1 set object 1 x to object1.x+10

    object 3 is overlapping object 2 set object 2 x to object2.x+15

    object 3 is overlapping object 3 set object 3 x to object3.x+17

    object 3 is overlapping object 4 set object 4 x to object4.x+20

    object 4 is overlapping object 1 set object 1 x to object1.x+10

    object 4 is overlapping object 2 set object 2 x to object2.x+15

    object 4 is overlapping object 3 set object 3 x to object3.x+17

    object 4 is overlapping object 4 set object 4 x to object4.x+20

    i hope this helps some other indie developers out there my game is running a lot smoother now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)