40 likes | 232 Views
Coding for Flappy Seagull. Here is some of the coding for my game Flappy Seagull explained. This coding here is for the pipes, and basically it tells the game that if Flappy touches the pipe, Flappy dies.
E N D
Here is some of the coding for my game Flappy Seagull explained. This coding here is for the pipes, and basically it tells the game that if Flappy touches the pipe, Flappy dies. Here , where it says “If x mod 500 = 0 switch to costume pick random one to four” , this is telling the game to switch to a different pipe if Flappy is still alive.
This coding is for the stage. Here this coding is about the score and high score. “if score > high score set high score to score” means that if your current score is higher than the saved high score, it will update the high score to yours. This piece of coding basically means for every time that flappy has not died, the score will be increased by one.
This is Flappy’s coding. This tells Flappy to go up when the player presses space, and this tells Flappy turn upside down and drop to the bottom when he dies. This coding up here simply makes Flappy look like he’s flapping his wings; the game waits 0.1 seconds before switching to Flappy’s second costume.