Guess Polygon Shape during Runtime

0 favourites
  • 7 posts
From the Asset Store
Word Guess
$10 USD
Questions and answers are stored in simple txt-files. Cool animation of everything
  • Hi,

    is there any way to do this?

    Many thanks :)

  • Hello!

    I have the same problem. I need to know if there's a way to do this.

    Thank you.

  • What is the problem exactly?

    You'd like to guess a polygon during runtime.

    Do you mean a collision polygon?

    How should the polygon be guessed?

    Why should it be guessed during runtime?

    After it's been guessed what would you like to do with the polygon?

    Some more information about the question will make answering it a lot easier.

  • Hi again!

    Thanks for your answer.

    You know the option we have inside the sprite editor in C2 that says "Guess polygon shape" and then he creates a collision polygon trying to adequate it to the shape of the picture? I'd like to know if there's a way to call this as an action in an event, more accurately as an action of the "On image URL loaded" event.

    A have a bank of images in the game which the user will only see as miniatures, and then he can choose which ones he would like to add to the scene, and then those will appear bigger and with better resolution. The problem is that the bank is very large, there's a ton of pictures, and so far I'm caught between 2 choices:

    1) Putting all of these pictures along with the project. That will cause it to be very heavy, and as the internet here is very poor in speed, it'll be bad for the people trying to play it and bad for our product as well.

    2) Loading only the images that the user chooses during runtime. But as the pictures will interact with each other I can't afford to have the collision set to the sprite bounding box, as the images have all sorts of different shapes. If I could apply the "Guess polygon shape" right after loading it, that would solve it because when I do it manually in C2 it ignores the transparency around the image quite well.

    Thank you for your time.

    Cheers!

  • edgaredgar

    Have you considered using separate sprite object(s) specifically for collision? Each potential collision polygon would need to be programed in, but it would give you more flexibility without a huge file size increase.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank yout for reply, but are many objects, I needed something more practical.

  • Long time this thread is on, but any solution came across with the latest updates?

    The aim is to destroy only parts of an object, and leave a transparent area (maybe after being hit by a bullet)

    For the variant of using the canvas addon, currently I could not figure out how I could delete an area of a graphic via "mask" of the bullet explosion.

    Any ideas welcome

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