Touch Screen Drawing

0 favourites
  • 2 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Hello everyone! Not my first post, but it has been years (and I think it was before Construct 2) so hello again :)

    On to business.

    In very simple terms I am trying to create a touch-screen interaction where you can tap between two points and create a direct line, or tap and drag to draw a more complex one. Whichever method you take it should create a single line.

    The purpose of this is to build a path for another sprite to follow with straight lines offering the ability to build up speed and twisty ways allowing the player to avoid obstacles.

    I looked through the FAQ but the only thing that looked promising was checkpoints, but that's pretty fundamentally different.

    So far I've managed to use the On Any Touch Start and On Any Touch End Events to create waypoints, and then the Is In Touch Event to draw a series of points along a traced line BUT I don't know how to (or even if I can) connect them so they look more like a line and less like a bunch of independent points. Then from there how to put them into an array so the player's sprite can follow them in order.

    TL;DR: How can I use the Touch object's Events to draw a line (by tapping or dragging) that a sprite will follow?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I've started looking into the Pathfinding behavior as a solution but I can't find any tutorials on the subject (plenty on Pathfinding for other uses, and a really good one about creating enemies with a line-of-sight behavior, but none about using pathfinding as a railroad.

    I think if I do find some way to accomplish this I will make a tutorial, regardless I'm going to continue chronicling my attempts here. If anyone has any insight please let me know.

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