Hacker News new | past | comments | ask | show | jobs | submit login
TANX: online multiplayer tank battle using WebGL and Node.js (playcanvas.com)
287 points by MayorOfMonkeys on March 27, 2015 | hide | past | favorite | 115 comments



Assuming that it's full of HNers...y'all are terrible at this game. Move and shoot, folks. Move and shoot. Control items.

Jeez, it's like you've never played Quake or Soldat before.


It's very difficult with a touchpad unless one is left handed. Keys on the right, aim on the left: bad for the 90% of us. I should look for my mouse. I know I have one somewhere.


It's not only hard, it's impossible to play with my touchpad. It has some kind of anti-interference detection so that it can't be moved/clicked shortly after typing on the keyboard, "smart-check" they call it. This "feature" can't be turned off completetly! It just has a slider going from min-max where max requires almost one second delay after typing and min only prevents simultaneous motion/typing, which is what you need if you want to move+shoot simultaneously in this game. Lenovo+synaptics crap.


Very difficult with a touchpad. I couldn't hit anything! That's why I have a separate keyboard and mouse for gaming on my MBP.


wasd also works


wasd works


Most of us are using a touchpad :)


This is a big disadvantage


trackball is a bit of a problem - fun game though - f'n andy - shooting someone who isn't moving :)


I think there's a good majority of us who grew up playing RPGs or city-builders. We're unfortunately unaccustomed to the ravages of war... even when it's just war on an internet-based tank game.


I was just kicking some butt in there with the green team.

Wonderful game by the way. However, when the game finishes I get a messy overlay of texts all in one place (assuming it's the name of each member of the team)?


Tiny bug, need to fix it indeed, it shows last player who killed you or something like that. EDIT: fixed


mmmm... soldat


the time when we realise mouse would have done awesome job...



And bolo! http://en.wikipedia.org/wiki/Bolo_%281987_video_game%29

Speaking of which, the Bolo guy went on to do the multicast DNS stuff at apple (Rendezvous/Bonjour/MyMacBook.local). I was just paging through the RFC the other day. Small world!


Ah bolo - so many schooltime lunches engrossed in the magic of network gaming.

It was nice to see it got ported to Windows / Linux too: http://www.winbolo.com/.

And of course, JavaScript: http://stephank.github.io/orona/bolo.html



Yes, it reminded me of it too!


Playcanvas is doing amazing work with WebGL. The Mozilla team showed off a version of this at GDC - https://www.youtube.com/watch?v=dVAw_an6NBQ

Check out the SeeMore demo Will and his team were showing off at GDC - http://malideveloper.arm.com/demo-showroom/gaming/seemoreweb...


I found steering a little confusing since it's not correlated with the current direction of the tank, but still very fun.


Yeah, it seemed especially un-natural for me since I've spent so long playing tanktrouble.com


The shooting is a little weird, I fired several times at a tank, and the bullet went right through him. And other times I fired and completely missed and he got hit.


That's network gaming...


The tanks are also on teams. If you shoot at a tank of your own color, I don't think it's possible to score a hit (no friendly fire).

I played it for about two minutes and I'm hooked. All the upvotes.


A well-written game can account for lag and prevent those kinds of glitches from happening...


There isn't browser support for UDP. This makes glitches much more likely.


There is, you can use WebRTC Data Channels to achieve it. It's not trivial, but it's possible.


WebRTC is not supported by Apple platforms nor by most mobiles where this problem is most visible. Solution would be to have servers on local data centres as well as good implementation of dead reckoning. Although networking code been written in less than 8 hours initially, and since then not reviewed :)


yea the collision detection is off, i was shooting through walls half the time and not the other half. which shows it's not a lag issue.


That is only visual glitch as message of `bullet hit wall` get received a bit later than it actually happens on client. Although it won't hit player behind the wall even if it looks like it will.


The bullets do damage but keep on going.


Was he the same colour as you?


Hey this is awesome! Really love your grid. Any chance you can share with us what frameworks you used? I'm particularly interested in what you used to build your 3d grid.


Thanks. We've used PlayCanvas free tools (editor) and node.js for server-side code. Check out here: https://playcanvas.com/ and source code of client https://playcanvas.com/project/45093/overview/tanx as well as server code: https://github.com/Maksims/tanx


what's the license behind this? can I fork it to create my own spin on it or contribute to this project?


It is MIT, do whatever you want with it. You contributions would be really appreciated! If you have questions, feel free to mail me: core[at]moka.co


I open this (Chrome, Linux 3.18) and just get the two carets on an orange background. WebGL works on other sites. Broken?


Firefox Nightly on Linux, I get this in the console: uncaught exception: Error loading script from 'http://apps.playcanvas.com.s3-website-eu-west-1.amazonaws.co...


Basically when they decided to host it, they forced the tracker "keen" to be used. Its fixed now, but forcing trackers on users seems very negative.


It is free and open project, and made as experiment for users to play. It is reasonable enough to collect simple data about interaction with game, in order to identify how to improve it and get experience that we keen to share with anyone.


I think it's just used to increment a play count.


try disabling adblockers and ghostery etc



Wait, what? Why are there anti-privacy trackers whitelisted?


Indeed, uBlock was the problem. I'll file a bug.


I am using Chrome 42.0.2311.50 beta (64-bit) on Linux 3.19.2 and it works just fine for me.


I had the same problem. I disabled my adblocker (ublock) and then it worked. Using latest stable Chrome under up-to-date Ubuntu.


