Appybird
"It's even more annoying than Lunar Lander, but I recommend that you play it" - Jonty Wareing.
Appybird is a happy little bird that just wants to go flying. Unfortunately, some inexplicable green pillars keep getting in the way. Can you time his flaps so he flies through the gaps?
Origins
I built Appybird between EMF Camp 2022 and EMF Camp 2024. On the way home from EMF 2022 my head was buzzing with different ideas for what to do after Lunar Lander, but over the next few days Appybird was the one that I kept coming back to. The simple and fun game mechanics lend themselves to a physical implementation. The exuberant, colourful, design contrasts sharply with the black-and-white minimalism of Lunar Lander.
Early Investigations
One of the first questions was how to get the bird to fly over the landscape. In Lunar Lander the landscape is still and only the player moves. That wouldn't work for Appybird where long runs need to be possible - so the landscape has to move. I thought about landscapes on belts or chains, but the easiest seemed to be to make the landscape rotate on a large wheel.
My guideline for the arcade machines is to make the mechanisms about 60cm wide so that they fit on the rolling draw unit next to my desk which tends to be where the prototypes spend most of their time. It's also a good size that's small enough to be portable, but large enough to look reasonable in an arcade when built. Deciding the size of things is a big consideration when building these machines, and sometimes it helps to have arbitrary size as a target to narrow the options. To see if a wheel 60cm wide would be big enough for the landscape I made a crude model in Fusion and animated it. It seemed a bit small, but I reckoned that you could just about get enough pillars on the wheel to create an interesting game. Fortunately, that judgement proved right.
The next step was to build a very rough prototype to see if it was fun to play. The bird was a wood offcut on a long arm attached to a servo motor to move it up and down. The wheel was rotated by a DC motor - relying on manual control of the voltage to change the rotation speed. It was a little chaotic as nothing was properly built, but the overall impression was promising.
It took a long time for me to solve the problem of how to detect the bird colliding with the landscape. Collisions had to be detected no matter what direction the bird was flying with it hit the landscape. During the collision the bird had to swing off-axis to avoid damage and then re-centre once it was moved clear of the landscape. I tried several options - piezo detectors in the bird mechanism, accelerometers, but none of them gave reliable indications of a collision.
Eventually the best solution proved to be a very common component. I put the mechanism from a game controller thumb-stick in the arm supporting the bird. They are amazingly well designed with a very simple, but reliable, and robust self-centering action. At the start of the game the software measures the joystick position when it knows the bird is away from the landscape. If the joystick deviates too much from that reference position the software detects a collision. It creates a fun detail in the game as very small collisions are often below the threshold and not detected so there is a "phew" effect for the player.
Another key decision in manging collisions was to have the bird move forward and back so that at the start of the game, and after a collision, the bird can be pulled away from the landscape so that no collision is possible. That added complexity as the whole vertical axis has to move forward and back, but it worked well and reliably once built.
Building
An early decision was to try and make the mechanism on a self-contained unit that could be put next to my desk for testing and easily moved in and out of the final arcade cabinet for maintenance and transport. That decision was very helpful throughout the build process. The 3D printed components for the vertical axis, including the bird, were made on my venerable Ender 3 printer. Even though the bird is multi-coloured it was printed in separate parts and glued together. However, when it came to the landscape the size of the pieces meant the printing times on the Ender 3 were looking very unattractive. I decided to invest in convenience and did a major printer upgrade which make printing the rest of the mechanism much quicker.
The software architecture is similar to Lunar Lander. The main game functions are controlled by a pygame application on a PC (running Windows this time). That communicates to two Arduino Nanos that do all the tight real-time control of the steppers and servos. Most of the physics simulation is done on the Arduinos, though the PC tells that Arduinos what physics parameters to use.
I tried quite hard to make the Appybird build more productive than Lunar Lander. I used Arduino libraries instead of bespoke software for a lot of the functions. In general, that worked well, though sometimes the effort required to fathom the library isn't that far off what it would be to write it yourself.
The PC software take an event-driven approach and by using a suitable structure for the events it manages not to retain too much state information. That is a big step forward from Lunar Lander where the Python was very stateful and a nightmare to modify.
Refinement
The fully working prototype had an outing at a friend's barbecue in summer 2023. Two comments stuck with me - put a cloud that hovers behind the bird to hide the mechanism, and make the gap between the pillars narrow on later levels. They were both big improvements, but both were really challenging to design, particularly the mechanism that lifts the lower landscape to narrow the gaps.
The arcade cabinet was designed in Fusion without building a full-scale prototype. The design has a door that looks like early generation iPhone - a joke on whether this is a phone app or not. I 3D printed a small control panel that goes where the iPhone home button would be. It looks a bit like a codpiece, but we won't worry about that. The bigger wood panels were CNC cut from 12mm hardwood ply at a local workshop which saved me a lot of wood work. It turned out that I designed the cabinet slightly too short, so I had to change the layout to put the mechanism slightly higher in the cabinet and to add adjustable feet to give a bit of extra height.
The cabinet was designed so it could be disassembled into a flat-pack style kit for transport. I don't have a van so being able go get things in a regular car is a big advantage. There are a lot of custom-designed 3D printed connectors to join the panels. Following Tim Hunkin's advice the cabinet was painted in vinyl silk emulsion. I wasn't sure how that might look, but in the end it looks good. You can still see the wood grain clearly, but it looks meant rather than unfortunate.
Launch
The machine was close to finished a few weeks before EMF Camp 2024. As usual though there wer various last-minute panics. A couple of loose connections caused intermittent problems. I also decided that it might be too easy for the EMF crowd to get really high scores, so I made the later levels a little harder.
The final machines plays really well, and looks great. It was launched at EMF Camp 2024 where it got over 5000 plays and 160,000 flaps over the weekend. For a first outing it was super reliable. There were only two restarts due to software problems. The biggest problem was a servo in the height control that died on Friday night - allowing a bunch of kids to set silly high-scores as the machine was effectively stuck at level 2. Fortunately I had seen a similar servo failure in testing, so brought a spare set. Doing the rebuild in a tent at 10pm wasn't ideal though!
Appybird got a huge response at EMF. People loved the concept and all the little details, like the flapping wing, that come together to create the total experience. I guess the biggest problem is the sky-high expectations for the next EMF. We'll see what happens...