Share My Creation Animated GIF overlay (Fly overlay)

Discussion in 'Share Your Creations' started by JordiCP, Dec 20, 2015.

  1. JordiCP

    JordiCP Well-Known Member Licensed User

    Update: new version on Google Play with configurable parameters and different gifs to choose from. Changed thread and app name

    --- UPDATED Version 1.2: (will take a while for Google Play to update the version) Now you can throw them onto the screen limits so that they will bounce and buzz :D ----


    Hi all,

    This is one of those apps made in a few hours after a silly idea. Just for entertainment, or to prank your friends. Also, it will be the base for some new ideas that have come to my mind

    I must confess that I have spent more time studying how to get realistic fly movements than coding :D:D Now I am a fly expert, ask me anything :)

    Just test it please, report your fly experience if there are any issues, and rate it if you find it fun.:)
     

    Attached Files:

    Last edited: Jan 4, 2016
  2. LucaMs

    LucaMs Expert Licensed User

    I can fly, but I'm afraid of heights, what can I do?
    :D


    Do not answer: "fly low", because I'm afraid even to slam :p
     
    Beja and JordiCP like this.
  3. LucaMs

    LucaMs Expert Licensed User

    This will be your most downloaded app!
     
    Daniel-White and JordiCP like this.
  4. Douglas Farias

    Douglas Farias Expert Licensed User

  5. Beja

    Beja Expert Licensed User

    Fly over plain lands.
     
    LucaMs and JordiCP like this.
  6. freedom2000

    freedom2000 Well-Known Member Licensed User

    I gave you five stars !

    You should detect collisions between flies :D
     
    JordiCP likes this.
  7. Douglas Farias

    Douglas Farias Expert Licensed User

    i see this app with 1m downloads +
     
    Last edited: Dec 22, 2015
    JordiCP likes this.
  8. LucaMs

    LucaMs Expert Licensed User

    Me too :).

    It is perfect on my phone, on my tablet flies are small (I will increase the size of at least 50%).

    There is a similar app which is a game; you can crush ants: 100,000,000-500,000,000 downloads!!! Do the same ;)
     
    JordiCP likes this.
  9. JordiCP

    JordiCP Well-Known Member Licensed User

    Thanks for the comments, I am already happy with them (although 1m downloads would make me for sure happier)

    Now working in making the flies throwable to the screen borders with rapid dragging and adding some bzzzzzzzzzz sounds :D
     
  10. RAJAN MBA

    RAJAN MBA Member Licensed User

    @JordiCP
    Could you explain how you programmed it?
    Thanks in advance.
     
  11. JordiCP

    JordiCP Well-Known Member Licensed User

    Hi Rajan

    Well, there are two very different parts to consider:

    • The first is the images management logic: to understand it, you can consider as if we were doing it in a normal activity. The basics are:
      • create an initialize an array of a custom type for each fly(object) where you store a reference to the view, the bitmap, position, direction and "speed". Rotation will be based on direction.
      • Then, there is a regular interval timer in which I modify randomly the direction, based in the previous one, giving the highest probability to keep going in the same direction and low priorities to change a bit to the left or a bit to the right.
      • Based on the new direction, calculate displacement and rotation, and update them on the view
      • As views can detect gestures, actions can be associated to them. For instance, if there is a drag, view position is updated. If it is fast enough, for a limited time you can give more speed to it (doubling the timer frequency and step length, for instance).
    • Then there is the overlay "magic"
      • Instead of an activity and Imageviews, I wrapped a code I saw for ChatHeads here, thanks to a post in this forum
      • They don't need to belong to any activity and can be attached directly to the system's window manager from a service.
      • Then I modified the behaviour for this special purpose
      • Everything with B4A and Inline Java ;)


    I plan to share the code of the chathead wrapping (not the modifications to turn them into flies) in some days, possibly after new year :)
     
  12. freedom2000

    freedom2000 Well-Known Member Licensed User

    the overlay magic is ... magical :)
     
    JordiCP likes this.
  13. RAJAN MBA

    RAJAN MBA Member Licensed User

    Thank you for detailed explanation. Appreciate the Github link :)
     
  14. DonManfred

    DonManfred Expert Licensed User

    Really nice one. Funny :D
     
    JordiCP likes this.
  15. hookshy

    hookshy Well-Known Member Licensed User

    Realy great ..just wait to show it to my kid
    5 star from me
     
    JordiCP likes this.
  16. JordiCP

    JordiCP Well-Known Member Licensed User

    New version on Google Play, not only flies, you can overlay other animated items and configure parameters :)
     
  17. Beja

    Beja Expert Licensed User

    I saw the video.. you made it so realistic that I wanted to throw up. The app is so great but in some cultures flies
    and cockroaches are disgusting insects.. I hope you consider ants as well.
     
    JordiCP likes this.
  18. JordiCP

    JordiCP Well-Known Member Licensed User

    Thanks Beja!

    With the current version you can choose different elements. Will consider ants if I find some :)


    My concern now is to find good transparent gifs which I can use for commercial projects. There are many in the web, but some have poor quality whilst in others there is not enough info to be sure that I can use them without running into problems.
     
  19. sorex

    sorex Expert Licensed User

    hey Jordi,

    what's the difference between this method and a live wall paper ?
     
  20. JordiCP

    JordiCP Well-Known Member Licensed User

    Hi sorex!

    With this method the elements are on top of the other apps, not only when you are at your homescreen

    About utility, as you can see, near to none :D. For me it makes sense when used as a chathead (pending to release the code for this)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice