72 comments

[ 3.7 ms ] story [ 171 ms ] thread
If the game doesn't load in Chrome, try using an incognito window since you're probably a Ghostery user. (Sorry, I swear I had fixed that...)
Very cute little game. Quite laggy for me. I used Chrome. Also please add Computer players at some point.
Extremly lagging. Let me guess, Node.js?
TCP.

If you mouseover the tiny, hard-to-see lag meter in your colored square while playing a game you'll be able to see some stats about your connection.

I love this game. It is a themed copy of Hudson Soft's Bomberman game that I originally played on the SNES.

The creators have a blog entry about latency and websockets. With even a minimal amount of packetloss, TCP makes for really bad latency - http://blog.artillery.com/2012/06/websocket-performance.html

It's too bad we won't see any playable twitch games in the browser until there is some way to do UDP. I don't see why browsers don't just allow UDP subject to same origin policy, perhaps only on pages which serve a special "X-Allow-UDP" header.

From what I understand, the only reason browsers shy away from being able to send UDP packets is fear of DDOS. This does not seem to be an issue if packets are only sent to same host that the page is served from.

WebRTC allows for general UDP packets (in the spec at least - haven't tried it in Chrome stable) so hopefully this will be a workable solution as it gets more support.
"The Data Channel API is not implemented and its implementation is being discussed in the standards committee" http://www.webrtc.org/faq-recent-topics

WebRTC is currently some weird wrapper around ICE and nat traversal protocols, not something that seems useful for sending generic javascript-land ArrayBuffers or similar.

Ya this appears to be the achilles heal of WebRTC and I was extremely disappointed (but not surprised) to hear that they chose to go this route of splitting data and media instead of layering media on top of data.

All I can think of is that there might be pressure from media companies and ISPs to block the media or data components.

This has happened before - we have UDP and TCP as independent protocols instead of having TCP built on UDP. This created the mess with firewalls and NAT that we have to live with today.

uTP (micro transport protocol) is a TCP implementation based on UDP. Used by the majority of BitTorrent clients. It seems to work pretty well. It's interesting that you think TCP was a bad idea. Do you have any sources or reading material that you can share?
TCP is ok, but it has a lot of flaws with handshaking and long lag, and also is useless for things like gaming because it can't go through NAT (NAT itself is a disaster too). TCP has created an internet of second class citizens who can only download but can't upload. The worst thing is, IPv6 will repeat all the same mistakes, so I think of it as second class citizen 2.0.

If it were up to me, I would scrap the whole thing, especially the needlessly large UDP and TCP headers, and make a simpler scheme that only contains the destination IP address and maybe a small key that references metadata held in each endpoint's internal state. So the TCP protocol would only exist in each endpoint's TCP stack, not on the wire.

I don't really have any sources, but I lost two years of my life trying to write a windowed reliable transmission scheme over UDP that can punch through firewalls, basically what WebRTC is trying to do, and got thoroughly disillusioned with networking. It just never, ever, ever works 100% reliably, so you end up recreating the work that Skype did if you want a connection as reliable as TCP. I think that says a lot about the miserable state of networking today. I might get down voted for this, but I feel that what I've said is a statement of fact if you look at the hoops that P2P protocols have to go through today. That mess was never the intention of the original network architects (except for admins maintaining corporate firewalls who want their users to be second class citizens, who sadly had a hand in the NAT used in home broadband modems).

(comment deleted)
I didn't have any lag. That was fun, kind of like Bomberman. Nice job!
Would you consider adding on screen controls for tablet users? I'd guess this kind of thing is a better fit for mobile than desktop, but is unusable as is under Android Chrome.
Runs like ass on my nexus 7 and galaxy nexus
I just went on and played against someone called G...Maybe from HN? Anyway, fun game, pretty slick. I'm loving the stuff people are doing with HTML5. Well done!
Great game, well done! Expecting inevitable new features - Facebook integration, leaderboards, powerups, chat, AI....

Good luck

Looks great! would you be supporting full screen support for 1366 x 768 (with no scrollbars)?
Really well done & polished. Had a few moments where the lag made it unbearable but besides that it works as expected.
It gets laggy sometimes and forgets the name you chose (changes it to a color). Still very cool.
This is a great little game. Just played a few rounds and had a blast but hit some nasty lag a few times. The basic game play is quite addictive. Nice job.
i have to ask... pun intended? i used the same wording originally, but revised after i realized what i'd said.
That is amazing.

That said, after the first game it was very laggy.

Bomberman! This is a well done clone. I wish it were a bit smoother. I died because of the lag.
I'm getting these errors in Chrome (v. 22.0.1229.79 m): Unexpected response code: 404 :1 Channel error 'BROWSER_WS_ERROR': 'undefined' __runtime.js:1 Channel 0 closed. __runtime.js:1
Thanks for the report! On it...
All I see is a desert background with nothing happening and "Channel 0 closed." in my js console.
Exact same thing here.
Are you behind a firewall or proxy?
Thanks for the kind words and helpful feedback everyone! We appreciate it!

If you're still having trouble with Chrome or Firefox, please reply below with your browser and version, and possibly with a gist/pastebin of any console errors. Mark and I will get on it.

Regarding the lag: We match you with players based on your latency to each gameserver and the amount of time you've been waiting. If you experienced a lot of lag earlier, it might have been due to there being too few players online. However, 196 people are playing as I type this now, and hopefully there's now enough player density so you'll get matched with a lower-latency player who's nearby.

You can read more on our blog post: http://blog.artillery.com/2012/10/play-powderkeg-html5-multi...

We're also on VentureBeat today: http://venturebeat.com/2012/10/04/artillery-aims-to-make-web...

Also, I'd like to thank our amazing artist, Adam deGrandis. Check out his portfolio — he's incredible: http://www.adamdegrandis.com/portfolio/

<3

Seems like Ghostery is causing problems on Chrome.
Yep. Some of the code assumes the FB global is present, which I thought we had factored out, but apparently didn't.
Sweet game! It's a remake/rip of Bomberman, which is totally awesome because Bomberman is the best game ever.
wow thank you for this. haven't thought about bomberman in years and within 5 seconds i was having a great time.

lag issues ("waiting for other players") and passer-throughs are making it a bit difficult to get a game going though.

edit: this has a few crippling bugs. seems like i have the most trouble after someone leaves a game. also, this desperately needs chat, or voice chat, and a high score. thanks again this is the most fun i've had in a while.

You might want to consider using client-side prediction and lag compensation.

Here's John Carmack describing how he used the aforementioned techniques to make Quake playable over the internet: http://fabiensanglard.net/quakeSource/johnc-log.aug.htm

Here's how Valve do it:

https://developer.valvesoftware.com/wiki/Latency_Compensatin...

And here's another good article on the topic: http://gafferongames.com/networking-for-game-programmers/wha...

Oh, and here's one implementing it with Node / HTML5: http://buildnewgames.com/real-time-multiplayer/

Good luck.

All good links, thanks! We are in fact using client-side prediction and lag compensation. It's extremely difficult to make a perfectly-playable action game with 500ms ping — you'd be kicked off a Quake server with that kind of lag :)

