vinigames's Forum Posts

  • 3 posts
  • Thanks a lot R0J0hound and

    Polygon is interesting for what I'm doing. As R0J0hound suggested will have to work in JavaScript or underlying layers. With Polygon plugin, I must be able to achieve what I intend to do.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is nothing in place to help with that. With the physics behavior the shapes need to be defined in the editor before the game is run. You could use the canvas or paster plugins to draw the object though.

    One idea could be to build the shapes out of a bunch of simpler objects and join them together with joints, but that does have some issues. Namely objects joined together with joints behave a bit spongy.

    A better solution is to work with the physics engine at a lower level using javascript, although you can't really do this along with the physics behavior. More on this in a moment.

    The basic flow of your game would be to:

    1. when you draw the shape a list of points is made.

    2. Those points make up a polygon. This needs to be converted to a list of triangles or at least convex polygons. This is mainly for the physics engines which generally don't work with concave polygons.

    3. find the center of mass by averaging the point locations.

    4. create the physics object with that shape.

    That may vary depending on what a given physics engine does for you.

    Here's one possible example of using javascript to access a physics engine instead of using the behavior:

    https://dl.dropboxusercontent.com/u/542 ... ysics.capx

    On another note you did say simple objects. You probably could use some gesture recognition to see if the object is close to a circle, square or triangle. Then add a sprite with that shape and size and orient it to approximately match the area drawn. The gesture recognition is something a plugin may be able to help you with, or maybe even some other capx on the forum.

    Thanks a lot.

    Yes shapes are basic (Circle, Rectangle, Triangle or upto 5 faces max).

    Since, shapes has to be defined, is it possible that through canvas or paster, player defines a shape. There will be start button, then once player presses it, those shapes will be given physics behavior. Then some simulation happens. Can this be done ??

  • Hi guys, Am complete beginner to construct 2. I want to develop a platform game where players will draw objetcs (basic shapes) and physics will be applied to it.

    I found similar drawing and physics game: "http://armorgames.com/play/4673/test-pilot".

    If anyone can tell where to get started and is it possible in construct 2 or not, it'll be great.

    Thanks

  • 3 posts