Author Topic: Flappy Bird by Josiah W  (Read 25064 times)

0 Members and 1 Guest are viewing this topic.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #30 on: February 26, 2014, 09:04:19 pm »
Thanks!

Oh, and anyone with optimization and/or feature suggestions, let me know. :D
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Flappy Bird by Josiah W
« Reply #31 on: February 26, 2014, 11:21:50 pm »
Suggestion: Make it so that the same key is used to fly/jump as to confirm, else it can get a bit annoying to have to switch back and forth between 2nd and Enter. :P

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #32 on: February 27, 2014, 11:52:31 am »
Suggestion: Make it so that the same key is used to fly/jump as to confirm, else it can get a bit annoying to have to switch back and forth between 2nd and Enter. :P

And yet, if I try, and I press ENTER just as I'm dying (as often is done by people who don't time jumps), I won't see my score. :P

I've actually been trying to work out something with a "falling" animation at the end in order for there to be a delay, but I just can't do it, try as I might. I plan to have Pic2+8 as the picture of the bird (I didn't store Pic3 for optimization), and for the bird not to overwrite to background/pipes (yet, try as I might, it always does so). If anyone can help me, let me know.

Oh, and update tomorrow with updated pipe generation and graphics!
« Last Edit: February 27, 2014, 11:53:21 am by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #33 on: February 27, 2014, 12:00:16 pm »
You can also add denouncing.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #34 on: February 27, 2014, 12:18:34 pm »
You can also add denouncing.
de·nounce
/diˈnouns/
verb
publicly declare to be wrong or evil

OK. I publicly declare Flappy Bird to be wrong and evil! :P

JK, I know what you meant ("debouncing"), and I have that already.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #35 on: February 27, 2014, 01:21:04 pm »
* Streetwalrus slaps his tablet for auto correcting that <_<
Also Flappy Bird /is/ terribly wrong and evil. :P
And nice to know. :)

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #36 on: February 27, 2014, 01:24:09 pm »
It's all in the getkey -> A:A-B?A -> B lines. ;)
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #37 on: February 27, 2014, 01:29:13 pm »
Mmh. I don't see how this is debouncing. I was thinking of something like :
While 1
Pause 5
End!If getKey(0)

Basically waits for the user to release every key but ON. Also works for a few select ones by changing the ending condition (multiple getKey(x), ?? separated).

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #38 on: February 27, 2014, 01:34:13 pm »
First of all, that would conflict with the grayscale, and the general "movement" of the game. :P

Second of all, my definition that I use here (and also, the original guy used) for debouncing is "making sure an action does not happen multiple times while holding a key". And that does just that. :P
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #39 on: February 27, 2014, 01:38:09 pm »
Does it ?
Also to fix greyscale issues replace Pause 5 with your greyscale update code. Problem solved. :P And by the way I don't recommend this in an input loop but rather between two different ones.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #40 on: February 27, 2014, 01:42:15 pm »
...what does that even mean? ???

I already have it all taken care of!
The game must update itself each frame with the next scroll/bird movement, and this does that.
The game must have a fixed jump height no matter how long the key is pressed for, and this does that.
The game must make sure nothing else (except for the quit key) does anything, and this goddang does that!
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #41 on: February 27, 2014, 02:37:56 pm »
What I mean is that my code is nice to put between two menus or between the actual GAME and the "You lost" screen, etc. to avoid an "OK" key to be detected by the next one without letting the user any time to read/change options.
« Last Edit: February 27, 2014, 02:39:23 pm by Streetwalrus »

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #42 on: February 27, 2014, 05:12:20 pm »
What I mean is that my code is nice to put between two menus or between the actual GAME and the "You lost" screen, etc. to avoid an "OK" key to be detected by the next one without letting the user any time to read/change options.

Oh.

Well, I feel stupid right now. :-\

I'll do that.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #43 on: February 27, 2014, 06:10:05 pm »
You don't need to. :P It's my fault for not being clear enough.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Flappy Bird by Josiah W
« Reply #44 on: February 27, 2014, 06:18:01 pm »
You don't need to. :P It's my fault for not being clear enough.

Yeah, I thought that you meant upon inputting the jumps. :P
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?