基于Node + Express + MongoDB的实时多人游戏国际象棋服务器:
jopen
10年前
ChessHub.io是一个尝试使用以下技术,开发一个不平凡的实时多人游戏Web应用程序。
Client side
- HTML5, CSS3, 推ter bootstrap and Font awesome to make a nice looking UI
- JQuery combined with the inevitable Javascript utilities (Lodash, Moment.js, Messenger.js and Highcharts) for client side logic
- Socket.io client to make real time gaming possible
- Chess.js and Chessboard.js for everything related to chess
Server side
- Node JS as Web server
- Express JS as Web framework
- Passport JS as authentication middleware
- Socket.io server to make real time gaming possible
- Handlebars.js to easily render HTML templates
- Mongo DB along with Mongoose
游戏逻辑
ChessHub.io uses a simple gaming sequence through Socket.io that works for 2+ players. Here is a simplified diagram of most relevant events:
Screen shots
Home page
Playing chess in real time
Watch live game
Real time monitoring dashboard