[VB.NET] Flappy Bird - By Jacob Roman-VBForums
Results 1 to 14 of 14

Thread: [VB.NET] Flappy Bird - By Jacob Roman

  1. #1

    Thread Starter
    The DirectXpert Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,165

    [VB.NET] Flappy Bird - By Jacob Roman

    Oh come on who didnt see this coming. I remade Flappy Bird from scratch based on the famous Android / iPhone app that got removed from the app store. It has realistic physics, very accurate collision detection, and the game is highly configurable from the menu. It even uses DirectX. The only thing that is missing is a title screen and a high score, which I plan to put in, in due time. So there will soon be an update. In the mean time, enjoy.


    ...Its not crack!!!
    Attached Images Attached Images  
    Attached Files Attached Files

  2. #2

    Thread Starter
    The DirectXpert Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,165

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    Also note that this is currently in its beta stages. I found a glitch tonight, which is an easy fix. Its just with the menus after fiddling with the physics and pipes, and when you goto Set Defaults, it wont erase the checks. Thats cause I completely forgot to put the code in to erase the checks. So to fix it, just replace the Set_Default_Settings sub with this code:

    vb.net Code:
    1. Public Sub Set_Default_Settings()
    2.         Collision_Disabled = False
    3.         frmMain.mnuNoCollision.Checked = Collision_Disabled
    4.  
    5.         Scalar = 150
    6.         frmMain.mnuScalar50.Checked = False
    7.         frmMain.mnuScalar100.Checked = False
    8.         frmMain.mnuScalar150.Checked = True
    9.         frmMain.mnuScalar200.Checked = False
    10.  
    11.         Flap_Velocity = -3.5
    12.         frmMain.mnuFlapVelocity1.Checked = False
    13.         frmMain.mnuFlapVelocity15.Checked = False
    14.         frmMain.mnuFlapVelocity2.Checked = False
    15.         frmMain.mnuFlapVelocity25.Checked = False
    16.         frmMain.mnuFlapVelocity3.Checked = False
    17.         frmMain.mnuFlapVelocity35.Checked = True
    18.         frmMain.mnuFlapVelocity4.Checked = False
    19.         frmMain.mnuFlapVelocity45.Checked = False
    20.         frmMain.mnuFlapVelocity5.Checked = False
    21.  
    22.         GAME_SPEED = 3
    23.         frmMain.mnuGameSpeed1.Checked = False
    24.         frmMain.mnuGameSpeed2.Checked = False
    25.         frmMain.mnuGameSpeed3.Checked = True
    26.         frmMain.mnuGameSpeed4.Checked = False
    27.         frmMain.mnuGameSpeed5.Checked = False
    28.  
    29.         GAP_X = 250
    30.         frmMain.mnuGapDistance150.Checked = False
    31.         frmMain.mnuGapDistance200.Checked = False
    32.         frmMain.mnuGapDistance250.Checked = True
    33.         frmMain.mnuGapDistance300.Checked = False
    34.  
    35.         GAP_Y = 175
    36.         frmMain.mnuMouthGap100.Checked = False
    37.         frmMain.mnuMouthGap125.Checked = False
    38.         frmMain.mnuMouthGap150.Checked = False
    39.         frmMain.mnuMouthGap175.Checked = True
    40.         frmMain.mnuMouthGap200.Checked = False
    41.         frmMain.mnuMouthGap225.Checked = False
    42.  
    43.         Gravity = clsPhysics.EARTH_GRAVITY
    44.         frmMain.mnuGravityEarth.Checked = True
    45.         frmMain.mnuGravityMoon.Checked = False
    46.         frmMain.mnuGravity0.Checked = False
    47.         frmMain.mnuGravity05.Checked = False
    48.         frmMain.mnuGravity1.Checked = False
    49.         frmMain.mnuGravity15.Checked = False
    50.         frmMain.mnuGravity2.Checked = False
    51.         frmMain.mnuGravity25.Checked = False
    52.         frmMain.mnuGravity3.Checked = False
    53.         frmMain.mnuGravity35.Checked = False
    54.         frmMain.mnuGravity4.Checked = False
    55.         frmMain.mnuGravity45.Checked = False
    56.         frmMain.mnuGravity5.Checked = False
    57.         frmMain.mnuGravity55.Checked = False
    58.         frmMain.mnuGravity6.Checked = False
    59.         frmMain.mnuGravity65.Checked = False
    60.         frmMain.mnuGravity7.Checked = False
    61.         frmMain.mnuGravity75.Checked = False
    62.         frmMain.mnuGravity8.Checked = False
    63.         frmMain.mnuGravity85.Checked = False
    64.         frmMain.mnuGravity9.Checked = False
    65.     End Sub

    Also if you are frustrated getting through the pipes, the games easier with the flap velocity set at 3. Its currently 3.5

  3. #3
    Hyperactive Member Arve K.'s Avatar
    Join Date
    Sep 2008
    Location
    Kyrksæterøra, Norway
    Posts
    423

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    Can't even get past the first pipe!!
    Arve K.

    Please mark your thread as resolved and add reputation to those who helped you solve your problem
    Disclaimer: I am not a professional programmer

  4. #4

    Thread Starter
    The DirectXpert Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,165

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    For those getting transparency issues such as dclamp that look like this:



    You quite possibly have an older DirectX installed. I managed to have the game working perfectly on a generic computer at college that had no DirectX at all by simply installing the DX runtime. So if you have this issue, follow these simple steps:

    Download the offline DirectX Runtime:
    http://www.microsoft.com/en-us/downl...s.aspx?id=8109

    Next extract it into a temperary folder, and run DXSETUP.exe to install it, and boom, the game will work.

  5. #5
    Registered User
    Join Date
    Mar 2014
    Posts
    1

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    it look like the mario the popular one..

  6. #6
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,159

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    Something that I noticed in your code that's pretty basic is all your MenuItem clicks. You could shrink this:
    Code:
        Private Sub mnuMouthGap100_Click(sender As Object, e As EventArgs) Handles mnuMouthGap100.Click
            GAP_Y = 100
            mnuMouthGap100.Checked = True
            mnuMouthGap125.Checked = False
            mnuMouthGap150.Checked = False
            mnuMouthGap175.Checked = False
            mnuMouthGap200.Checked = False
            mnuMouthGap225.Checked = False
        End Sub
    
        Private Sub mnuMouthGap125_Click(sender As Object, e As EventArgs) Handles mnuMouthGap125.Click
            GAP_Y = 125
            mnuMouthGap100.Checked = False
            mnuMouthGap125.Checked = True
            mnuMouthGap150.Checked = False
            mnuMouthGap175.Checked = False
            mnuMouthGap200.Checked = False
            mnuMouthGap225.Checked = False
        End Sub
    
        Private Sub mnuMouthGap150_Click(sender As Object, e As EventArgs) Handles mnuMouthGap150.Click
            GAP_Y = 150
            mnuMouthGap100.Checked = False
            mnuMouthGap125.Checked = False
            mnuMouthGap150.Checked = True
            mnuMouthGap175.Checked = False
            mnuMouthGap200.Checked = False
            mnuMouthGap225.Checked = False
        End Sub
    
        Private Sub mnuMouthGap175_Click(sender As Object, e As EventArgs) Handles mnuMouthGap175.Click
            GAP_Y = 175
            mnuMouthGap100.Checked = False
            mnuMouthGap125.Checked = False
            mnuMouthGap150.Checked = False
            mnuMouthGap175.Checked = True
            mnuMouthGap200.Checked = False
            mnuMouthGap225.Checked = False
        End Sub
    
        Private Sub mnuMouthGap200_Click(sender As Object, e As EventArgs) Handles mnuMouthGap200.Click
            GAP_Y = 200
            mnuMouthGap100.Checked = False
            mnuMouthGap125.Checked = False
            mnuMouthGap150.Checked = False
            mnuMouthGap175.Checked = False
            mnuMouthGap200.Checked = True
            mnuMouthGap225.Checked = False
        End Sub
    
        Private Sub mnuMouthGap225_Click(sender As Object, e As EventArgs) Handles mnuMouthGap225.Click
            GAP_Y = 225
            mnuMouthGap100.Checked = False
            mnuMouthGap125.Checked = False
            mnuMouthGap150.Checked = False
            mnuMouthGap175.Checked = False
            mnuMouthGap200.Checked = False
            mnuMouthGap225.Checked = True
        End Sub
    Down to this:
    Code:
    Private Sub MouthToolStripSubMenuItem_Click(sender As Object, e As EventArgs) Handles mnuMouthGap100.Click, mnuMouthGap125.Click, mnuMouthGap150.Click, mnuMouthGap175.Click, mnuMouthGap200.Click, mnuMouthGap225.Click
    
        Dim menu_item As ToolStripMenuItem = DirectCast(sender, ToolStripMenuItem)
    
        For Each subItem As ToolStripMenuItem In MouthToolStripMenuItem.DropDownItems
            subItem.Checked = False
        Next
    
        menu_item.Checked = True
    
        GAP_Y = CInt(menu_item.Tag)
    End Sub
    Just set the tag property of each menu item to their represented GAP_Y number. So it's nothing really on performance, it's just on a matter of saving you typing. The same can be done for all of the dropdownitems that have a similar scenario.
    Last edited by dday9; Apr 1st, 2014 at 01:33 PM.

  7. #7
    Addicted Member evo74's Avatar
    Join Date
    Aug 2012
    Location
    Mars
    Posts
    128

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    It works on windows 8
    Name:  noerror.png
