3 ms·
Effective use of Node.js and Socket.io for building a HTML5 Game
- pyrotechnick 15y agoTo install socket.io you need only execute `npm install socket.io` This installs socket.io from the npm registry (there is no need to download/extract the zip).
- latch 15y ago-g if you want to make it globally accessible.
- majke 15y agoYeah, but there is not much value in installing socket.io globally, as you can't require() it. It makes sense only for executables like coffee-script http://npmjs.org/doc/faq.html#I-installed-something-globally-but-I-can-t-require-it http://npmjs.org/doc/faq.html#I-installed-something-globally...
- ecto 15y agoYou can definitely require() modules after installing them globally. https://github.com/joyent/node/blob/master/lib/module.js https://github.com/joyent/node/blob/master/lib/module.js
- dinedal 15y agoBuried source as a mediafire link? Author needs to learn about github. Code itself is pretty difficult to read and quickly pasted together, but otherwise a decent example on how to tie the technologies involved together.
- egdelwonk 15y agoCheck out now.js (http://nowjs.com/ http://nowjs.com/) as well, makes it really easy to make realtime apps
- kodablah 15y agoIf you want to make this easy, use https://github.com/socketstream/socketstream https://github.com/socketstream/socketstream. Great progress is being made on the 0.3 version and it makes pub/sub broadcasting and message pushing very easy. You wouldn't be the first person to make a live multiplayer HTML5 game with it: https://github.com/alz/socketracer https://github.com/alz/socketracer.