Hodl the Coin goes Open Source!
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:
Great game, great team - HODL the Coin till the moon 🤪
Haha, cool project with using phaser.
I assume firebase is used to store the leaderboard data of the winner in the games?
Thanx! I love the Phaser engine :) - and yes, Firebase is used, the new Firestore database to be specific. At the beginning, we did not even want any highscore list, so this was an easy solution without the need to use our own database. Maybe we will switch to MongoDB later though :)
Firebase is easy enough to setup without thinking too much about the design and schema of database, and it is also quite fast to use to develop stuff in short time.
That is great. Making the game opensource I think is an awesome Idea. I am not sure how utopian accepts new intiative like this but once approve I think you can leverage the rewards mechanism to accelerate development of the game as well as attracting quality community suggestion for the game. I wish you success on this game and I hope I can contribute on this one as well. One suggestion though maybe you can find a way to incentivize playing the game would be more awesome!
Hi @luschn, it's really cool you have made the project open source but unfortunately only changes made in the last fourteen days of a project are considered when determining whether the contribution should be rewarded or not. Most of the changes you made in this period were adding comments and updating the README, which we don't really consider "development". It would be great if you submitted another contribution once you have added some new features to the game!
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Oh, that´s sad, we put a lot of effort into it before we made it open source - it only went to Github some days ago, but we imported the whole commit history from our internal GIT server. Anyway, thank you for the information, i hope you played the game on your own? What´s your highscore? :)
Excellent game sir
Gran juego amigo @limesoda te felicito sigue adelante, saludos!
great project with the use of phaser, grateful to you for the work you do, keep it up and blessings poured out on you. Greetings from Venezuela @luschn
You got a 16.76% upvote from @oceanwhale With 35+ Bonus Upvotes courtesy of @retroboy! Delegate us Steem Power & get 100%daily rewards Payout! 20 SP, 50, 75, 100, 150, 200, 300, 500,1000 or Fill in any amount of SP Earn 1.25 SBD Per 1000 SP | Discord server
Congratulations @luschn! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of comments received
Click on any badge to view your Board of Honor.
To support your work, I also upvoted your post!
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
You got a 13.09% upvote from @emperorofnaps courtesy of @retroboy!
Want to promote your posts too? Send 0.05+ SBD or STEEM to @emperorofnaps to receive a share of a full upvote every 2.4 hours...Then go relax and take a nap!