Views: 6099
Size:  16.8 KB
    But it looks like this on windows 8.1
    Name:  error.png
Views: 5754
Size:  11.3 KB
    Both have the exact directx installed
    Time you enjoy wasting is not wasted time

  8. #8
    Banned
    Join Date
    Jul 2014
    Posts
    221

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    Wow you're a god.

  9. #9
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    Quote Originally Posted by Jacob Roman View Post
    Oh come on who didnt see this coming. I remade Flappy Bird from scratch based on the famous Android / iPhone app that got removed from the app store. It has realistic physics, very accurate collision detection, and the game is highly configurable from the menu. It even uses DirectX. The only thing that is missing is a title screen and a high score, which I plan to put in, in due time. So there will soon be an update. In the mean time, enjoy.
    What a minute! That looks like it could be Mario Bros, that is if you put Mario in place of the bird. What is to stop Nintendo from suing?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  10. #10

    Thread Starter
    The DirectXpert Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,165

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    Quote Originally Posted by berny22 View Post
    Wow you're a god.
    Nah, I just have years of hardcore game programming experience

    Quote Originally Posted by Nightwalker83 View Post
    What a minute! That looks like it could be Mario Bros, that is if you put Mario in place of the bird. What is to stop Nintendo from suing?
    Good point. I could make Flappy Bird World, and add scrotum guns, lava pits, spikes, mushrooms, and epic boss battles o.O

  11. #11
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    Quote Originally Posted by Jacob Roman View Post
    Nah, I just have years of hardcore game programming experience

    Good point. I could make Flappy Bird World, and add scrotum guns, lava pits, spikes, mushrooms, and epic boss battles o.O
    Not sure if you remember the trouble the original creators for the Giana Sisters got in because Nintendo claimed it was a direct copy of Mario Brothers.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  12. #12
    New Member
    Join Date
    Aug 2014
    Posts
    1

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    debug exe file is missing so i cant run it plz email me the file <email removed by moderator>
    Last edited by dday9; Aug 21st, 2014 at 08:25 AM. Reason: Removed email so OP doesn't get spammed to death

  13. #13
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,159

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    Quote Originally Posted by epicgamerspro View Post
    debug exe file is missing so i cant run it plz email me the file <email removed by moderator>
    The exe file is missing because in most of the forums in VBForums, binaries(exe's included) are not allowed. In the Game Demos forums, exe's are allowed, but only by the OP's decision and should be downloaded with much skepticism. Instead, load the project in VS and debug the project. This will build the exe for you.

    Also, I removed your email from the post because VBForum's does have a lot of webscrapers that scrape the forums for personal information. Once they get ahold of your email, they can spam the crud out of you!

  14. #14

    Thread Starter
    The DirectXpert Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,165

    Re: [VB.NET] Flappy Bird - By Jacob Roman

    It should be in the x86 folder, not the debug folder because when doing directx in vb, you set it to x86, therfore the compiled exe gets tossed in there.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.