RoboVerse is an innovative 3D robot-themed web game that combines creative building mechanics with strategic battle gameplay. Players can design their own unique robots through an intuitive customization system, selecting different heads, bodies, arms, and legs - each affecting the robot's capabilities in battle.
This was my introduction to vibecoding, letting copilot do most of the work.
Originally designed to run on ECS using an autoscaling group, I shifted the architecture to instead use SAE in an effort to optimize costs, based on the understanding that I didn't need instances running all the time as users would be inconsistent. All architecture is implemented via IAC using terraform, so that it's easy stand-up in another account as needed. Some challenges I had included activating each individual service before I was able to use it via terraform, but the support staff was very quick to help me resolve any issues. I had a little trouble with getting my custom domain to work with the CDN because of some built in blacklisting they have, and also because Cloudflare offers up edge tls for free, but only if you use it as a proxy and not a straight cname dns. This made things a little wonky with domain validation for the CDN, and I didn't want to have to pay for https traffic through the CDN, so I had to do a couple steps to resolve that.
SAE System Components
Content Delivery Network (CDN)
Global distribution of static assets
Reduced latency for textures, models and scripts
Optimized caching policies for different file types
HTTPS and HTTP/2 support
Serverless App Engine (SAE)
Auto-scaling Node.js applications
Built-in load balancing
Zero infrastructure management
Pay-per-use model
Object Storage Service (OSS)
Game assets storage
Player save data
Origin server for CDN
ApsaraDB RDS (MySQL)
Player profiles
Leaderboard data
Game statistics
Container Registry
Application container images
Automated deployment pipeline
Security Components
RAM for access control
VPC security groups
SSL/TLS encryption
SAE Monthly Cost Estimation (100 Active Users)
Based on Alibaba Cloud pricing in US West 1 region (Silicon Valley):
Serverless App Engine
vCPU usage: $25.20/month (0.5 vCPU × 720 hours)
Memory usage: $12.60/month (1GB × 720 hours)
Request processing: ~$8/month
ApsaraDB RDS (MySQL)
RDS.MySQL.s1.small: $34.50/month
Storage (20GB): $2.76/month
Object Storage
Storage (estimated 50GB): $1.15/month
Requests and bandwidth: ~$3/month
Container Registry
Basic instance: Free
Storage: ~$1/month
Data Transfer
Internal: Free
Internet outbound: ~$10/month
Total Estimated Monthly Cost: $98.21
Note: This represents approximately 29% cost savings compared to the ECS-based architecture. Costs may vary based on actual usage patterns, data transfer, and storage needs. The serverless model ensures you only pay for actual resource consumption.
Cost Optimization Tips
Use reserved instances for the base ECS instance to save 30%
Looks awesome!