Flappy bird with a twist 🤖

Flappy bird with a twist 🤖

Publish Date: Apr 26
29 0

This is a submission for the Alibaba Cloud Challenge: Build a Web Game.*

UPDATE: Alibaba Cloud Services got cancelled, some functionality may not work as it used to.

Do you have what it takes ⁉️

can you beat User007? 🕵🏼

Compete for the number one spot on a top 5 global leaderboard! -
Introducing Rocket bot 🚀🤖 - an intense game where you fly through space, navigating a carefully to avoid obstacles as you speed up with progress - REALLY INTENSE! 😤


🔗 Live Demo: http://rocketbot.duckdns.org/

📦 Source Code:

GitHub logo SebastianDevelops / rocket-bot

Publication for Alibaba cloud hackathon

Start Menu 🕹️

Image description

Intense Navigation 🗺️

Image description

Boosters On! 🚀

Image description

The spot we need to grab 😥

Image description


Technical Talk 🧑🏼‍💻

1) Hosting ☁️

ECS (Elastic Compute Service)

  • Elastic Compute Service is used for hosting the game. I used the Alibaba Cloud Linux image. Quite fun and simple to setup, literally a few clicks.

  • Uploading of the code files is where the process becomes more "involved", the steps I took to upload the code files were as follows:

  • I had to SSH into the ECS instance ssh root@<ECS_Public_IP>

  • I installed and started Apache httpd(verified it was running)

  • Basically a bunch of command line prompts to get the files to the server. 🙂

  • I don't own any domains so I went the route of using a DDNS, this was tricky to implement but really fun. I had to create an ipv6 address for the ECS instance, enable bandwidth on this address, allow inbound and outbound traffic for this instance. Do some port forwarding and BOOM we got a domain http://rocketbot.duckdns.org, I did not have time to do SSL configuration.

  • Side note, the console is awesome, it even has AI integrations.

2) Game Asset Storage 📦

OSS (Object Storage Service)

  • Object Storage Service is used to store the games asset files such as the robot sprites, sound effects and background music.
  • Working with OSS is a breeze > Upload the file 🔃, public read access enabled ✅, use the public URL! 🖇️

3) HEY! I remember you, are we related? 🐘

PolarDB with MySQL

  • Using PolarDB was such a breeze, especially integrating it with the rest of the services I was using in Alibaba Cloud, I'll explain in a sec.

  • I'm using the database to store user information such as Usernames used for the leaderboard and to keep scores for these users.

  • Usernames are auto-generated but you'll be able to see your own high score as the row will be highlighted and the username will be "You". I'm still trying to beat that User007's record!

  • The point I made earlier about the seamless integration is > Alibaba Cloud allows you to create instances of each services in the same region, allowing these instances to share a security group and have inbound network communication, really cool feature. This makes integrating services a breeze!

4) Beep Bop Peep 🤖

Function Compute
Shoutout to this service, really loved working with it

  • Working with function compute is as simple as Choose Runtime > Create Code(They even have the ability to host MCP servers☠️) > Click deploy > Invoke with public URL. Ohhhh!! Code's not running? Just enable real time logs, you'll be able to debug issues in no time!

  • Instead of creating an express server and hosting it separately, I used function compute for my express/node server. Connecting to the SQL database was a breeze 🍃 because of the security group protocol.

  • Function Compute is responsible for all my API endpoints and CRUD functionality.

🚨The verification process on Alibaba Cloud could use some work nevertheless, shoutout to them, very powerful services!🚨

Comments 0 total

    Add comment