User Tag List

Results 1 to 6 of 6

Thread: Filling drawn circles

  1. #1
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Filling drawn circles

    I'm building a game at the moment, which sees the player drawing circles, which will then erase anything within those circles.

    Is there any convenient way of doing this without using extensions. I've tried one approach, but it isn't so accurate.

    My method involves checking for an overlap in lines (lines connect points spread as the mouse key is down) and if the user lets go and there is an overlap, long bars come in from each edge and stop when they reach one of the lines/points. This creates a rectangular shape which I can check position in comparison to, but it's really not that accurate (rectangle, rather than the circular shapes that can be drawn).

    Is there any other ways?

  2. #2
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I also apologise for making this thread again. I asked a while back but got no response.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I think you could have bumped your old thread...

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    That was helpful. How exactly does the user draw the circles? Dragging a circle with the mouse? Or drawing it paint style?

  5. #5
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ChrisBurrows View Post
    That was helpful. How exactly does the user draw the circles? Dragging a circle with the mouse? Or drawing it paint style?
    There's ten or so points, which have lines scaled and rotated between them to connect them all. While the user is holding down the mouse key, every few milliseconds, it places one of these down and once the user lets go, they all move back to where they were.

    But the problem is that the player can draw a really wide circle and it will act rectangular, so objects which are clearly outside the circle will be included.

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2009
    Location
    UK
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can't you find the centre point of the circle based on the positions of the 10 or so points, then loop through the objects and delete any that fall within the radius of the circle? Use this:

    Sqr(((A.x - B.x)*(A.x - B.x)) + ((A.x - B.x)*(A.x - B.x)))

    to find the distance between the two points (A being the circle's centre point, B being the current object in the loop. This is completely off the top of my head, although thanks to this article http://www.create-games.com/article.asp?id=1898 for the equation

Similar Threads

  1. Drawing intersecting circles
    By SolarB in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 9th July 2012, 12:05 PM
  2. Drawn to Life
    By LBP08 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th December 2010, 12:32 PM
  3. Filling an array from a listbox
    By Farflame in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 19th June 2009, 03:26 PM
  4. Interact with drawn lines
    By lembi2001 in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 27th April 2008, 01:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •