I’m working on a game which would be hosted on a local network, but played as a HTML5 game. I’ve got a small server running on the LAN (which serves the game), and want to monitor player’s scores when they die in this (single player) game. I’ve been thinking about ways to do this, but figured before I jump in and start making things I should check with you guys what would be a recommended approach.
I effectively want the server to maintain a highscore of all games which were played on that LAN.
HI @SpencerWF!
Regarding the socket-way of doing it, we recently released a new extension-websocket that should work well to send messages to/from your server.
Thank you for linking that Mathias, I’ll have a look. I haven’t looked at this kind of thing before and I want to ensure that people can’t fake a high-score by viewing their client-side page and sending a socket message directly, do you have any recommendations on ensuring that can’t happen? I thought potentially the defold html5-build process would limit a viewer from being able to dig through the code, is this the case?
I use Colyseus for the multiplayer games I have worked on (which is authoritative), I could just use it for the single-player games and use a very limited subsect of the features of Colyseus. Would that be one of the few potential mitigations? Thank you for the helpful answers Britzl and Mathias.
I seem to have an issue with Colyseus and Defold, it appears that the “/websocket/client_async.lua” can’t be found, and I was hoping to get an idea from you if the latest update could have caused this issue? (It built fine just before I updated Defold, 1.2.174)