I defeated the dishes.

Later that night as I was gathering the dishes they said to me, you will never defeat me

Advertisements

It will now fail automatically…

I decided what I really needed in my networking code is more failure. Just when I think that the code is working perfectly it likes to show me that I’m wrong.

For instance, just the other day, I tested and found it perfect on my computer. I introduced a laptop for some wire distance and presto! Nothing worked at all.

So I’m adding a little evil into my networking code to create arbitrary random delays for every packet sent.

I’m an evil genius!
//giphy.com/embed/rsxjVV3hJAzf2?html5=true

So now I’m testing out of the box with really awful network conditions.

It is probably for the best.

Next I think I’ll make it randomly¬†kill packets, just for fun.

Node UDP

I discovered that Node has a Buffer object and the web has a buffer object and they aren’t the same. I was having issues with my webpack build because the UDP transport i’m using directly imports dgram

I changed webpack to package for “node” because electron apps can do that. It seems to be working now so hopefully that’s the end of that.

Man, i feel like i threw out a bunch of buzzwords.

Here is some yummy food to compensate

That’s from my families last culinary challenge. I won by the way. I had to use charcoal salt but it turned out to taste pretty awesome.

Networking Tests

It’s taken a long time, but I finally created a set of unit tests for the game networking.

I decided that baseline networking should go in a game plugin (so I could opt to remove it for other games and still use the same game engine).

Thusly the NetworkingPlugin is tasked with:

  1. connecting with a server / keeping connections with clients
  2. keeps game sprites up to date

So for #1 it has some features like auto disconnect for stale clients, and heartbeats for current clients.

For #2 it just listens to the game timeline and reports any changes