A while back, there was a post on a popular internet forum for retro computing about Flappy Bird. You know, that game that went viral and subsequently got pulled by the author. Anyway, it turns out that people had made versions for pretty much every old 8-bit computer under the sun… except one. There was no Flappy Bird for the Apple II! This upset me. The Apple II was and is extremely popular. We couldn’t let ourselves be so underrepresented. I decided to take action.
UPDATE: I’ve released a new version with support for the Apple IIc and a Mono “green screen” mode
I spent way more time on this than I had intended. I wanted to just hack out a junky version over the weekend and get on with things, but of course nothing ever works out that way. Development wasn’t difficult, but I had a lot of personal things going on so it ended up taking me about 6 weeks of random 30 minute intervals to get it done. The first two weeks I pretty much had a working version. But I wanted to prove a point. I wanted my version to run at 60 FPS on a 1MHz Apple IIe with no flicker. So at the end of the first two weeks I realized that my generalized drawing code wouldn’t be fast enough. I spent it took another two weeks to find time at night and on weekends to optimize all of the drawing routines. Finally after a month I had a pretty much optimized game engine. The final two weeks were the finishing touches like sound, high score and titles. This part was the easy and fun part.
Like all projects, I could keep going. It’s not nearly done, but at the same time, it’s been done for weeks. So I must release it now. There are *way* more interesting projects in my pipeline, and I’m anxious to get back to working on the more modern Apple IIgs architecture.
I’ll probably put together a little post-mortem that talks a bit about the way the game engine works, but in the meantime you can look at the source code yourself, available on github. It’s not very pretty at this point, but I don’t know how much value there is in cleaning it up. My initial generalized routines were much easier to understand, but after optimization it looks more like the code ravings of a mad man. 😀
The game requires and Apple II with the capability to display DLR (Double Lo Resolution) graphics, which should be about any computer with an 80-column card. I wrote this in 6502 assembly as so you don’t need to have an enhanced (65C02) machine. It runs great at 1MHz. Faster speeds work fine as far as gameplay, but the audio will be higher pitched at higher speeds. I’ve tested this on an Apple IIe Platinum and Apple IIgs (I believe it should work fine on other 80-column capable Apple II’s, but I’m not sure about the Apple IIc and how it handles vertical blank intervals).
I’ve put the code on github. I may do some updates for critical bugs, but I can’t promise anything. Here are the items I *am* willing to work on if people really want:
I can do a mono version for people without color displays if it’s requested (green screens)DONE!!!
2) I’d be willing to change the physics. I was going to use a sinusoidal flight path, but I started with a hacked flap-glide-descend algorithm that I ended up really liking. It’s not realistic, but I like it.
3) I need to fix the way button pressing works to be like the keyboard routines.
I’ve never played Flappy Bird. This was intentional. I didn’t want to try to make the same version, though I did reference a screenshot of the original artwork. I decided to make the bird smaller, though I could have been “pixel-perfect” but I thought the original looked to big on a 80×48 display. The original game was in a portrait mode, while this game is in landscape mode. So I wanted a gameplay style that fit. I opted for a different balance. For instance, my version scrolls rapidly. I wanted mine to allow people to potentially go for insane periods of time. Technically, the game supports scores up to 9999. I seriously hope no one ever tries to go that far!
Running on real hardware (Apple IIgs)
Running in an emulator
AND NOW!!! Running on a IIc. Figuring out interrupts for VBL really took me too long, but oh well. Better late than never.
Thanks for reading, and thanks to my family for supporting my crazy hobbies!