18 ms·
Bomberman massively multiplayer in HTML5
- ZeroGravitas 14y agoThis is what I imagine when I hear HTML5 gaming. Just like "fun" on a PC looks different from "fun" on a console, and even more so from "fun" on a Wii, or a DS or an iPhone, "fun" on the web needs to take advantage of the nature of the medium.
- purplelobster 14y agoIn my opinion, HTML5 games (and apps) have a few key advantages that people on here would like to conveniently leave out (I COULD PLAY THIS ON PENTIUM 100MHZ etc...). 1. Accessibility. It never get's easier than typing in a URL. It's so easy that I can get my grandmother to play. At every step on the way to the game you will lose people. download Steam -> download game -> wait for download -> click on game. You've lost 90% of people right there. Being able to spread a link can create a much bigger viral effect as well. 2. Cloud based means that you can continue your game literally anywhere. I switch computers all the time, but every computer, phone or tablet has a browser, so there is no barrier to playing on them. 3. Cloud based also means that multi-player come naturally. You already have a server to serve the game, so the step to including multi-player is small. 4. Instant updates. Invalidate the cache and BAM, the user has the latest version of the game. This allows for some seriously fast iteration. 5. No walled garden app store 30% cut crap. Host your own servers and you're free from all that. Users might not find your app like they do through those app stores, but when a game is available directly through a link, do you really need app stores for discoverability? Shouldn't forums and review sites and whatnot take care of that?
- catshirt 14y ago"In my opinion, HTML5 games (and apps) have a few key advantages that people on here would like to conveniently leave out (I COULD PLAY THIS ON PENTIUM 100MHZ etc...)." you sure about that? also, none (with the exception of maybe the "walled garden" argument) of those benefits are exclusive to html 5 or the web in general.
- shocks 14y agoI wonder what they're doing about cheating? I guess this type of game is not so easy to 'cheat' with but I'm sure it is possible. I was thinking about building an Unreal Tournament clone in WebGL, but I'm still not sure what to do about cheating.
- Drakim 14y agoThis is not a problem specific to HTML5. Although it's a lot harder to mess with a binary than some JavaScript, everything that runs on client side is fundamentally compromised and untrustworthy. The trick is to have as many checks and balances on the server side as possible (to prevent walking though walls, warping, etc).
- shocks 14y agoVery true, however I am not aware of a specification that, for example, makes it easy to check the scripts/resources that are being used are the correct ones. Of course any system to do this can be broken, but it strikes me a much bigger problem with Javascript in the browser than a binary. One idea that's just crossed my mind is the idea of serving different Javascript to each client? It could be obfuscated uniquely every time someone loads the page in a detectable way. I,e you can serve IP x.x.x.x with obfuscation seed y and then you know to expect a certain behaviour. Variables and program flow can be changed to confuse nieve would be hackers, but important the structure of the network communication can be changed in a subtle way. Any hack scripts would need to counter for this which would make things far more complicated. I wish my university term would be over so I can start hacking away on this idea! :)
- entropy_ 14y agoYou will still fail to prevent cheaters using an approach like this one. Even a game that is only distributed as a binary but with no or few checks on the server for cheating will be compromised very fast. It only takes one person to figure out how to do it and then release a proof of concept. It is, in fact, not a bigger problem if the code is readily readable. Someone with the technical chops to read the source code and figure out weaknesses that can be exploited for cheating wouldn't be stumped by a binary blob for very long. My usual approach when trying to figure out "cheats" for most such things is to bypass the client altogether and analyse the network traffic to figure out the underlying protocol. Then come up with a client that reproduces those(simple replay attacks at first to see what works and what doesn't) and as my understanding of what does what evolves make it more sophisticated and flexible. Having your source code fully available to any would-be attacker will force you to not make the mistake of hoping that nobody figures out how things work to be able to attack you. It forces you to pay attention to server-side checks to enforce the constraints of your game(what? that guy just changed his position in a way that's way too fast? not possible!).
- oceanician 14y agoThis is fantastic. Thanks :)
- wasif_hyder 14y agoBeyond fantastic. I could just hug whoever made it!
- marvwhere 14y agoman that is really fun!! we did a bomberman on a hackerthon, but only for 4 people each time, i like the mass multiplayer idea... are u planing to put it on github? will be awesome to host in our own server to play against company people only
- yskchu 14y agoThanks for sharing, brings back good memories...
- basicallydan 14y agoHonestly, not only is this incredibly fun but also really innovative and clever. Well done.
- friendly_chap 14y agoQuick, everyone come up with the HN nicks so we can resolve the disputes there!
- jbrooksuk 14y agoI grabbed jbrooksuk because I use that everywhere.
- swah 14y agoI'd love to know how was AngularJS used in this app: not the kind of app I imagined AngularJS would be helpful in writing!
- ivanpopelyshev 14y agoUI. Scoreboards, Chat, Single Page Application.
- bayesianhorse 14y agoActually, this is what I believe is the place of Go (the language) in HTML5 programming. I don't know if this was done with Go on the server side, might as well be node or gevent, but Go would be faster and easier to build a multithreaded game server with.
- robotmay 14y agoI've been fancying building a game with Go + JS. I only have 2 problems: 1: I can't think of a game 2: Most JS libraries/frameworks drive me nuts. However there are quite a few decent looking JS game frameworks about. Are there any recommendations?
- pkorzeniewski 14y agoTurbulenz[1] looks very promising and their framework[2] seems to be quite advanced, well thought out with a really nice documentation. [1] https://turbulenz.com/ https://turbulenz.com/ [2] http://biz.turbulenz.com/developers http://biz.turbulenz.com/developers
- robotmay 14y agoWow no kidding; I hadn't come across that one and it does look pretty swish.
- austinhallock 14y agoNot for building the games themselves, but Clay.io hopefully won't drive you nuts on the higher level features like user accounts, leaderboards, achievements, payments, etc... http://clay.io/docs http://clay.io/docs
- krsunny 14y agohttp://www.isogenicengine.com/ http://www.isogenicengine.com/
- Jare 14y agoI agree that Go is a fantastic language for writing servers that need both CPU performance and responsively handle many connections. That said, if you write the server in Node then you can share some of the logic between client and server without having to rewrite in another language. Examples where this comes handy in games: - If the server runs the logic authoritatively, the client can run part of that logic locally to hide lag. - If the logic runs on the client, the server can run part of that logic to catch impossible actions and detect cheating attempts.
- jader201 14y agoI upvoted this because it is awesome, and it is, well... Bomberman. But I'm genuinely curious: at what point will we stop being fascinated by what can be done in HTML5, and actually start focusing more on what is actually being done -- regardless of the technology used. Or to put it another way: when will HTML5 games stop feeling like HTML5 games? For example, if this were on a console, I think it would still be cool, but it's lacking a certain "game" feel to it. It still feels like playing an old school game on a PC keyboard, and there still seems to be a sort of keyboard-to-response latency that I find in most HTML5 games. Not to mention, no music/sound. Again, I'm not knocking it for the effort. I still think it's pretty dang fun, even for an HTML5 game. But it still feels like an HTML5 game.
- kerno 14y agoThis is how we get there. HTML5 is pretty fresh and it's games like this that let us understand it's capabilities and to improve upon them. I mean, this is a mini MMO implemented in HTML5. That's a pretty big step forward from Pacman in HTML5 already.
- jader201 14y agoYeah, I definitely agree that this is a big step from anything I've seen thus far. This was more to kick off a discussion about "are we there yet?", and if not, what is still missing? I mean, I know what I think is missing, but I've not tried building HTML5 games to understand if HTML5 is the bottleneck, or if other dependencies are the bottleneck.
- MrScruff 14y agoPerhaps what's missing is a good reason for choosing HTML5 over traditional technologies when you're investing in a new project. Pros: Runtime is very widely available Cons: Relatively poor performance Monetization strategy is not clear Browser differences increase cost of development
- jiggy2011 14y ago
- jiggy2011 14y agoOh god, have work to do. Must resist urge to waste entire afternoon.. One thing that always seems to be missing from these web games is support for gamepads for that authentic console experience however.
- slantyyz 14y agoYou can usually get around that by using a joystick to keyboard mapper. I usually use Joystick Mapper on Mac and JoyToKey on Windows. Now you can waste your entire afternoon!
- dreen 14y agothis is a pc game, and an mmo as well, why would you want to play with a gamepad? besides you could say the same about any pc version of bomberman ever made, i doubt any of them had gamepad support, because people rarely use gamepads on pc.
- jiggy2011 14y agoIt's a console game at heart though, my earliest games of bomberman were on the SNES I believe. It just has much better feel on a gamepad. There are also APIs in browsers to support gamepads now. There are quite a few PC games with gamepad support, about half of the games on my Steam list are playable with a gamepad.
- fawx 14y agosoon: https://wiki.mozilla.org/GamepadAPI https://wiki.mozilla.org/GamepadAPI
- muloka 14y agoI agree. Though my friends and I would play this game so intensely that we'd bust through a few gamepads. Hopefully I don't do the same to my keyboard.
- city41 14y agoGame pad support is in a bit of flux in browsers. I added game pad support to a game jam game I made[0] but only for Chrome and possibly only the Xbox 360 game pad works properly. A project I plan to tackle soon is really good game pad support for browser games. [0] http://city41.github.com/cellmates http://city41.github.com/cellmates -- use chrome and plug in a game pad, likely need to push a button on the pad for if to "wake up". Ugly, simple game as it was written in about 14 hours.
- tferris 14y agoDefinitely the best browser multiplayer game ever. And nice to see that it's build on Node (among other tech).
- deleted 14y ago[deleted]
- neya 14y ago"How the fack?" was my first reaction..Because this is so awesome! Revives old memories, yet also seems really fun (especially when you try to bomb others)!! A few questions: 1) What backend technology do they use for real-time and concurrency? Node.js?? Scala?? 2) How does one update the players' real time positions/actions?? If someone could shed some light on these questions, it would be so freakin awesome!!
- Thaxll 14y ago1) They're using HaProxy + probably NodeJs ( i'm 99% sure )
- ivanpopelyshev 14y ago1) HaProxy + Jetty 2) very tricky. I will write an article on this topic.
- neya 14y agoThank you :)
- hkmurakami 14y agoWhat I found interesting is that when you "scale" a game from n < 8'ish players to n > 10 players and make it MMO style and continuously running, the strength disparity between the players who have been alive for quite some time and the "newly spawned" players becomes so large that a Quake/TF2-like system where players can instantly become "fully buffed" (by picking up an uber gun, for instance) becomes necessary. Furthermore, I think an interesting game design challenge is what we can introduce to these scaled up games to make the psychological rewards enticing enough to have players keep playing. After the nostalgia feeling wore off after a few minutes, I personally no longer really felt like continuing to play since it was going to be the same stuff over and over again without much variability or depth.
- rplnt 14y agoIt's not continuously running. There are rounds.
- hkmurakami 14y agooh oops I guess I quit too fast T_T
- asc76 14y agoVery impressive.
- rartichoke 14y agoThe game is back to working now. Really solid job man. It's really smooth in Chrome on my low end desktop. My only concern is that there's no client side prediction for movement? Every input key feels delayed by my ping and is most noticeable when moving diagonally by pressing 2 keys at once.
- dylanz 14y agoIt's cool to see AngularJS was used for the templating engine. I'd be curious to see how deeply it's being used.
- kayoone 14y agoThis excites us developers, but sadly the gamers couldnt care less. Sure it doesnt require a plugin, but thats not really a dealbreaker for most web gamers.
- Buzaga 14y agoI think you haven't given it a good look, this game is SOLID, awesome and fun Yesterday I've played it for like 3 hours straight and had a blast, gamers will care(and are probably already caring since the servers are full) because it's fun and that's it
- deanclatworthy 14y agoUndoubtedly the most fun I've had with one of these HTML5 games. Does anyone have any resources on how to keep clients in sync without lag?
- ssewell 14y agoWho's up for massively multiplayer Double Dragon?
- muyuu 14y agoLooks like their servers cannot deal with the onslaught... I love Bomberman. Looking forward to try it.
- deleted 14y ago[deleted]
- itsbits 14y agoawesome game...wat did the developer use for realtime updates??
- ivanpopelyshev 14y agoWebSockets
- itsbits 14y agocant we see those requests in Chrome Inspector tool???
- madsushi 14y agoI closed the window on myself a few times with CTRL+W, whoops.
- rttlesnke 14y agoSame here! >.<
- mceoin 14y agoTHIS IS HECTIC!!!
- jamieb 14y agoAwesome, but one exploit makes it less fun: Smart players who are trapped by a foe are dropping their own bombs so that the foe doesn't get the kill. I blocked a player in an alley. Right before he died he dropped his own bomb. I got no point for the kill. That means any skilled player can prevent anyone from scoring points for killing them. The solution is to use a kill chain. When a bomb kills a player, look to see if that bomb was detonated by another bomb. Keep going until you find a bomb that is not owned by the dead player. That owner gets the kill.
- ivanpopelyshev 14y agoWe're using kill chain :)
- sairamkunala 14y agoIts eating up my CPU . The problem is that its an addictive game so far. Levels getting reset with the pac man is hilarious !
- ivanpopelyshev 14y agoI'll enable webgl renderer ASAP. At this moment it have some bugs.
- FreshCode 14y agoWell, there goes my evening. What stack is this built on?
- inspiredworlds 14y agoAwesome! Loved this game on Super Nintendo!
- deleted 14y ago[deleted]
- njx 14y agoAwesome, I had once developed a bomberman clone for palm pilot. Here is what HN users have commented on your game http://www.infocaptor.com/bubble_viz/newsycombinatorcomitemid5291843.html http://www.infocaptor.com/bubble_viz/newsycombinatorcomitemi...
- sukuriant 14y agoThe langoliers are a nice addition to the game, I have to say. http://en.wikipedia.org/wiki/The_Langoliers http://en.wikipedia.org/wiki/The_Langoliers (the pac-man type things eating up the level near the end of a round)
- ateev 14y agoThis is addictive!
- BklynJay 14y agoIt is impossible to love more than I love this right now.
- darkedge3 14y agoAwesome!
- ivanpopelyshev 14y agoPardon my English. Team consists of two programmers and four helpers, we live in different cities near Moscow. I started developing the game in April, published link at habrahabr.ru and since then i'm optimizing network and rendering. We were preparing for Mozilla GameOn, posted a link to /r/webgames, it became viral. We're in shock :) Game Core: Pure Java. Game Client: cross-compiled with GWT. Angular.js for UI (scoreboard, chat). Game Server: Haproxy -> Jetty Web backend: nginx -> node.js Servers are hosted in cloud and begin to slow down after 800 players. We'll rent dedicated servers to archieve 1500 players on a map. P.S. Langoliers are eating the time you spent in bombermine.
- irahul 14y agoWhat are you serving with node? Chat?
- jiggy2011 14y agoI assume he means that node + nginx runs the game at the HTTP level but the actual game engine and logic are in Java.
- rartichoke 14y agoBut wouldn't the game just be connected straight to Java over websocket once the client has been paired to the server? From the looks of it I don't think they are using Node for anything related to the game itself. At best it might be used to pair a client to a server but that's basically nothing.
- jiggy2011 14y agoNot really sure, perhaps the game itself isn't web-aware and they just use node.js to pull messages in and out because it is fast? Will have to see if Ivan replies to know for sure. :)
- ivanpopelyshev 14y ago
- sshillo 14y agoI think it just broke. The game just froze.
- DoublePlusWill 14y agoBroken here too. It's interesting. Even though the game is frozen and won't let me start playing the ping times and times till the server's refresh still updates.
- martinced 14y agoOK, so how many pixels / sprites can I push per frame (and at which framerate ; ) on this HMTL5 thinggy? Btw I was eating mode 7 for breakfast on the SNES and ruling the Amiga co-processors (eg to do copper bars), so I happen to know a thing or two about very nifty optimization that can be used in games. I'm pretty sure a few old dogs could teach some young monkeys a few tricks in this HTML5 thing...
- sukuriant 14y agoThe play button seems to have stopped working; and the number of players seems to be shrinking slowly. Something broke?
- chm 14y agoStill not working at 12:52 AM ET.
- orangethirty 14y agoWhy aren't you taking payments yet?
- aren55555 14y agoThis made my day.
- Maven911 14y agowhat other games are out there that are as neat as this ?
- ivanpopelyshev 14y agoWe got 1500 players at US Public Server #1. 100kbit/s per user, i'm gonna optimize it.
- jqquah 14y agoThis is my first comment ever on HN and this is AWESOME!
- tcohen 14y agoThis is an amazing game! Such good memories.
- deleted 14y ago[deleted]
- zoobert 14y agoReally well done. Love it I am 13 again !!
- phaikawl 14y agoGreat idea but it lags so much on my machine.
- jader201 14y agoAm I the only one seeing: > Disconnected from server... UPDATE: This had something to do with my login. I just logged out and back in, and was able to get in.
- qoo 14y agoThe bomb! Great game and great execution! Kudos to the Bombermine team.
- deleted 14y ago[deleted]
- alexkus 14y agoServer has been bombed it seems. All game servers dead. No idea whether it was HN related or a separate issue.
- jbrooksuk 14y agoI see what you did there!
- petercooper 14y agoIt did well on Reddit a couple of days ago, well on Twitter yesterday, so I think it's spread around quite a bit and picking up traffic from all over.
- vincentperes 14y agonooooo, don't post this kind of link here!! my working day is over ;)
- jbrooksuk 14y agoThis such a great example displaying the power of HTML5. I'm going to be playing this quite a lot! Is this going to be open sourced any time? It'd be neat to see how this works on the server etc.
- kerno 14y agoAaaaand it's midnight and I'm meant to have written a 1,000 word post.
- Kartificial 14y agoThe workspace has been shutdown here, too many bombermen.
- sk3tch 14y agoAnyone got any background on the backend tech involved?
- sk3tch 14y agoAnswering my own question but: >Thanks :) Follow us @bombermine — we have plans to write an article about how game works. In few words: java, jetty, gwt, javascript, node.js, html5 [1] [1] http://www.reddit.com/r/WebGames/comments/199urs/bombermine_html5_mmo_bomberman_with_hundreds_of/c8m8j6h http://www.reddit.com/r/WebGames/comments/199urs/bombermine_...
- rartichoke 14y agoI wonder what parts of their code is using Java. Really looking forward to reading that upcoming article.
- deleted 14y ago[deleted]
- afshinmeh 14y agoAll servers are down.
- sgt 14y agoMassively so.
- wodow 14y agoIt's working ok in the EU!