User Tag List

Results 1 to 9 of 9

Thread: Drawing a line between two points?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,123
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Question Drawing a line between two points?

    I think this should be kind of easy, but I have never done anything like it before. I am trying to have a line from one moving point to another point (the mouse). Preferably without using any extensions. I am thinking of using a pixel and increasing scale on it or something, but it cant go past the the two points.. This is exactly what I am looking for: http://www.youtube.com/watch?v=kbGV6yqoIkA (The line between the player boat and the mouse curstor)

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,329
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Here's a basic example for you.
    This approach works best using Direct3D.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,123
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Thanks Popcorn How come it works best in Direct3D though? I am developing for all platforms (flash, ios, android and so on) so I need it to work on them all

  4. #4
    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,304
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    The reason is that scaling is a lot faster in HWA, as far as I know. Flash doesn't have HWA, but it's still probably faster than using the Surface object in Flash, and the Surface object isn't available for all runtimes (just EXE and Flash).

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    tompa's Avatar
    Join Date
    Nov 2011
    Location
    Uppsala, Sweden
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks popcorn.


    Here's the same example with cross-platform support.
    Attached files Attached files

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,123
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Nice thanks!

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,329
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    @Outcast: You're welcome

    @Happygreenfrog It is not the speed that is an issue here, but the sloppyness of the line. It isn't smooth in the other runtimes.

    @Tompa: That example is exactly the same, but with a more complicated expression. It is not the Clickteam Movement Controller that screws things up. It doesn't change the fact that the line will seem sloppy on all runtimes exept the hardware accelerated ones.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    tompa's Avatar
    Join Date
    Nov 2011
    Location
    Uppsala, Sweden
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @popcorn: aa you're right, the ct controller worked in android, flash and ios.. pretty much cross-platform already then ^^.. I still suggest avoiding extensions whenever possible and this is a way how. I have lost weeks of debugging problems from extensions. Lines get antialiased bad in nonhardware acceleration? that's good to know *honest*. I have encountered strange interpolation artifacts in scaling on similar devices, looks like they use the "nearest neighbor" interpolation from Photoshop.

  9. #9
    Clicker Multimedia Fusion 2iOS Export ModuleSWF Export ModuleUnicode Add-on
    marat's Avatar
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you know how to fix these objects. I want something like this: from dot to dot connect a figure

Similar Threads

  1. Creating a line between two active points
    By Apex in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 25th November 2011, 06:21 PM
  2. Drawing a line from A to B
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th May 2010, 10:36 PM
  3. Line drawing
    By Sigvatr in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 28th April 2008, 01:50 PM
  4. Drawing line.
    By Roseweave in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th March 2008, 10:16 PM
  5. drawing a line
    By delusan in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 8th June 2007, 06:26 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
  •