Closed supinfo-dev closed 11 years ago
IgeSocketIoComponent uses the socket.io networking library whereas the IgeNetIoComponent uses the net.io networking library.
You can google both to read about them. Socket.io is a third-party networking library that has many features and benefits like support for websockets with automatic fallback on browsers that don't support websockets, handling of large amounts of data in a single send command etc.
Net.io was developed by me and is a very lightweight (and high performance) library that was designed specifically for games. It ONLY has websocket support, does not provide breaking up large data into smaller packets (you should not use it for transferring large amounts of map data all at once for instance as it will not work), but it is significantly faster than socket.io and uses much less bandwidth per packet of data. Socket.io pads all data it sends with lots of extra information which is great for use in something like a chat system but not great for realtime games where every byte counts.
The lowdown is this... if you want to run on all browsers regardless of if they support websockets (all the older shitty ones), need to send large amounts of data without breaking it up into smaller parts then then use socket.io.
If you are building a realtime multiplayer game that needs every last byte to be optimised and accounted for, doesn't intend to send lots of data in a single packet and you don't mind ignoring browsers without websocket support then use Net.io.
I've made both components to be library agnostic so you can write code for one then switch to the other and your code will still work.
that was very clear yet precise, thanks!
I am wondering what is the correct way to handle the addition of the network capabilities to my app.
In the documentation (http://www.isogenicengine.com/documentation/isogenic-game-engine/versions/1-1-0/manual/networking-multiplayer/basic-network-messaging/), it says:
but in many of the examples (i.e the 24.* ones), I see:
What is the difference between the two ?