REQUEST: Curves in collission polygons

0 favourites
  • Hello again

    I was wondering if it would be posible to include in future an option of creating curves with the collision polygons?

    I believe this could at some points help to avoid using too many polygons in a sprite and would be especialy good for round objects.

  • Because of processing performances it can make your game nonviable for the most part of users.

  • It would be extremely slow!!

    Even when we were making two AAA-titles, an FPS and a TPS for X360 and PC we used geometry primitives (box and capsule mostly) and polygon collision!

    Because custom collision(splines or curves and accurate 3D-shape collision) would have required too much CPU resources.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, a pkunk. Didn't think I'd see one here!

    Anyway, yeah, it is much easier for CPU to calculate whether a point is within rectangle/triangle rather than polygonal shape. Imagine the CPU has to do thousands of collision checks every tick.

    Best keep it simple.

  • i see...well sorry for the idea then, i guess ill have to avoid round objects ^^;

  • Well, you can still check collisions with round objects. First do the classical and efficient rectangular check - if there is a collision, test again with more advanced criteria, e.g. exclude corners and so on. Not as CPU intensive, because it only checks when there is a collision with the bounding rectangle.

    For example, you'd first do bounding box collisions, THEN (if there is any collision) do per-pixel checks (which is the MOST intensive).

  • It would be great if it was possible to create a collision mask combining multiple primitives, this way more complex forms (like circle) would be possible to some extent.

    Maybe something like this, where you could place, resize and rotate them at will:

    Screen 01

    Screen 02

  • It would be great if it was possible to create a collision mask combining multiple primitives, this way more complex forms (like circle) would be possible to some extent.

    Maybe something like this, where you could place, resize and rotate them at will:

    Screen 01

    Screen 02

    This way you can, simple do a invisible sprite with the same size of the first, pin it on the point position of your main sprite part and check the Family collision ^^

  • This. Multiple shape collision would be a great addition. The problem would be not only handling the multiple collision cases between rectangle, polygon and circle, but too many shapes on a sprite would would drop performance. Still a very welcome feature :D

  • This. Multiple shape collision would be a great addition. The problem would be not only handling the multiple collision cases between rectangle, polygon and circle, but too many shapes on a sprite would would drop performance. Still a very welcome feature :D

    As I said, you can, simple do invisible sprites, then pin them on the point where you want that area checked.

  • As I said, you can, simple do invisible sprites, then pin them on the point where you want that area checked.Yes it's doable to some extent (without circle collision support obviously), but it becomes a nightmare to manage if your sprite has animations. You need to create an entire new system through events to support animating the collisions.

    And kiyoshi, actually you only need to add collision test between circle and polygon, since the other primitives like square and triangle are also polygons. I don't know about performance, but it surely would help cover some shapes uncoverable by a single collision polygon.

  • Rectangles should be treated differently than polygons depending if they're rotated or not. If they aren't you can just do the simple check:

    rect.Left <= other.Right AND

    rect.Top <= other.Bottom AND

    rect.Right >= other.Left AND

    rect.Bottom >= other.Top;

    But if they're rotated the check is much more expensive. That's why rectangles can't be treated as polygons at least at engine side.

  • Animmaniac I love your creature.

  • Gamesalad has a circle collision option. There must be a way to do it. Also it is needed for any top down games with a player and solid walls(like my game Maze Manor ). If the player does not have a circle collision shape it will get stuck facing the wall at what ever angle you touched the wall and will not rotate until you back off the wall. This is a problem say if you walk up to a wall then go to the right the player will walk right while facing up. I've corrected alot of this with placing a specific collision shape on my player, but it still happens at certain angles.

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