# 使用nodejs结合websocket实现网络联机游戏 **Repository Path**: cocos_creater_projects/online-gaming ## Basic Information - **Project Name**: 使用nodejs结合websocket实现网络联机游戏 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-25 - **Last Updated**: 2025-03-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Cocos Creator、Node.js、实时对战、IO、帧同步 A multiplayer game demo using Cocos Creator 3.8.3 and Node.js with WebSocket. ## Prerequisites - Node.js = 20.18.0 - yarn = 1.22.22 - Cocos Creator 3.8.3 ## Project Structure ``` apps/ ├── client/ # Cocos Creator 3.8.3 game client └── server/ # Node.js WebSocket server ``` ## Development 1. Install dependencies: ```bash yarn ``` 2. Start the server: ```bash yarn dev ``` 3. Open the client project: - Open Cocos Creator 3.8.3 - Open the `apps/client` folder as a project - Click the "Play" button to run the game ## Scripts - `yarn dev:server` - Start the development server - `yarn dev:client` - Show instructions for running the client - `yarn dev` - Alias for dev:server