Skip to content

The classic Flappy Bird implemented in Kaboom.js! With dynamic random generation of both assets and pipes, the ability to share previous runs, and to compete against them!

Notifications You must be signed in to change notification settings

RascalTwo/FlappyBird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flappy Bird

Run on Repl.it Website

The classic Flappy Bird implemented in Kaboom.js! With dynamic random generation of both assets and pipes, the ability to share previous runs, and to compete against them!

Link to project: https://flappybird--rascaltwo.repl.co/

flappy.bird.mp4

Usage

Your goal is to fly for as long a possible.

Crashing into the floor, pipes, or flying into spaces will cause you to stop flying.

Previous games can be saved both so you can watch them later, and play the same level again.

Flying over snow indicates you are currently setting a high score!

  • Space or Mouse click increases your height

How It's Made:

Tech used: Kaboom.js, JavaScript, HTML, CSS

I started off creating the two basic screens, the menu and the actual gameplay, with the menu showing the textual information needed for playing the game and handling state IO. I went with a functional IIFE encapsulation approach over singleton classes to manage the different aspects of the gameplay, from pipe management, HUD elements, player movement, etc. After achieving my MVP I added additional features, such as the randomized infinite scrolling background, differing ground type when setting a high score, and the ability to record & replay games.

Optimizations

There can exist rare instances that due to the scheduling nature of the engine replayed entities are not exactly where they were in the past, which can lead to previous runs both losing too early or not losing when they should, so improving the accuracy of the replay/recording system would resolve this. Additionally, there could exist togglable options for users that want to keep replaying the same level over and over, and other QOL improvements based on user preferences.

Lessons Learned:

Being the largest project I've written using Kaboom.js and first with a replay system, I learned not only how to fully use the animation and scheduling system.

Examples:

This isn't the first nor last game I've written using Kaboom.js:

Infinite Driver: https://github.com/RascalTwo/InfiniteDriver

Rail Snake: https://github.com/RascalTwo/RailSnake

Credits

About

The classic Flappy Bird implemented in Kaboom.js! With dynamic random generation of both assets and pipes, the ability to share previous runs, and to compete against them!

Topics

Resources

Stars

Watchers

Forks