Skip to content

A portable, bootable flappy bird game written in x86 intel assembly.

Notifications You must be signed in to change notification settings

travisjayday/FlappyOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlappyOS

A portable, bootable flappy bird game written in assembly.

Using BIOS interrupts for input and the linear VGA 320x200 256bit color mode for output, FlappyOS recreates the popular mobile game Flappy Bird with even more "Retro" graphics than the original!

Screenshots

Color Screenshot

Black White Screenshot

Over Screenshot

Gamemodes

As seen in the screenshots, FlappyOS has two modes: Color and Black/White. These modes can be selected on startup when the bootloader reads the game into memory. Additionally, custom VGA colors can be setup in the src/background.asm file.

Process

On boot, the bootloader reads sectors 1, 2 an 3 into memory (that's right, the game is 3 + 1 sectors, ie 2KiB large!), then prompts the user for a mode, either color, black/white, or exit. Exit reboots the PC. Once the player selects a mode, the game starts. When the player collides, the screen fills with black. After a keypress, the game jumps back to the MBR and re-runs the code in the bootloader.

Installation

Pre-assembled binary images and iso's of the game are found in the build/ directory. These can either be used in a virtual environment such as VirtualBox or BOCHS or on real hardware that supports USB Floppy or USB Hard Drive emulation. Running make in the main directory will assemble the source files and create a floppy.img in the build directory. It will also try to start the BOCHS emulator (for debugging) which should have been installed beforehand.

make has other options too:

  • make usb assembles all files and attempts to write the image to /dev/sdb This may brick your computer/bootloader depending on your HDD setup! Make sure you change /dev/sdb to your USB device
  • make iso assembles all files and creates a bootable iso images which can be used in VirtualBox or burned to a disk or USB
  • make image only assembles a floppy disk image in the build directory

Read the Makefile for more information.

A word of warning: If playing in an emulator, delays and game timings may be too fast or too slow (as explained in this StackOverflow question). If you're using BOCHS, tweak the ips=xxx label in the bochsrc.txt file in the build/ directory or the actual timings of cx:dx in the source file flappy.asm.

Additional Notes

Learning about CPU architecture, the boot process, and BIOS has been painful at times but an overall fantastic experience: I learned a lot. If you have any questions about my code or the game, feel free to raise an issue. A big Thank You to user flxbe for his asm-space-invaders game and the StackOverflow community for their help & reassurance.
This has been quite the educational experience!

(Here's a secret: Pressing 'P' in game, pauses the game)

About

A portable, bootable flappy bird game written in x86 intel assembly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published