Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Interesting. Could you talk more about this?


view as:

Will do when this is over. Right now I'm trying to prevent servers from melting. HN traffic...

You've done a great job! It's stayed very responsive for the time I've played. I haven't even noticed any dropped packets, so your method for dealing with them seems to be working very well despite the high load.

Nothing too fancy. Just proper devops and a lot of testing.

https://i.imgur.com/oSwGgFA.png


Where are you hosting it? That looks quite custom to gaming

It better be! It's my homegrown panel that I use for all my projects.

I would love to hear more about this dashboard in your write up. Would love to create something like this myself :)

Do you have a blog or write ups about this process / your workflow / etc.? I feel as a novice I could learn a lot.

That is fancy. It is actually so beautiful I got emotional.

THE comboy of bitcoinity fame? I'm honored.

I remember donating back in the day!


Huh wow, thanks :) I need to make bitcoinity working as stable as airma.sh does. Congrats on the well earned success btw, clearly the game is here to stay.

It would be sweet to be able to change fire from spacebar to something else. Spacebar tends to be big and loud.


Is it an home made dashboard or do you use some standard tool?

Great job with the Game. Would love to read an article about how you developed this game and handled initial traffic.

Really looking forward to a write-up!

Would be nice to know what you use for hit detection and interpolation, it seems very smooth!

Also want to show appreciation for your work.

I tried to create a game similar to this (I spent 6 months on it). Very basic Geometry. Circles. I got the concept working well locally, but I ran into problems on how to deal with the networking. I got things running in Node with SocketIO and so on but there could be 400 players, each made of upto 8 moving pieces, and each can fire several times a second.

I spent a lot of time on a book, "Real time collision detection" and generally I have fond memories of the whole project and trying different partition and slicing up space.

However, how to package and deal with this snapshot of world "over the network" or for example "how to smooth any lag relative to the client"... this middle region was largely undocumented or ill accessible to me.

I will look forward to when/if you write any thoughts.


I will definitely do a write-up but you're right. It's really hard to find info on any of that online.

A lot of trial and error.


I am still playing :D

Do you have a blog? Been visiting this daily to see if there's a new update about the write up on networking trial errors. :)

Fantastic game. Enjoyable, simple. Wish you all the best with it. Thank you for your outstanding work

(Not OP but I had the same idea)

When a packet is lost in a TCP stream, it must be retransmitted, and until the client receives it, all further packets are stuck in limbo (received by the client, but cannot be seen). For this reason, most games use UDP instead, and are designed so some packet loss is acceptable (if I received where you are at frame N, it no longer matters if I receive where you were at frame N-1).

Minecraft uses TCP, that's why in very populated servers occasionally you can see the whole world freeze for a second.

In the browser we have UDP with WebRTC data, the problem is that not all browsers support it, it may not work in some places and for now it's more difficult to work with.

An easy compromise is to use several TCP connections, so if one packet is lost, instead of having N packets stuck for a moment, you have 1/N where N is the number of connections. And if important packets are sent through all channels, the chance that they arrive too late is much lower.


Do both websocket connections send the same data, or do you split your data logically between two channels (movement data vs state data)

I interleave information that becomes redundant (like the position of players, I can handle losing every other packet for a while, interpolating/predicting missing info) but send important data in all channels (like when a rocket is fired, it's just one event that must be seen).

Again, I'm not OP but I did similar things and explained what probably happens with this game.


What DiThi said (read his excellent post)

There's also another important detail. Due to delayed ACKs on Windows and battery-preserving TCP stacks on most mobile devices/laptops, some of your packets will be delayed. Even with TCP_NODELAY. Desktop OSX/Linux do not display this behavior.

The only solution I have found, and it's a rather crude one, is to blast the server every 50ms with a 1-byte packet. It is ugly but it works well.


Legal | privacy