[PLUGIN] Polygon (update 2013-04-23)

0 favourites
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • anyone have the plugin?

  • Too much traffic eh :/

    Here studioplay

    Wisdoms

  • Katala Thank you so much for uploading it ;D

  • Katala thanks... It seems I'm victim of my sucess v_v

  • It's okay, we know you might be busy

    Also why don't you try to upload attachements instead of dropbox?

    Great plugin :)

  • Wisdoms > convenience (like arranging various links inside the post for clarity) and habits =)

    And to solve the problem I would have to go through most of my post and convert the links to attachement... And as you said, I'm kind of laz... busy

  • you are brilliant Yann, your plugin is fantastic .. I am also game developer construct 2 years and a few months ago I seek a way to create a game of origami, I needed to have folds in sprites to simulate folded paper ... I think that with this plugin I can? if someone could please show here ...

  • Yann your Polytrail.capx gave me an error at one point, it said it went beyond the maximum texture size of 2048x2048px.

    Really i think drawing polygons should be a basic thing built in every game engine, it's quite pathetic it's not built into Construct 2.

    And this plugin is not drawing real polygons, it's using large textures to draw on with Canvas, I mean come on Scirra is it too much to ask to draw real polygons like the ones in Quake 15-years ago????

  • Any hope to see the "cutable" polygon capx?

  • Thanks yann

  • I know I'm late to the party, but is there a way to only get the 'outer' vertices of a set of points to build the polygon, so that the polygon always encompasses all the points? I have a game with multiple objects (~20) that I need to encompass at any time.

    Edit: And while I'm at it - is it possible to give the polygon a margin? For example to leave a distance of 10px between each of the positions given and the corresponding polygon vertices (away from the center).

  • Hi all, I need some help making an adjustment to this plugin but I'm not sure if Yann is around anymore

    I'm trying to get rid of the anti-aliasing-like smoothing that polygons draw with. I need jagged pixel outlines, (the equivalent of 'point' sampling rather than linear sampling)

    I was looking through polygons runtime.js and it's a lot more complex than I thought. Started tinkering with it but idk what I'm really doing.

    some (maybe?) important lines:

    line 269 has a mention of linear sampling when in webgl mode, I set this to pointSampling, and it had no effect.

    line 770 is the 'draw polygon' action.

    My hunch is that I should add a line that changes a setting, I found this:

    ctx.imageSmoothingEnabled = value;

    from here: https://developer.mozilla.org/en/docs/W ... ingEnabled

    and I tried adding it in a few places, but I think it's only for canvas2d rather than webgl, so it had no effect.

    Any ideas or pointers?

    thanks

  • keepee

    Yeah I'm still roaming around sometimes like an old ghost.

    Well... These days I'm not "constructing" that much, I'm more into unity, and I've became proficient enough to feel quite limited when I try something on construct :D...

    That being said, if I remember correctly and after having reread a bit of the plugin, I'm actually drawing the polygon in a 2D (non webgl) canvas and then using the resulting texture on a WebGL quad.

    And according to that StackOverflow answer there's nothing to control the aliasing, you'd have to write things pixels by pixels using some aliasing algorithms (I used one once for grid based line of sight...)

    So well... you'd have to either tweak the plugin to just do that, or find a way to draw polygons directly with gl calls (probably sending the vertices composing the polygon on the gpu directly, and since it only accepts triangles, as far as I remember, you would also need a triangulation algorithm... there's one in the box2D/physics plugin I think, for collisions... but yeah it would be a lot of work and I don't remember what C2 is exposing to help you on that... And that's why I choosed the easy road)

    And even with that, I'm not sure where C2 activate or deactivate antialiasing for WebGL if it ever does it (I think it does when you choose point sampling... yeah long time no C2 :D)

    So yeah, no easy answer on that one, sorry...

  • Yann welcome back my boy long time no see

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Yann I know you aren´t as active around here nowadays, but I´ve been using a program outside C2 called Metaplot and was wondering if your plugin could be capable of loading vector shapes made with it, as it exports .json but just in a different syntax.

    (Apart from vertex, Metaplot draws lines and is capable of inserting metadata to differ parts of the drawing)

    Thanks in advance

    Edit: Added a comparison between the plugin´s export syntax and Metaplot´s

    Polygon plugin:

    {"c2polygon":true,"vertexCount":4,"vertices":[[15,-15],[-15,-15],[-15,15],[15,15]]}

    Metaplot .json:

    {

    "verts": [ {"x": -30.000000, "y": -40.000000, "hasMeta": false, "metaIndex": 0}, {"x": -30.000000, "y": 30.000000, "hasMeta": false, "metaIndex": 0}, {"x": 40.000000, "y": 30.000000, "hasMeta": false, "metaIndex": 0}, {"x": 40.000000, "y": -40.000000, "hasMeta": false, "metaIndex": 0} ],

    "lines": [ {"idx1": 0, "idx2": 1, "hasMeta": false, "metaIndex": 0}, {"idx1": 1, "idx2": 2, "hasMeta": false, "metaIndex": 0}, {"idx1": 2, "idx2": 3, "hasMeta": false, "metaIndex": 0}, {"idx1": 3, "idx2": 0, "hasMeta": false, "metaIndex": 0} ],

    "metas": [ ]

    }

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