Floaty Ball, or Flappy Ball as the intro screen calls it, was a game included as an example in early versions of the Arduboy library. It was removed because it was virtually unplayable, due to the speed that the ball moved.
I’ve taken some time to clean it up a bit and fiddled with the rise and fall speed of the ball, to make it easier to play (maybe too easy?). I renamed it from FloatyBall to FlappyBall, to match the intro screen.
I’ve adjusted the parameters and code that generates the pipes. The gap will now be located over a larger range. The gap has been decreased slightly. The space between the pipes has increased slightly.
If you downloaded the game before this message was posted, you may wish to grab it again and try this new version. It’s a bit more difficult.
My best score with my currently released code is 49 but I’ve really only played to test it.
I’m not sure how this would help. The game only uses addition and subtraction and I don’t believe there are any overflows. There aren’t any multiplication or division operations. Can you give an example of where it would help?
Yes, I understand what Fixed Point is. I just don’t see how using it would benefit Flappy Ball. The code is all integer based, without any multiplication or division that has to deal with fractional results.
Again, what part of the Flappy Ball code would work better using Fixed Point math?
Using Fixed Point, you could possibly do a more accurate simulation of acceleration due to gravity but I doubt the result would be very noticeable compared to the technique currently used.
Currently, the ball position is only being updated every other frame, so it’s at 15 fps. So yes, you could use Fixed Point math to interpolate and update at 30 fps or 60 fps. It would be smoother but I wonder how much your eyes would notice it. You’re welcome to try it if you wish.
OK, I decided to try this. I used 4 bits for the fractional part of the int.
I kept the game at 30 fps but the ball position is now updated every frame instead of every other frame. I don’t know if you’ll notice it being any smoother but it will improve collision detection. It also makes it easier to experiment with different values for the gravitational acceleration and jump velocity.
I’ve also added the display of button usage information, and the ability to toggle sound off and on.
Some of the parameters that control game play have been changed, so the difficulty may have been affected, but I don’t think by much.
The number of points that cause the pipe gap to narrow is reduced from 6 to 5. I felt the game was going on a bit too long, for me at least.
The point sound is no longer interrupted by a flap sound.
The number of bits used for the fraction part of an integer has been increased from 4 to 6. This doesn’t affect anything with the current game settings but allows finer control of the acceleration and jump velocity values in case anyone wishes to experiment with them (especially if the frame rate were to be increased).
not jerky. very smooooth!!
too comfortable, i think it seems connected with a feather. speed is no problem.
playing 15 min. my new record is 27. im not good gamer.
This is a pretty fun game, it does run really well.
I got this put on codebender, I’ll have to get instructions to load it to the devkit, I don’t see our hardware in the variants yet, but it will work with the 1.0 unit.
My goal was to make it easy enough at the beginning so that beginners, children and less skilled players wouldn’t find it too frustrating, but it would increase in difficulty fast enough that it would end in a reasonable amount of time for experts.
With the current settings, I’ve managed to get above 50 a few times but that’s with my home made system. I can’t say how I’d do with a real Arduboy or DevKit.
The only way I can see doing this on codebender, until they directly support the DevKit as a board type, would be to copy the library into the sketch or set up a personal library, and then comment out the #define ARDUBOY_10 and uncomment #define AB_DEVKIT in core.h, as instructed.
It’s already been added, they are just waiting on a few games to add the hardware definitions. All of the games will be under the ArduboyGames account on their site. There should be an Arduboy and Arduboy Devkit in the drop down menu in the upper right soon.