[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.
  • thehen

    Neat!

    Hmmm are you talking about that one? http://www.scirra.com/forum/plugin-polygon-update-20130423_topic62075_post381179.html#381179

    If you do, I did mentionned in this post that there were a scary error message when you start the preview, but it works anyway.

    The scary message comes from the fact that on start, since your polygon object is empty, it has no collision polygon. And Ash throw an assertion error for that. Because it seems, the physics behavior requires to be initialized with a valid collision polygon when the game start.

    Anyway, as scary as the message looks, assertion are disabled on export, and it doesn't look like it makes the physics behavior bugs.

    Sooooo...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yann that makes a lot of sense, awesome thanks :D

  • Just wanted to say thanks for this plugin. I'm using it in my game SR:OPS (topic here) to create the flashlight. I wanted dynamic lighting, but couldn't get a decent frame rate with the Canvas plugin on a large layout, so I ended up using a ray-casting-like technique to find the vertex position, and then drawing the poly using that data. Since I'm only clearing/drawing on change it has helped a ton!

  • thatjoshguy

    Heh nice you're welcome (:

    You probably already thought about this but as a nice mecanism, having to walk slowly/silently (maybe holding shift) when you are just behind an enemy to avoid being "heard" could be a nice addition (:

    Also you should probably resize your text object, it seems some words get clipped

    Like

    "Move: Arrow Keys or ..." in the menu

    and

    "End of..." at the end

    And I didn't understand at first that if the enemies where to close to me in alerted mode I would automagically lose. I think they should just shot you dead (: So something like

    ->move to player
    if between such and such range
       -> stop and shot

    and

    if lose line of sight 
       -> go to last known position

    But nice start overall and the light effect is neat indeed (:

  • Yann

    You probably already thought about this but as a nice mecanism, having to walk slowly/silently (maybe holding shift) when you are just behind an enemy to avoid being "heard" could be a nice addition (:

    Thanks for the feedback! I'm actually doing this in reverse. You walk by default, which is quieter. If you hold shift you can sprint, which will allow you to out-run the guards, but you're a lot louder so you'll end up alerting more guards if you're not careful.

    Also you should probably resize your text object, it seems some words get clipped

    What browser/text size/zoom level are you using? Can you post a screencap in my thread? I haven't seen this behavior myself, but good to know!

    And I didn't understand at first that if the enemies where to close to me in alerted mode I would automagically lose. I think they should just shot you dead (:

    Guard AI is still in the works :)

    Thanks again for all the feedback!

  • Thanks this plugin is great. I did a test and it can only handle me drawing 60 4-sided polygons every frame before it starts slowing down, is that normal? Is that because normally the GPU would be handling polygons or something?

  • It's not drawn by the GPU, it's drawn by a off-DOM canvas2D element and then the resulting texture is sent to the GPU to texture the object's polygon.

    So you still get as fast as the Canvas2D is.

    I warned you in the first post that's why my 3D test is so slow (:

    But you should be able to draw one polygon and move/scale/rotate it with C2's set position/size/angle function without triggering any redraw of the polygon itself.

    You only ever redraw the polygon texture when the vertices are modified.

    So unless you're modifying the vertices of your 60 polygons every frame, it shouldn't be too slow.

  • Thank's, yeah that's a good note.

  • Yann I was wondering whether your Split Poly demo would work combined with the Physics Demo?

    So say, having a physics square and being able to split that into two two physics polys.

    We're starting work on the ice world for Mortar Melon, and an awesome mechanic would be to slice ice blocks into angles to bounce off :)

  • thehen

    For now, I see no reason why it shouldn't work.

    An easy way to test that would be to just create instances of polygons with physic behavior and with random set of vertices (for example on a touch event) and see if they interact properly with the environment.

    Once you made sure of that, you can safely implement the splitting and integrate everything in your game.

    Edit: I just checked my old demo, you can just modify that to create new instances and check various interactions to see if a bouncing melon bounces well enough etc.

    Because in the end, what the splitting does is deleting the current polygon et creating two new ones. It's a more deterministic version of the physics demo (:

  • Yann awesome I'll have a whizz at getting this working when I've got some R&D time. Thanks again for the awesome plugin :)

  • Is it possible to exempt a side from being drawn?

    -Trav

  • travhoang1991

    nope

  • Yann, it's so perfect, thank you!!! Also, did you noticed your nick in my last game, on credits? Just check it out =]

    This plugin make possible to slice things with lasers, muahahhahaha =]

    And most important, make possible to draw Concrete Profiles for Civil Engineering softwares!

  • Yann ur plugin is great man

    but can i create shapes using ur plugin and the drawing canvas like this game

    mousecity.com/games/physics/drawfender

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