I needed to disable uBlock to get it working.


Really enjoyed this! Although, I did get killed right away after spawning. Maybe make the spawn zone a temporary safe zone while new players figure out the controls or so current players can't camp out?


Pretty awesome overall, hit detection kind of sucks though. I thought I had to lob my shells at first.

Looks like 60fps, on my new low end Mac Pro. Is there a frame counter?


I was thinking the same thing but I chalked it up to lag.


You can use the browser's built-in framecounter.


Doesn't seem to be loading for me. Just the PlayCanvas logo. Not seeing any errors in JS console. Using Chrome Version 41.0.2272.104 (64-bit).

EDIT: Tried another game from playcanvas.com and I get a banner saying 'This page requires a browser that supports WebGL.' However, it is enabled.

This is just an FYI for the developer, but is probably just a problem on my end.


So, you probably have hardware acceleration turned off in the settings, or else chrome doesn't like your graphics card driver and has disabled webgl. Check chrome://gpu


I was having the same issue. Just turned of AdBlock and it worked.


same for me, chrome v41.0.x on win64


5.4.3.2.1.0 but then nothing happens :(


Try again.


Cool game, but it's hampered by the 3D and controls (tank takes too long to change direction). If this was a 2D top down shooter it would be much better. Everyone playing appeared to be clueless. My last match was 28 kills to 0, 0, 0 before I got a phone call ;)


those glow effects are sweet - the whole thing is inspiring and motivating


Wow, doesn't do anything. All I see is a playing field with the orange rectangle in the center. Wish there was more to it.


Server went down, should be good now :)


Thanks, was down for a long time. Now I have to figure out how to play it. :-)


Damn you, GUEST!


This was fun. The only thing missing was a chat for some smack talk because I just OWNED a couple people.

l2p noobs ;)


Great work! A bit monotonous after about 30 seconds, but definitely a neat demonstration of what can be done ..


This is an amazing experience and a ton of fun.

I loved being instantly put into a game. I was able to immediately recognize that I was on a team and dive face first into the battle.

Sure, the controls and hit detection are a bit flakey, but experiencing this for the first time was a lot of fun. Great job :)


cool graphics - would prefer all keyboard controls


Non US keyboard + trackpad = hopelessly unplayable. Please, needs controller settings :)


The general who is skilled in defense hides in the most secret recesses of the earth

-- Sun Tze

(attack from underneath)


It miss key configuration panel for people who doesn't use qwerty keyboard


The shield is completely OP, camp that and you'll win every match.


My first reaction: This is #@$)(@#, totally $(#)$, hit detection is broken.

That means it's an awesome game, I just hate losing. Congrats to the makers for sinking an hour of my day! ;)


Network lag?


very neat! Love the game! great work!


cheers! what you would love to see in this game implemented?


A chat would be great! And a way to pick our team without creating a stack team, probably balance out the availble spots and restrict stacking.


penalties for team killing


I don't know if the developer has been tinkering with the game since I first played it, but the tanks move at a snail's pace now.


need gamepad control if not implemented already :D


Why do some tanks look much larger than others?


Perspective? :)


Opened this on my iPhone and it started running at 60 FPS with on screen controls and everything. Holy.

Brilliant.


Wow, it's actually pretty fun. Can't wait for the next generation of browser games.


Was the sound flaky for anyone else? It was pretty erratic for me on Firefox on OSX


I cannot go right, is "D" not bound? Where can i configure key binds?


Using a non-US/UK keyboard?


They might have wanted to use 'wsad' for movement rather than arrow keys.


That is much easier to play on the iPhone than on my MacBook with touchpad.


I'm amazed this works great on my iPhone and had great touch controls.


Whats the deal with the flag in the middle, what do you have to do?


It's a shield, gives you extra points to handle damage.


You should have chat


Indeed.. :)


Failed to load resource: net::ERR_INSECURE_RESPONSE ?


It's great fun, good game!


Looks fairly broken to me.


Try again now


Green team rules the day!


Well done. Fun game.


Jeremy and I were carrying the orange team haha fun game!


DAMMIT PANZER!


Awesome!!


Been killing everyone hahahah.


omg, i just owned a bunch of you guys. l2p noobs


holy hell that is one of the most fun multiplayer game I played!

would love to know more about the engine and development process.

this is what games should be. just hop in and play. no bullshit sign in with your facebook or earn dumb achievements or buy textured guns for money etc.


The engine is PlayCanvas. It's an open source game engine. Check out the repo on GitHub here: https://github.com/playcanvas/engine There's high level editor tools (kind of a blend of Google Docs and Unity) here: https://playcanvas.com/


Interesting...so does it only work on modern browsers?


Yes. Most importantly it uses WebGL, which isn't available on any versions of IE before IE11: http://caniuse.com/#feat=webgl

List of officially-supported browsers: http://developer.playcanvas.com/en/user-manual/introduction/...


can I contribute to this game or fork it? God I can't stop playing it!


You can indeed, feel free to do so. Here is source of server side code: https://github.com/Maksims/tanx And here is client side: https://playcanvas.com/project/45093/overview/tanx And my email if you want to contact directly: core[at]moka.co


I played on the blue team for the last 15 minutes or so...one like 10 times

spawn kill is a huge flaw in this game. for example, i just lurk around the spawn and just kill anything..


At last, someone has found a use for the world wide web!


That is very amazing thing to hear.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: