This is a submission for the Alibaba Cloud Challenge: Build a Web Game.*
What I Built
Circuit Skies - A Fast-Paced Robot Platformer
Circuit Skies is a 2D platformer game built with the Godot Engine. Inspired by the fast-paced precision gameplay of games like BZZZT, Circuit Skies puts you in control of a nimble robot navigating challenging levels.
- 🏃♂️ Classic platforming actions: Run and jump through challenging levels filled with hazards.
- 💨 Dash mechanic: Press "D" + <- or -> button to dash for quick bursts of speed—perfect for dodging obstacles and enemies. Dashing consumes a regenerating boost meter, so use it wisely!
- 🪙 Collect coins: Gather coins scattered throughout level to reach on top of leaderboard.
- 👾 Avoid hazards and enemies: Watch out for dangerous traps and enemies like green and purple slimes.
- 🚪 Reach the exit: Your goal is to make it to the exit point of each level.
- ❤️ Health regeneration: Recover health over time and gain temporary invincibility after taking damage.
- 🏆 Online leaderboard: Compete for the best scores and see how you rank against other players!
Demo
- Play the game here: [https://circuit-skies.mhlinks.tech/]
Circuit Skies - A Fast-Paced Robot Platformer
Overview
Circuit Skies is a 2D platformer game built with the Godot Engine. Inspired by the fast-paced precision gameplay of games like BZZZT, Circuit Skies puts you in control of a nimble robot navigating challenging levels filled with hazards and enemies.
Demo
-
Play the game here: https://circuit-skies.mhlinks.tech/
-
GitHub Repository: https://github.com/prime399/circuit-skies
-
Screenshots:
Gameplay Features
The core gameplay revolves around classic platforming mechanics with modern additions:
- 🏃♂️ Classic platforming actions: Run and jump through challenging levels filled with hazards.
- 💨 Dash mechanic: Press "D" + <- or -> button to dash for quick bursts of speed—perfect for dodging obstacles and enemies. Dashing consumes a regenerating boost meter.
- 🪙 Collect coins: Gather coins scattered throughout levels to achieve a high score for the leaderboard.
- 👾 Avoid hazards and enemies: Watch out for dangerous traps and enemies like green and purple slimes. The player can take damage…
- Screenshots:
-
Alibaba Cloud Services Implementation ☁️
Circuit Skies leverages these powerful Alibaba Cloud services:
🖥️ Elastic Compute Service (ECS)
- Purpose: Hosts the game's web build with scalability and reliability
- Implementation: Serves Godot HTML5 export files via a web server
- Experience: Quick setup with excellent deployment control
💾 ApsaraDB RDS for MariaDB
- Purpose: Powers the online leaderboard system
- Implementation: FastAPI backend connects to MariaDB for score management
- Benefits: Automated backups and robust connection security
🌐 API Gateway
- Purpose: Manages and secures all leaderboard API requests
- Implementation: Routes requests to ECS while ensuring security
- Benefits: Streamlined API management with enhanced protection
Note: I used Nginx to serve static files and reverse-proxy the FastAPI server
Leaderboard API Implementation:
# Score submission endpoint
@app.post("/submit")
def submit_score(score_data: Score):
if score_data.score == 0:
return {"message": f"Ignoring zero score for {score_data.name}"}
sql = """
INSERT INTO leaderboard (name, score) VALUES (%s, %s)
ON DUPLICATE KEY
UPDATE score = IF(VALUES(score) > score, VALUES(score), score)
"""
try:
with get_db() as conn, conn.cursor() as cur:
cur.execute(sql, (score_data.name, score_data.score))
conn.commit()
return {"message": "Score recorded"}
except:
raise HTTPException(status_code=500, detail="Internal server error")
# Leaderboard retrieval endpoint
@app.get("/leaderboard")
def get_leaderboard():
conn = get_db()
cursor = conn.cursor()
cursor.execute("SELECT name, score FROM leaderboard ORDER BY score DESC LIMIT 10")
rows = cursor.fetchall()
conn.close()
return [{"name": row[0], "score": row[1]} for row in rows]
Experience & Challenges 🚧
-
Holy smokes, Alibaba Cloud services were an absolute dream to work with! As a CS student, I was practically giddy seeing how smoothly ECS and ApsaraDb RDS for MariaDB integrated into my workflow. The documentation was crystal clear, and I found myself setting things up faster than expected.
Tackling the leaderboard API was where I really got to flex my coding muscles! Optimizing that database schema for lightning-fast reads and writes gave me that perfect blend of frustration and satisfaction that only fellow coders understand. When those scores started updating correctly, I may have done a little victory dance at my desk! 😂
The Godot Engine threw me some curveballs, especially that physics engine it was like trying to tame a wild beast! There were nights I wanted to throw my keyboard out the window, but when I finally got that player controller feeling just right? Pure. Digital. Magic.
I became obsessed with playtesting- roping in my roommates, classmates, and pretty much anyone who'd give me 10 minutes of their time.
Combining all these different technologies into one cohesive project was like assembling my own infinity gauntlet of tech skills! As a CS student, there's nothing more thrilling than seeing theory transform into practice. This project wasn't just a learning experience, it was a technical playground where I got to build something awesome while having an absolute blast doing it!
Game Development Highlights ✨🚀
- First Game: This was my very first game, I had to learn a lot in just a week, atfirst I got stuck using Phisor Editor and really couldn't able to do what I really wanted to do, like I wanted to make my camera follow my player while making sure background don't collapse, 🎮
Core Mechanics: Implementing the responsive player controller, especially the dash mechanic with its boost cost and visual feedback (ghosting effect), was a key focus to capture the desired fast-paced feel. 💨🕹️
Retro Aesthetics: I wanted to create a retro-inspired pixel art style, luckly I stumbled upon a greate designer who has made their robot sprite free for anyone, but I had to design tilemap and other assets myself using asprite which was fun✨
Credits🙏
robo pack: https://au-pixel.itch.io/robotbasepack
sound effects: https://itch.io/
soundtrack: https://freesound.org/