New answers tagged

1

The server receives the connect event when the client connects to the socket.io server. At this point, you can implement a simple verification to make sure that the person connected is supposed to be using your application. To do so, the next event the client must send is a sign in event with some credentials (a token, for example). You can then validate ...


0

After a bit of a research regarding Socket.io I realised you can control the origin that is connecting to your game (The Client) using the origin option, you can read about it over here - Socket.IO server API. if I understood you correctly you wish to control the connections and you want to accept connections only from a specific uri (correct me if i'm ...


1

If you have access to the box you're connecting to, couldn't you add a firewall policy to only allow a specific domain? If you don't have access to the box directly, perhaps whatever hosting service you're using allows some form of firewall control for access to your endpoint? As far as I know, that's the only way to truly prevent connections. There are ...


0

I'm guessing your using plain Javascript with no engine. You could just hold off drawing your objects to the screen. If you put all of your game objects in a function then you could hold of rendering them until someone click continue. After that condition is met then the render of all your object can happen. There you go. A nice simple start menu. Was this ...


0

Well, that's a tricky question but i'll start from the begining. Get/Put imageData is faster than you think, but if you want to do it in a efficient way i'd recomend you to build a double buffer and rasterize your shapes in it (here's a double buffer module i wrote, have a peek). Estrange shapes' shadowing is as hard to do as rectangles shadowing, you only ...


0

Change the order in layer on the canvas to -1.



Top 50 recent answers are included