I need some advices regarding collisions.

0 favourites
  • 5 posts
  • So, Hi there

    I'm having some troubles with collisions,

    I'm making a platformer game, with semi-randomly generated worlds,

    I said semi, because it just randomly picks premade structures, not make them from scratch.

    So for example,

    let's say some of the premade structures I have is this:

    That is just a .png image.

    I could just edit the collision box, but I would need 12+ collision points,

    and at that point the engine starts telling me that's a bad idea..

    Even more considering I use 10 or 20 of those on a stage.

    How could I set the collisions better/properly?

  • You could just use invisible dummy sprites.

  • I thought that,

    but as I said I'm not making the levels, they are generated randomly,

    how would I know where to put them?

  • Ahhh. I should really be more careful when reading a post Totally missed the randomly generated part.

    The only other idea that comes to mind is to build your structures from smaller geometric primitives. That way, they can all have a default collision mask, and you can attach them based on (multiple) image point location.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you break your collision objects down into basic shapes such as triangles or squares and make them invisible you could run a script at the beginning of the layout to pin each collision area to the correct shape (sorry bout the pseudo script but something like)

    On Start of Layout - Triangle_Object - spawn Triangle_Collision on layer 0 (image point 0)

    For each Triangle

    I don't know if it would be more or less efficient than other methods though as I guess you'd essentially be doubling your objects.

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