Socket.IO bare-bones no-method objects or fully-equipped class-based objects for client updates?
问题 Say I have an array of players in my Node app, each player being an object. Every tick, I send my array to my clients, with Socket.IO. I'm not sure, out of the two following methods, would be the most efficient way of doing this: For each player , I add a basic object to my array, such as {id:1,x:10,y:20,color:"#000000"} . Then I can send the whole array, raw, to my clients. Functions that I need are non-object specific and handle the parsed object. This options is used in this Agar.io clone.