User Tag List

Results 1 to 6 of 6

Thread: LoS in Flash

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LoS in Flash

    Currently, what is the best way to determine if an enemy can see the player, in a flash-friendly way. I'd do it with fastloops normally moving a detector object and if it hits an obstacle, stop the loop, if the loop reaches an end, fire a bullet.

    Overall I want my enemies to shoot when the player is in their LoS. And I don't want flash to lag. Solution?

    Thanks!
    -Eliyahu

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LoS in Flash

    You have a few options...

    Rotating/Scaling active (Slowdown! oh noez!)
    Fastlooping as mentioned (Slowdown! oh noez! can be reduced with bigger step and spaced test time (eg 8 px line every second rather than every frame)
    Shooting an object in realtime (Slow reaction! oh noez! but no slowdown...)

    Custom extension?

  3. #3
    No Products Registered

    Join Date
    Oct 2009
    Posts
    506
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LoS in Flash

    Hi rickyRambo I also am having trouble with a line of sight flash friendly.

    I choose to use the LOS widget, it works fine within the mfa, however i believe using this within flash has caused slowdown.

    Altough i do not see why it would be?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LoS in Flash

    Willow I'm working on an LOS extension that will work with tile-based maps. It will check for collisions on the tiles, and that is all. So as long as you don't need to be able to test looking through actives and such with funky shapes, and moving objects, it'll work.

    PM me if you're interested in this.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LoS in Flash

    I was messing around with a stealth game. The two ways I kinda did it was.

    Have a LOS active thats invisable by follows the baddie around. I did have some weird things happen though.

    Secondly i had the baddie shooting a invisable object every second. That worked better, although still not perfect.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LoS in Flash

    My solution was to make an extension that does this:

    http://www.thenumbersplace.net/losTest.html

    Arrows move the black dot, the string tells you if there is a clear path from your mouse to the black dot. The extension can take different tilesizes, different step sizes for the testing (my example is set to 1, but it could be set to 5 pixels for example if precision is only necessary to that degree) and you can just set if a tile is an obstacle or not.

    The only condition is, Is Path Clear from (x1,y1) to (x2,y2)?

    If you want to beta test it or something, PM me.

Similar Threads

  1. Flash Files and flash replacements for the unfinished surface object
    By Ethan in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 17th June 2013, 09:34 PM
  2. Which version of Flash does Flash exporter use for Mochimedia?
    By brett in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 10th May 2013, 10:47 PM
  3. Flash Player Object - Open Url: Only works with buttons on flash portals
    By Matriax in forum SWF/Flash Export Module Version 2.0
    Replies: 9
    Last Post: 6th January 2013, 08:51 AM
  4. Differences between Flash Player / Flash Url object and button options
    By Matriax in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 2nd January 2013, 10:09 PM
  5. Exported flash file doesn't open in a Flash loader
    By Boba Fonts in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 2nd January 2011, 05: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
  •