User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: perfomance of collision checking

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    357
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb perfomance of collision checking

    does count of collision check matter for perfomance? I mean, if i making a platformer and collision checks goes through backdrops. I'm a bit worried, because scene contains floor, walls, and even roof, background images - all of them are backdrops wich are converted by active - add backdrop as obstacle. Logically engine must check all backdrops with player position.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    945
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    Yes, it matters a lot! That’s why you should uncheck fine detection/use quadratic shapes as often as possible and reduce colliding objects/backdrops to a minimum amount. Most games layer a complex tile set over a very simple collision mask to save resources. Also, object scoping and collision scheduling are very important to reduce checks wherever possible. That’s why you would always put an overlap check on the bottom of an event block. Especially AIs often don’t need overlap checks every frame tick, most enemies in my current project run their checks at 30 FPS which reduced the load a lot, sometimes even 10FPS is still sufficient. And keep one quirky thing of Fusion in mind: Collisons will always be checked and cannot be avoided by scoping or group deactivation (yes collisons are even checked in deactivated groups!). Overlap checks don’t show this behavior tho, that’s why I use them in any case where I employ the techniques mentioned.

    https://community.clickteam.com/threads/101380-The-Clickteam-Fusion-2-5-optimisation-amp-performance-Hard-Data-thread/page6?highlight=Hard+data

    This thread will be interesting for you, linked the part about collisions.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    357
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    damn, i knew it! thanks a lot

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    945
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    Of course you can also use rectangles, I got that wording wrong. Slopes will always need fine detection tho and therefore are a lot more expensive, if your gameplay doesn’t need them skipping those at all might be a good step.

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    357
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Julian82 View Post
    Of course you can also use rectangles, I got that wording wrong. Slopes will always need fine detection tho and therefore are a lot more expensive, if your gameplay doesn’t need them skipping those at all might be a good step.
    one more question. How you do custom collision checker? My ideas is:
    1. Using 1 pixel wide and tall active object. Just by looping through you objects you can re-position collision checker relative to target position and scale him. Something like:
    on group activation - run eachloop "cr_cChecker"
    on eachloop "cr_cChecker" - create ("Active")
    set x position to x left of target x (optionally x offset)
    set y position to y top of target y (optionally y offset)
    set scale x - owidth of target object
    set scale y - oheight of target object
    * only problem is here - you can use only rectangle form.
    2. or one active object wich contains all possible collision shapes in frames.
    * And here question: wich way is better for perfomance, active object with single frame or with multiple frames?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    945
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    I think using one collider in general an shaping it for each instance you loop through is a pretty smart and practical approach if planned carefully. Scaling will probably be a bit more expensive than frame shifting, but that’s minor and just a guess. Be careful with non rectangular shapes tho, I would use an extra collider that holds all shapes that need fine detection enabled to work properly, otherwise all rectangles are fine detected too and produce unnecessary load.

    There is another method next to instance looping called “embedded colliders”, which I prefer in most cases as you get rid of the need of to use instances and for each loops this way, I’ve linked the tutorials here. https://community.clickteam.com/threads/102646-Can-not-make-quot-headshot-quot-function

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    357
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Julian82 View Post
    I think using one collider in general an shaping it for each instance you loop through is a pretty smart and practical approach if planned carefully. Scaling will probably be a bit more expensive than frame shifting, but that’s minor and just a guess. Be careful with non rectangular shapes tho, I would use an extra collider that holds all shapes that need fine detection enabled to work properly, otherwise all rectangles are fine detected too and produce unnecessary load.

    There is another method next to instance looping called “embedded colliders”, which I prefer in most cases as you get rid of the need of to use instances and for each loops this way, I’ve linked the tutorials here. https://community.clickteam.com/threads/102646-Can-not-make-quot-headshot-quot-function
    i saw this before, i'm a bit worried because this method uses always and rapidly swithes between animation sequences before engine even draw animation. This sounds like abusing/overriding. Anyway, i'll try.

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    945
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    It’s very performance friendly in my experience, just a bit weird to start with.

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    coler123's Avatar
    Join Date
    Sep 2014
    Location
    Milky Way
    Posts
    51
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by alexexhowl View Post
    i saw this before, i'm a bit worried because this method uses always and rapidly swithes between animation sequences before engine even draw animation. This sounds like abusing/overriding. Anyway, i'll try.
    It is working fine for me and with a lot of objects having gravity and a bunch of loops for attacks and movements. Also enemies in my game are like this one with HD graphics and no slow downs so far



    This is one of the bosses from my upcoming game

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    945
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    @coler123 : Wow, a real beauty! Hope to see more of this in these forums soon! What kind of game is this? If it's something like Odin's Sphere (reminds me of it) I'm totally sold!

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Check for combinations in a 6 number integer
    By nixondid911 in forum Fusion 2.5
    Replies: 0
    Last Post: 23rd January 2017, 07:32 PM
  2. how to check which side the collision occurred
    By unknown99 in forum Fusion 2.5
    Replies: 7
    Last Post: 5th September 2015, 02:09 PM
  3. Faster to run always check distance vs always check collision?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 18th September 2013, 09:28 PM
  4. Check for number in a string
    By Panchos in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd December 2012, 09:44 PM
  5. Easiest way to check collision between two points?
    By Phanto in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 19th August 2011, 02:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •