The company needs to use in the project of developing wechat applet socket.io So write a simple project to practice and get familiar with it socket.io . socket.io It is mainly used for real-time communication between browser and server. Websocket in HTML5 is encapsulated. I don’t want to talk about the details. If you are interested, you can goOfficial websiteTake a look.
node.js + socket.io + js + canvas
git clone https://github.com/XNAL/socketio-gobang cd socketio-gobang npm install node socketServer Use browser to open / public index.html File is enough
- This project is just a simple realization of the function of the war, the page effect of the project is also relatively water (also can see…), the focus of this project is not the effect of the page.
- Need to run at least two pages at the same time to start the game, interested can do their own man-machine combat function.