0 Favourites

How do I get an input from a drawing a shape?

  • Hey, so I want to make a game where you would draw something like a circle (predetermined shape) and then have a txt say something.

    I've seen a couple of games where you have to draw shapes to destroy different enemies on screen and I never have been able to recreate a game like this...

    I would try and set a sprite every tick or so when you are holding the mouse button, and I would have another sprite over witch I would draw the shape and check if it would not collide with it, but I want it to recognize these shapes where ever they would be drawn...

    Do you guys have any idea how to do this?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • There is a gesture recognizer plugin from Pode. Maybe that's what your looking for.

    viewtopic.php?t=66773

    Example:

    https://dl.dropboxusercontent.com/u/141 ... index.html

  • There is a gesture recognizer plugin from Pode. Maybe that's what your looking for.

    viewtopic.php?t=66773

    Example:

    https://dl.dropboxusercontent.com/u/141 ... index.html

    Yes, awesome!

    Thanks Asmodean!

  • There is a gesture recognizer plugin from Pode. Maybe that's what your looking for.

    viewtopic.php?t=66773

    Example:

    https://dl.dropboxusercontent.com/u/141 ... index.html

    Actually, it's having trouble finding custom shapes (Even simple ones like 1/2 circle...)

  • I can't really help. I never used the plugin for real.

    You have to use forms that really distinguish from another, otherwise there too many overlaps. If I added an half circle it's mostly recognize as v or square bracket.

    You have to delete the forms that are similar to the form you want to recognize.

    Look at the capx and read the thread.

  • I can't really help. I never used the plugin for real.

    You have to use forms that really distinguish from another, otherwise there too many overlaps. If I added an half circle it's mostly recognize as v or square bracket.

    You have to delete the forms that are similar to the form you want to recognize.

    Look at the capx and read the thread.

    Oh... I was hoping to have quite a bit of similar shapes...

  • Oh... I was hoping to have quite a bit of similar shapes...

    That would be a bad idea, whatever how precise the recognition is.

    That would frustrate player/user, because you have to be very exact in your gesture.

  • >

    > Oh... I was hoping to have quite a bit of similar shapes...

    >

    That would be a bad idea, whatever how precise the recognition is.

    That would frustrate player/user, because you have to be very exact in your gesture.

    I meant as in 3/4 circle 1/2 circle 1/4 circle and full circle for example...

  • I don't know what you want to achieve with the gestures. It would be the best you test it yourself. Maybe it works.

    If you use this example from Pode:

    http://dl.dropbox.com/u/1412774/oneStro ... nDemo.capx

    Use the 'Delete all defined gestures' action in the 'on Start of Layout' event to delete all gestures.

    Now you can define your own gestures. On the first gesture you will get a javascript error, but I think it's normal, because the plugin tried to recognize the gesture, but there is none. Click on Ok to hide the javascript-error and type a name for your gesture at:'Add stroke example to custom type and Add the gesture-name.

    If you now try our own gesture it should be recognized.

    Add your other gestures and look if you are satisfied with the result.

    Pode is still active here, If you have questions about his plugin you could ask him directly.

  • I don't know what you want to achieve with the gestures. It would be the best you test it yourself. Maybe it works.

    If you use this example from Pode:

    http://dl.dropbox.com/u/1412774/oneStro ... nDemo.capx

    Use the 'Delete all defined gestures' action in the 'on Start of Layout' event to delete all gestures.

    Now you can define your own gestures. On the first gesture you will get a javascript error, but I think it's normal, because the plugin tried to recognize the gesture, but there is none. Click on Ok to hide the javascript-error and type a name for your gesture at:'Add stroke example to custom type and Add the gesture-name.

    If you now try our own gesture it should be recognized.

    Add your other gestures and look if you are satisfied with the result.

    Pode is still active here, If you have questions about his plugin you could ask him directly.

    Ok, I'll try it like you said.

    Thanks for the help!

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