Powderkeg uses lockstep network synchronization and every client sees the same simulation (though the player you control has prediction). The network framerate is 10 FPS and the server waits 2 ticks to collect input, so anyone with more than a 200ms ping to the gameserver will have a less-than-desirable experience.

Apologies! I just read your blog post, and it seems like you're way ahead of me.

How come you decided to send input rather than state to the client?

There's no need to send state if every client runs the same simulation. All you need to do is send every client a frame's worth of input and the frame's number. The gafferongames.com article you posted explains more about it :)
So with your lockstep I presume you're allowing the client to move instantly locally then syncing back with the server? As I'm getting some minor snapbacks (I probably have 200ms+ ping being in Australia) and usually lockstep (for RTS games anyway) doesn't have that and has input delay instead as the client waits for their moves to return from the server.

EDIT: Ah cool I see it's explained in your post: http://blog.artillery.com/2012/10/play-powderkeg-html5-multi...

Yep, the 'snapbacks' you're referring to are a product of the hinting and lag compensation. Right now the "tick lag" which controls this is 200ms — we could raise it to make gameplay smoother but then the snapbacks would be even more egregious.
Is there any way to display ping?

Also perhaps the servers are a bit overloaded? Cause I'm playing from Palo Alto on a decent connection and the lag is making it pretty unplayable.

You can mouseover the tiny lag meter in your info square while playing to see ping stats.

Your connection might be fine, but you might be matched with someone on a less-than-optimal connection.

> Your connection might be fine, but you might be matched with someone on a less-than-optimal connection.

Ahh, the unsolvable problem of lock-step back in action.

Suboptimal, not unsolvable. There are a handful of ways we can — and, after today's feedback, will — improve the experience.
I'm playing from Aus, and yeah there are slight snapbacks but it's completely playable (and quite fun).
Aus here. Too much lag on movement for me to be playable.
Your licenses page (http://powderkeg.artillery.com/attribution.html) is down and otherwise, there's no reference to Bomberman here at all.

It's a well-executed game though. Haven't found any flaws, but I can't really say it's original. Good proof-of-concept for HTML5!

Whoops! Fixing that broken link now. Thanks!
Unplayable ("Waiting for other players").
Nice, just beat someone named DJ.
I visited the site using Firefox Nightly and it said: "Powderkeg can't run on your browser. Would you mind coming back with either Google Chrome or Firefox?".
You mean, something about the absolute, bleeding-edge version of Firefox causes it not to work? ;)

Kidding aside, I'll take a look. What OS?

Unplayably laggy over here. I really wanted to like it, but it's so slow.