SOCKET LIBRARY
ZIM WITH SOCKET.IO
The ZIM Socket Library works with socket.io to make multiuser games and apps easy to code on the JavaScript Canvas!import zim from "https://zimjs.org/cdn/017/zim_socket";ZIM is a JavaScript framework with many conveniences, components and controls to make games, art, puzzles and more! Welcome socket.io community.
ZIM Socket uses a simple yet powerful multiuser paradigm:
- you send your property Values
{x:10, y:30} - you receive objects of other people's values
{id:{x:20, y:40}, id2:{x:60, y:50}}
FEATURES
Using the technique above, we no longer have to code on the server. ZIM Socket Server handles all. Here are other features of ZIM Socket Client. See the DOCS for info.- APPS AND ROOMS unlimited or max people
- FILL fill in vacated spots or not
- READY event when room assigned
- SEND a property or a data object
- RECEIVE objects of others' data
- CHANGE ROOMS and create new rooms
- OTHERJOIN event when people arrive
- OTHERLEAVE event when people leave
- LAST latest values sent by whom
- HISTORY what happened before joining
- MASTER TIME join and current times
- ERROR event and disconnect event
- SERVER js file for node server
SERVER
You can use ZIM Socket with OUR server or YOU can run ZIM Socket SERVER in NodeJS. If you traditionally use NPM, we suggest that you use your own version of the ZIM Socket Server. Here is a version of ZIM Socket CLIENT on NPM.REQUEST
ZIM also provides a socket server that works on an honour ID system. Please request a single-word name for your app:EXAMPLES
The Avatar example is the most recent and probably handy example. Sockets are the trickiest things to code because you have to handle actions and responses in a single codebase. Expect a good challenge and double the code even for the most simple app!- PATERNOIDS a multiuser unique avatar feature
- AVATAR a basic avatar with motion feature
- MULTIPIXEL A 3D / VR color pixel app!
- GALLERY arrange a gallery with others
- TURNS waiting room and taking turns
- VR STUDIO A 3D / VR example
- MULTIPONG two players and any number viewers
- EGG collective coloring (older code)
- DIAGRAM multiuser e-learning app
- UNLOCKLET multiuser word game
- REMOTE this app gets controlled
- CONTROL this app does the controlling
- CHAT - HTML example
REFERENCE VIDS