help needed with C2 programming

0 favourites
  • 1 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I posted this problem in the forum but haven't had any responses so far. I am willing to pay a little for some help, or I'm kinda stalled and frustrated.

    Note: I am new to Construct and game dev in general, so excuse any bad descriptions:

    ---

    I want the user to draw lines on the screen by swiping. A general up or down draws a vertical line, a horizontal swipe draws a horizontal line.

    These are the two major problems I'm having:

    1) The lines do not stop accurately when colliding - especially after hitting the "speed button". The lines often overlap the other lines (which will not work in my game. They must end exactly on the line they collide with since I need those specific points to calculate the different areas of the rectangles created)

    2) The user cannot draw mulitple lines at the same time (the user should be able to draw at least a second line while the first line is still being drawn, but currently the first line stops when the second one is started)

    CapX file is here:

    dropbox.com/s/i8p5b41or8v8ytx/Drawing-Line-Issue.capx

    ---

    Part 2:

    I need a way to calculate when sprites are boxed in by the lines.

    ie. if the user drew 4 lines (4 sides of a box) I'd need to know the area of the box and what sprites were in it. Then, if the user drew another line through that box it would divide it into 2 boxes. I would then need to know the area of both boxes and what sprites were in each of them.

    I was going to find the area of each boxed in square by noting the locations of the ends of the intersecting lines. (but since the ends of the lines are often over the lines, it makes for a very inaccurate measurement).

    So, in a nutshell, I need a way to draw the lines more accurately, AND, calculate when an area has been "boxed in" and what sprites are in the boxed in area?

    ---

    If anyone wants to tackle this, please reply or email me with a quote: mhouston (at) gmail (you know the rest ;o)

    thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)