I am designing an multiplayer on-line model of a phrase board recreation (variety like Scrabble) utilizing Node.js together with socket.io and specific however I have no idea which is the optimum strategy to deal with the replace package deal.
The sport has no graphics other than HTML components and a pair of images, so nothing to be rendered. The info transmitted to the server are mainly the phrases every participant writes/makes use of in every flip, which I save within the server facet simply in case any participant disconnects and re-connect into the sport.
Proper know I used to be updating the sport for every consumer so solely “new phrases” are despatched within the replace package deal. So, if a participant inputted three phrases, I save them within the server and they’re despatched to the opposite gamers within the replace package deal.
However in line with some pc science buddies I ought to resend each phrase used within the recreation each X time to make sure that all gamers see the identical recreation. So not an replace package deal however a type of “entire recreation” package deal.
Might you give me any opinions/reasonings? I get that my recreation is not notably data-demanding and that any browser will have the ability to deal with, as an instance, packages of 40 phrases each X ms, however that does not imply it is optimum/environment friendly. Nonetheless, I get the thought of “ship every thing each ‘refresh’ to make sure all participant see the identical recreation” however nonetheless, feels off to me.