We have promised to make the Hodl the Coin game Open Source, so here it is, ready for your judging developer eyes!
Repository
https://github.com/ateufel/hodl-the-coin
What is the project about?
The project is a game initially built for Steem, with an alternative version for the Ardor coin. It is basically a remake of Flappy Bird with a brandnew version of the Phaser Game Engine (JavaScript, WebGL, Audio, Physics, ...). There is not much example code for Phaser 3 yet, so i hope this will help some developers to get started with it.
You steer a Coin (Steem or Ardor) through endless pipes (appearing just like the "candles" in cryptocurrency charts). Behind the Coin, a chart line is drawn, showing the up/down trends of cryptocurrencies. The game offers a leaderboard with the Top10 "Hodlers" and a smooth 3D background animation.
The game should run on Desktop and most Mobile Devices, the controls are easy to handle: You just click with your mouse (Desktop) or tap with your finger (Mobile) to flap the wings and get some upward acceleration. If you hit one of the pipes: Game Over. If you qualify for the Top10 list, you will get asked for a username before opening the Leaderboard.
Screenshots
![]() |
![]() |
Technology Stack
You just need to have yarn (or npm) installed, and you need to replace the Firebase API Key (in the config.js file) with your own one.
The project includes an EditorConfig file (make sure your editor can handle it), an ESLint configuration with some good presets, Babel and Webpack configurations to build the code from modern ES6/7/8 JavaScript code and it uses version 3 of the amazing Phaser game engine. Be careful when updating Phaser. Even minor version updates may break some things, version 3 is pretty new and they are changing a lot of stuff.
The project uses offline-plugin, a great way to easily implement Service Workers. Which means, it also works offline and it will look just like a native App if you put it on a server with a SSL certificate and add it to your (Android) home screen :)
TL;DR:
- ESLint
- JavaScript ES6/7/8 with Babel
- Webpack
- Firebase (Cloud Firestore)
- Phaser Engine
- Service Workers (offline-plugin)
Future Plans / Roadmap
As of now, there are two tasks left, and they are for cleanup and code improvement. The game scene grew pretty large, so I would like to split it to reduce the number of lines. There are a few pieces of code that can be separated: The code for the background, the creation/managing of the pipes, the menu handling, ...
Another plan is to make database/score handling more secure, or to remove the leaderboard completely. Tell me what you think!
TL;DR:
- Code cleanup (reduce number of lines of main game scene)
- Make Database connections more secure
How to contribute
As usual, create an Issue on Github, or comment on this thread if you want to contribute in any way. Or send me a Pull Request if you want to help improve the code or implement some new feature.
My Github Account: https://github.com/ateufel
If you want to play the game right now, just click the banner:
Last but not least, we would like to thank the following users for their support and their input, you guys are heroes: