Image for post
Image for post

Many games have a core thing in common when you really dig under the surface: there’s almost always a soft nougaty core of C++. Firebase offers native feeling SDKs for Android, iOS, Unity, and the Web which makes it super easy to connect your game or application to its globe spanning infrastructure. Unfortunately these SDKs are fairly difficult to integrate if you live in C++, making them very inconvenient to use for many game developers. …


Image for post
Image for post

Many games have a core thing in common when you really dig under the surface: there’s almost always a soft nougaty core of C++. Firebase offers native feeling SDKs for Android, iOS, Unity, and the Web which makes it super easy to connect your game or application to its globe spanning infrastructure. Since idiomatic C++ can differ substantially from the patterns that make sense in other languages and frameworks, Firebase provides a bespoke C++ SDK to ensure that game developers get the same seamless experience one would expect from any other Firebase client SDK. …


If you’ve followed any of the Firebase tutorials for Android, you probably came across an instruction like “Add the SHA-1 hash for your project.” You may have even been linked to this page, where you were told to type keytool -list -v followed by a strange symbols involving -keystore.

Now for many developers, including most Google employees with the standard dev tools, this just works and we don’t question it. Others will get one of these super exciting error messages:

keytools: command not found

'keytool' is not recognized as an internal or external command

This is also an optional step for many of Firebase’s products. Currently Firebase Dynamic Links and some Firebase Authentication products (such as Google Authentication and Phone Authentication) are the only products that need a SHA-1. …


Image for post
Image for post

Many games have a core thing in common when you really dig under the surface: there’s almost always a soft nougaty core of C++. Firebase offers native feeling SDKs for Android, iOS, Unity, and the Web which makes it super easy to connect your game or application to its globe spanning infrastructure. Unfortunately these SDKs are fairly difficult to integrate if you live in C++, making them very inconvenient to use for many game developers. …


Image for post
Image for post

Build from source or pre-built binary? What’s the difference?

Firebase provides a robust cross platform C++ SDK to facilitate integration with games. Should you choose the source based or binary distribution of the SDK?

For most users most of the time, you will want to use the binary version of the SDK. It will be the easiest to integrate, especially if you don’t use CMake as your build system. But I’ll take the time here to weigh pros and cons, and highlight when the open source variant is your ideal choice.

Source Based

There are two important bits of information that you need to know about the open source C++ Firebase…


Image for post
Image for post

CMakeLists ends with .txt, are you sure this is the right place?

The C++ Firebase SDK relies on CMake as its primary cross platform build system for both the open source SDK and its pre-compiled counterpart. Although this is a very popular build system, the C++ language doesn’t have a single set of build tools across all platforms. If you’ve come here wondering what a CMakeLists.txt or if .txt is some strange typo, I will give you a quick down to the basics primer on “modern CMake.”

The Setup

To start out, every CMake project has a file named CMakeLists.txt at its root. Individual subdirectories may have these as well, often to denote other libraries (such as Firebase). …


Using App Distribution to test out an internal project

Intro

In my time making games and toys, I’ve learned that the single biggest driver of success early in a game’s lifecycle is testing. Not unit testing, not necessarily testing a piece of software, but as little as setting aside an hour to play a sample round of a new idea on a piece of paper can affect massive positive change during the most formative stages of a game’s development. My favorite saying has become “a prototype is worth 1000 meetings.” …


Image for post
Image for post

Common issues and their root

There are a few reasons why you might have found this article. One is that you integrated the Firebase SDK and suddenly you started getting errors about duplicate symbols on iOS or duplicate classes on Android, or perhaps you integrated another library into an existing Firebase game and received these errors. You may also be someone maintaining a native plugin or planning on maintaining one, and you’re trying to figure out how to avoid asking developers to customize platform specific build files. …

About

Patrick Martin

I’ve been a software engineer on everything from games to connected toys. I’m now a developer advocate for Google’s Firebase.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store