Collision Shapes Problem

Discussion in 'Technical Discussion' started by Saleh Osama, Mar 13, 2017.

Tags:
  1. Saleh Osama

    Saleh Osama Boxer

    Joined:
    Mar 13, 2017
    Messages:
    1
    Likes Received:
    0
    Hi Guys,
    I'm a new Boxer, I just bought Buildbox 2 days ago,
    and I like it so much,

    but I've a big problem with the Collision Shapes
    The Enemy Elements in my game are Mountains (If he touches Mountains he dies), and the mountains are very winding, so I couldn't cover all its borders with Polygon Shape:
    [​IMG]
    so I had to add an Extra Mini Collision Elements Manually:
    [​IMG]
    and this process took two days!
    (I made the game in 4 hours
    but Adjusting the Collision shapes took 2 days!)
    but that's not the main problem,
    the problem is that I got 'hundreds' of Elements in my project to cover all the Enemy's borders:
    [​IMG]
    and this Hundreds of elements made the game sooo laggy and very very slow, it became totally unplayable game.
    what should I do to fix this?
     
  2. Appymes

    Appymes Avid Boxer

    Joined:
    Nov 11, 2016
    Messages:
    268
    Likes Received:
    59
    Ideally, you should not use as many objects with collisions.

    At the moment Buildbox does not allow collisions by pixels.
     
  3. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Collision shapes don't need to be and shouldn't be exact, just good enough. It's overkill and will kill your performance. It only needs to look good. You could have easily used half a dozen shapes or less if you really wanted to cover the mountain near perfectly (way better than good enough anyway).
     
  4. Astro Games

    Astro Games Avid Boxer

    Joined:
    Nov 15, 2016
    Messages:
    356
    Likes Received:
    190
    You can also slice your rock into few (3-4) separate pieces and create collision shape for each one.
    Link them together and you are done.
    It's good to keep in mind that 7-points restriction during designing process so you'll be able to re-use these slices to build different types of rock, not just one type, if prepared correctly.
     

Share This Page