This is a simple implementation of a Flappy Bird style game for a 404 error page. The game is created using HTML, CSS, and JavaScript without additional libraries.
- Simple and engaging game for a 404 page
- Responsive design, works on mobile devices and desktops
- Control using the space key, mouse click, or screen touch
- Score counting
- Simplified mechanics for a more comfortable gameplay
- Copy all files to the root directory of your web server
- Configure your web server to use
404.htmlas the 404 error page
Add the following line to the .htaccess file in the root directory of your site:
ErrorDocument 404 /404.html
Add the following line to your server configuration:
error_page 404 /404.html;
index.html- Main HTML pagestyles.css- CSS styles for the page and gamegame.js- JavaScript game codeicons8-bird.svg- SVG bird icon
- When you land on the 404 page, you'll see a game field with a bird
- Press space, click with the mouse, or touch the screen to start the game
- Control the bird to fly between the white pipes
- For each pipe passed, you get one point
- The game ends if the bird collides with a pipe or the boundaries of the game field
The game is configured for a comfortable difficulty level:
- Reduced gravity for smoother falling
- Increased gap between pipes
- Slower pipe movement speed
- Less frequent appearance of new pipes
- Small margin of error when detecting collisions
Bird icon provided by Icons8.