Jump to content

[PlayCanvas] TANX


mrmaxm
 Share

Recommended Posts

TANX

Tech: PlayCanvas, NodeJS, VanillaJS

Play Now!

Online, multiplayer tank battle game.
Battle opponents from across the world.
The first team to destroy 32 enemy tanks wins the game!
Play on mobile or desktop. Made with love using the awesome PlayCanvas Game Engine!

Originally game was made within 12 hours, and had a core gameplay and was multiplayer day-1. Then we've polished it a bit, and made several improvements. When I have some spare time, I add few other things now and then.
This game was played almost 2,000,000 times now, without any advertising, and is supporting it self.

screen-2.jpg

screen-1.jpg

Link to comment
Share on other sites

9 hours ago, rgk said:

Very nice game, fluid fun quick game play.

Thank you!

9 hours ago, rgk said:

Got to ask though, how does it support itself without ad revenue or in-game purchases?

Probably "supports it self" was said in terms of user retention and growth. Two small servers (EU and US) actually are not paid by game. Although with current daily numbers, if there would be ads, it would be totally enough to cover hosting costs.

Link to comment
Share on other sites

1 hour ago, staff0rd said:

Nice music

The guy actually can make more music for decent projects, and he is almost "free".

1 hour ago, staff0rd said:

looks cool but too much lag trying to play from Sydney - controls sluggish

Unfortunately there are only two servers: US and EU. For Pacific Asia, Australia, and that part of the world latency will be a bit too high.
And there is no client-side prediction which would compensate latency issues.

Link to comment
Share on other sites

12 hours ago, marcgfx said:

12h? impressive. how on earth did you get multiplayer in that fast?

Node.js and SockJS (used to be, we are switching to engine.io + protobuf).
Server code at that point was about 600 lines of code :)

Just use the tech that allows you to focus on gameplay and logic, and not on technology it self.
Plus making client was easy, as PlayCanvas has awesome Editor that just speeds up development time dramatically.

Link to comment
Share on other sites

I guess you are simply transmitting input actions to all clients. are you accounting for lag? thats where I am currently a bit stuck, but my game was originally never intended to use networking :P

I really like TANX, already played it a few months ago and was impressed :D. it was one of the reasons why I wanted to try networking myself. So it is your fault I'm stuck now!

Link to comment
Share on other sites

8 minutes ago, cbecker said:

@moka , I've had a look at playCanvas before, looks pretty good! However, can playCanvas do FPS type games?

Absolutely. You can use Pointer Lock API. And there is even early tests with VR we did (I've tested with Oculus DK1 and DK2).
There is Bullet physics (ammo.js) as well.
 

10 minutes ago, marcgfx said:

I guess you are simply transmitting input actions to all clients.

Not really. I send players input to server only.
Then server takes that input and applies to players tank.
Then 20 times a second (20 UPS) it sends out full game state with all positions of all tanks.
All clients just get that data, and interpolate between previously known data. This works well if game is not too action-driven and not too much based on reaction, and if your latency is something below 100 it is totally playable. Problems start when game is more reaction based and latency goes above 100. In that case you need client-side prediction and dead reckoning (extrapolation).

But hey, TANX been out there without anything fancy, but the most simple interpolation and nothing more for a year now, and it been doing totally well! :)
Don't over engineer, just try doing something that is good enough, and try avoid "immediate action" from users and avoid too much of fast "reaction based" gameplay.

Link to comment
Share on other sites

thanks for that info. I guess my game is a little more complicated. as stated, I never intended to use networking and maybe I never will. my approach is also totally different and possibly not even viable. I don't have a server yet, but I want to transmit just the inputs to all clients. then backtrack and recalculate the current state based on the inputs. this could lead to numberous problems, but I wont know how bad until I've tried :rolleyes: maybe then I will be able to interpolate the results in some way.

Link to comment
Share on other sites

1 hour ago, marcgfx said:

thanks for that info. I guess my game is a little more complicated. as stated, I never intended to use networking and maybe I never will. my approach is also totally different and possibly not even viable. I don't have a server yet, but I want to transmit just the inputs to all clients. then backtrack and recalculate the current state based on the inputs. this could lead to numberous problems, but I wont know how bad until I've tried :rolleyes: maybe then I will be able to interpolate the results in some way.

Multiplayer - is not a feature, but architecture and affects whole thing the way it is built.
So trying to take existing single-player game, and converting to Multiplayer, almost never works.
You are trying to make p2p mechanics, which is not an easy either. Sending inputs - will require very controlled frame state management, and interpolation with slowing down everyone to the slowest player in the game, to make sure no one is simulating states before all info is available - this is what used often for strategy games. But is fully not suitable for action-based games. As in action-games you need to be quick, reactive, so your option is to extrapolate.
 

1 hour ago, chg said:

How many plays has it has\d in total, when you include the advertising?

We don't have advertising in that game :)
Number of plays is set at bottom left corner of a game, it is almost 2,000,000 (14 Jan 2016).
Here is Google Analytics screenshot of daily sessions from 22 Mar 2015 to 13 Jan 2016:

Screen Shot 2016-01-14 at 14.50.24.png

It is interesting to see patterns based on workdays or weekends, as well as schools operational dates. As during summer holidays, children play less in TANX, but as school time starts, they back again :)
First spike - was hackernews. Some other spikes - not sure what actually.

Link to comment
Share on other sites

19 hours ago, GaryS said:

This is incredible work... beautiful, fluid and immediately addictive. Love it.

Thank you!

19 hours ago, GaryS said:

I'd like to be able to see kill/death stats per player, and perhaps a couple of different arena layouts... but I can't find fault with the gameplay at all. Well done!

Yeah, all those features are obvious ones to add, just don't have a time atm :( next month will start updating certain things, will add users and leaderboards.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...