User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23

Thread: Do you use flags?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,238
    Mentioned
    85 Post(s)
    Tagged
    0 Thread(s)

    Do you use flags?

    I've never used flags. Probably because I watched one of Snail's videos a few years ago where he drummed it into me not to. My understanding is that it's not worth using flags since they can't do anything that Alterable Values can't already do, but come with several disadvantages (mainly the inability to name them, which makes for messy code that is easy to get lost in down the track).

    But are there some legitimately good uses for them? How/when do you guys use them?

  2. #2
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I'm using flags in my current fan game i am helping a friend make. True you can't name them, but it gives a more variation, and more conditions to work with. I think I've gotten some use out of them, along with alterable values. So I say it's worth to keep the flags in the code.

    The only thing I can see it being messy is that you will eventually forget what the flag does over 5 years. So always make comments inside your script for any major flags you use.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 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)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I mainly use it for things that need to be toggled on or off, or things that require only to be true or false.

    I've attached an example of what I mean in the form of a value toggle between 0 and 1.

    Yes, the hassle of not being able to name them is annoying, but I usually just have a comment where I jot down what each flag is for.
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    780
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    I abuse flags if i have to be honest... The naming thing i can agree about, i usually have a comment that Clearifies but it can be an issue. But in some regards they works so well since you can toggle them and sometimes it's nice to simply have an on and off.

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2015
    Location
    Central Oregon, USA
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NNNNNNNNnnnnope.

    I just use an alt value, 0 or 1. (in some cases, 1 and anything else)

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, i used flags or alt value. With flag, you must coment very well your code. In my code, flag is use for a type of reaction and alt value ou counter is use to make a certain action.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    I use them a lot,
    and generally keep both a txt file and a comment on top of event list,
    writing down what each object flag does

    I've tested in the past and they are imperceptibly faster than alt values, by a really negligible amount ,
    so I use them not for this reason,
    but whenever I don't want "waste" a value for a strictly binary (yes/no) operation
    (I often end up using all "nameable" object values)

    Also use them a lot for making "ELSE"
    even just one of them in a dedicated "engine" object to make all elses inside loops

    imo lacking features that would make them much more friendly and comfortable would be:

    - being nameable
    - being pre-settable
    - dynamically setting/retrieving them by index

    >> Fusion3, hopefully

  8. #8
    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,344
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    I am also using flags alot, probably more than I'm using alterable values. Lately I've also been better at commenting what they do

  9. #9
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,334
    Mentioned
    49 Post(s)
    Tagged
    0 Thread(s)
    I'm a Flag guy too.. I usually use the flags only for the object that needs it too, otherwise you'll get lost. and make sure you name them properly.
    And Like Schrodinger said, a comment at the top of my source with all the flags. so I know after a year what it was used for.

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,238
    Mentioned
    85 Post(s)
    Tagged
    0 Thread(s)
    schrodinger, would you mind elaborating on this?

    Also use them a lot for making "ELSE"
    even just one of them in a dedicated "engine" object to make all elses inside loops

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Flags
    By Angelfox in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th January 2009, 04:48 PM
  2. Help with flags
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 19th June 2008, 11:03 AM
  3. Using flags for my UI
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th April 2008, 09:55 PM
  4. Flags
    By konjak in forum Multimedia Fusion 2 - Technical Support
    Replies: 55
    Last Post: 2nd July 2006, 02:53 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
  •