User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: How can I create an increasing bar counter?

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    721
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question How can I create an increasing bar counter?

    Hey Clickteam,

    I have a puzzle game that needs a horizontal bar counter that at the start of the frame is empty, but fills slowly till it reaches the end of the bar. Once the bar fills completely, the player will lose and have to restart. Thanks Clickers!

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)
    The counter object has bars in it.
    Either horizontal or vertical it can do exactly what you want

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    721
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yo Jeff!

    Thanks. Would, "Every 0.1 seconds" - add 0.01 to counter fill it from left to right slowly?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Hey man
    depends on how you set it up.

    You can specify minimum and maximum value,
    so that, say, you want you time gap to last one minute,
    you can set minimum value to 0 and maximum to 60
    and every 1 second add 1 to the counter.

    If you want a smoother fill effect, however, you'll have to keep in account counter physical width,
    and set a bigger maximum value, i.e. 600 and adding 1 each 1/100 second (this would lasts 10 seconds).
    Because counter can store and handle floating point values, but if I remember well, bar counter can graphically represent only integers!

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    721
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks Guys. I'm going to build it tonight!

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Snail View Post
    How would the counter display a floating point value as a pixel? An alternative method (better in most cases) is to scale an active object as a bar, but it won't scale better than the counter will because it's still only activating pixels on a screen.
    I really meant that bar counters can't represent floating point
    unless my testing/reasoning is completely mistaken!

    Let's say the counter should represent a value of 1.5/10 in a width of 100 pixels,
    there would be enough pixel-room for floating point values (15 pixels would represent a 1.5 value)
    but the counter actually steps from 1 to 2, without intermediate values.

    you can stretch the counter to your will,
    so theoretically, where pixel width > maximum value,
    it could at least try to handle floats, wasn't he so lazy

    example:

    ._pixels: 0--------------------------------------500
    int.float: 1........2........3........4.........5........6


    But with the correct and well balanced recipe, you can equally retrieve a decent smoothness within bar counters

  7. #7
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    721
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hey Snail and Schro,

    I do want a smooth scroll of the counter. Would it be a problem to make a small example? Thanks. Also, whats a floating point?

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Can you tell how much time you want the counter to last, and how would you like its size to be?
    (ex. in 20 seconds, fill a screen of 640 pixels)

    Floating point values are, in short, decimal point values:
    0.12345 = float
    1436.35 = float
    134 = integer

    it seems, at least to my testing, that bar counters, though effectively doing correct math upon them,
    refuses to graphically represent other values than integers

  9. #9
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    721
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Schrodinger,

    It's for that card flipping game that you helped me with. At the start of the game, the counter will start filling. I'm at work currently. I wish I would've timed it. I would say 2 minutes should be enough to match 9 pairs? The counter is 466=x 22=y. I'll test it tonight to get an exact timing and update. Thanks.

    Thanks for the math lesson.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Well, two minutes is a long run for a single counter, in a hypotetical area of 640 pixels
    EDIT >> I was saying "if you can't represent floats" but floats in this case are unappliable, since counter max value is much greater than bar pixel size!

    This means that in 640 pixels you can stuff in, at minimum interval of 1/100 second
    (and if you go at a frame rate of 60 fps, no matter what, they will transform in 1/60 second!)
    about 1 pixel every 11/60 th second

    Following a one - and three counters solution representing two minutes at 60 fps...

    counter.mfa

    if you want smoothness, you'll have to grow in size

Page 1 of 2 1 2 LastLast

Similar Threads

  1. AdMob increasing file size
    By gamer123 in forum Fusion 2.5
    Replies: 3
    Last Post: 11th June 2014, 12:36 PM
  2. Increasing size score example for Dafyd
    By James in forum File Archive
    Replies: 0
    Last Post: 17th September 2007, 08:06 PM
  3. Create object using co-ordinates from a counter?
    By Plutogeezer in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th November 2006, 11:43 AM

Posting Permissions

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