Real-time gameplay with Colyseus

Solution retrospective
To make the project more interesting, I've added a few extra features:
- Single-player mode with Bot: Implemented using the Minimax algorithm
- Multiplayer mode: Real-time competition powered by Colyseus.
Challenges encountered with AI:
-
Complex Logic & Edge Cases: When the logic became complex (e.g., handling user disconnections, redesigning server state, providing proper UI hints, or managing async side effects on the frontend), the AI didn't do so well. I found it necessary to think through the edge cases myself and decide on the best user experience.
-
Outdated Packages: While setting up Colyseus, the AI fell into an infinite loop trying to use the deprecated
colyseus.jspackage. Instead, I usednpm create colyseus-app@latest ./serverbased on the official documentation, and manually edited the files step-by-step before integrating with the Angular client. -
Testing Constraints: Writing E2E or Unit tests with AI still requires careful review. Although AI writes code quickly, it doesn't always reflect a true double-check for edge cases or real user expectations. Relying on official documentation is still the best practice here.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Chiou Jia Sheng’s solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord