# A Small Open Source Game In C++

DevFeed: [A Small Open Source Game In C++](<https://devfeed.tech/articles/a-small-open-source-game-in-c-21018.md>)

Original publisher: [Read original article](<https://preshing.com/20201126/a-small-open-source-game-in-cpp>)

Author: Jeff Preshing

Published: 2020-11-26T12:52:00Z

Content type: article

Language: en

Sources: [Jeff Preshing](<https://devfeed.tech/sources/jeff-preshing.md>)

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Game Development](<https://devfeed.tech/topics/game-development.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [audio](<https://devfeed.tech/tags/audio.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [development](<https://devfeed.tech/tags/development.md>), [framework](<https://devfeed.tech/tags/framework.md>), [game-development](<https://devfeed.tech/tags/game-development.md>), [github](<https://devfeed.tech/tags/github.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [open-source](<https://devfeed.tech/tags/open-source.md>)

## AI overview

The article presents Flap Hero, a small open-source mobile game written entirely in C++. It explains how the game uses Plywood, a module-oriented C++ framework, together with third-party libraries for 3D models, audio, textures, fonts, windowing, and input. The article emphasizes the resulting small download, fast loading, low memory usage, responsive controls, and high framerate.

## Source excerpt

I just released a mobile game called Flap Hero. It's a Flappy Bird clone with cartoony graphics and a couple of twists: You can go in the pipes (wow!) and it takes two collisions to end the game. Flap Hero is free, quick to download (between 3 - 5 MB) and opens instantly. Give it a try! Flap Hero is open source, too. Its source code is released under the MIT license and its assets (3D models, sounds, music) are dedicated to the public domain. Do whatever you want with them! Everything's available on GitHub. I'm releasing this game to promote Plywood, an open source C++ framework I released a few months ago. Flap Hero was made using Plywood. How Flap Hero Uses Plywood If you only read up to this point, you might think that Plywood is a game engine. It isn't! Plywood is best described as a "module-oriented" C++ framework. It gives you a workspace, a set of built-in modules and some (optional) code generation tricks. Plywood currently has 36 built-in modules, none of which are specific to game development. For game-specific functionality, Flap Hero relies on several excellent third-party libraries: Assimp to load 3D models, SoLoud for audio, stb to load textures and fonts, and GLFW for desktop windowing & input. If Flap Hero relies on third-party libraries, you might be wondering, what's the point of Plywood? Well, those libraries have to be integrated into something. In Plywood, that something is the Plywood workspace. In this workspace, you can create your own modules that depend on other Plywood modules as well as on third-party libraries. You can then instantiate those modules in build folders, and they'll bring all their dependencies along with them. In addition to the aforementioned libraries, Flap Hero uses several built-in Plywood modules such as runtime, math and image. Plywood's runtime module offers an alternative to the standard C and C++ runtimes, providing lean cross-platform I/O, strings, containers and more. The math module provides vectors, matrices, q