https://github.com/VadimBoev/FlappyBird Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} VadimBoev / FlappyBird Public * Notifications You must be signed in to change notification settings * Fork 13 * Star 312 Less than 100 Kilobytes. Works for Android 5.1 and above 312 stars 13 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 4 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights VadimBoev/FlappyBird This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 55 Commits FlappyBird FlappyBird .gitattributes .gitattributes .gitignore .gitignore FlappyBird.sln FlappyBird.sln README.md README.md README_RU.md README_RU.md flappy.gif flappy.gif View all files Repository files navigation * README game Readme na russkom iazyke Dev blog in Telegram (ENG/RU) Flappy Bird, only C, without Java/Kotlin, weight APK (armeabi-v7a + arm64-v8a) < 100 kilobytes History: It all started in 2021. Then I came across the rawdrawandroid repository. There was a motivation to make some kind of game with the lowest possible APK weight, but at the same time, so that the game would be simple and understandable. At that moment, the idea came up to make a clone of the long-forgotten Flappy Bird game. Which has already been ported to many programming languages. Then, later in 2021, I found another interesting repository Raylib. But, the first attempt to make this game was in C++, using ImGui, because I already knew him. And so, all the difficulties were presented in Android Native Activity and building a clean APK from apktool without Android Studio. The first attempt failed. Firstly, the weight of the APK was about 1 Megabyte. Secondly, there could be crashes of the game. Thirdly, there was only a library for armeabi-v7a inside the APK, and since 2022 Google's rules require the presence of arm64-v8a libraries. Fourthly, the structure of the project and its organization were terrible, it created a mess in the eyes and made it difficult to navigate the project normally. In general, I tried something, it didn't work out, the thought was stored in my head throughout this time, but no more attempts were made. Motivation: Around September 14, 2024, in the Raylib discord channel, I saw a guy make a Flappy Bird in C#. Then it became very interesting to me to try a crazy idea, to make this game in C, for Android, with an APK weighing less than 100 Kilobytes. The idea seemed crazy, as well as unsuccessful. Just imagine, today, when the weight of the APK reaches 500 Megabytes, you only need to keep less than 100 Kilobytes. What are these frames for? It's a sporting interest, will it work out? It worked! But it wasn't easy at all. Implementation: At first, I put together a solution that compiled Hello World in C, packaged the library into an APK, everything was signed and sent to my device via USB. As soon as everything was ready, I went on to explore the resources of the game. The sounds were in ogg format at first, I compressed them, but there were some problems, I don't remember this moment anymore. Then the sounds still became mp3 format, compressed at 16 (kilobytes per second) each, thereby reducing the weight as much as possible, and the sound quality remained tolerable. The first difficulty arose if I had previously used BASS to play the sound, and it's heavy for my purpose, I had to study OpenSLES, which reads MP3 format without problems. Further, png images remain from the resources. There is no other way to use the format. Then it was necessary to find something easier than stb_image. So I came across upng, which completely solved the issue of decoding png files for their further rendering. In general, everything is simpler than it seems. OpenGL ES 2 + shaders for rendering, OpenSLES for sounds, upng for decoding png format and of course Android Native Activity. Build: * Download Visual Studio 2022 * + Open Visual Studio Installer * + Click "Edit" * + Check the following items: Development of classic applications in C++, Development of mobile applications in C++ * Download Android Studio (we need apktool, sdk, ndk from it) * + Install NDK 25.2.9519653 (you can use the version above) * In the project, the setting is made for "Debug ARM", but make changes to build.bat (look at the paths) * Compile via CTRL + B Copyright: I do not claim copyright. The right to this game and resources belongs to DotGEARS. Inspiration: * rawdrawandroid * Flapper * Raylib * ImGui About Less than 100 Kilobytes. Works for Android 5.1 and above Resources Readme Activity Stars 312 stars Watchers 4 watching Forks 13 forks Report repository Releases 2 60 FPS in game Latest Sep 22, 2024 + 1 release Packages 0 No packages published Languages * C 97.4% * Batchfile 2.1% * Makefile 0.5% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.