Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (741)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (823)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  peer-to-peer user-count experiences (lock-stepping)  (Read 4684 times)
0 Members and 2 Guests are viewing this topic.
Offline klaus
« Posted 2015-07-07 08:10:54 »

Hello Smiley

I'm thinking about the peer-to-peer architecture. Right now it's just hypothetical, because our client-server architecture works really well. I'm a little bit concerned about future server costs though, so that's why I'd like to get some information on peer-to-peer architecture.

Do you have experiences on the count of players (in one game) such an architecture will seamlessly be able to handle? Any other problems you stumbled across?

Going this route, I'd have my concerns with establishing the connection through NATs. I know of UDP hole punching, but I don't know if I want to implement that Wink
Offline Riven
Administrator

« JGO Overlord »


Medals: 1324
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2015-07-08 16:33:43 »

If you're wary about NAT punch through, you are in over your head Pointing You'd need each peer to punch through the NAT of any other peer. That is n*(n-1) punch through 'sessions' to perform, they all have to succeed, for every peer to properly join the game.

Why not let users host their own servers, to work around the cost issue.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline Soulfoam
« Reply #2 - Posted 2015-07-08 16:53:41 »

If you're wary about NAT punch through, you are in over your head Pointing You'd need each peer to punch through the NAT of any other peer. That is n*(n-1) punch through 'sessions' to perform, they all have to succeed, for every peer to properly join the game.

Why not let users host their own servers, to work around the cost issue.

To add on to this, if you don't want the typical "Server List", just use UPnP and don't blatantly notify the user they are the server.

Have them search for a game through a server list, and just attempt to join each one until you can connect to one. If the player is UNABLE to connect to any servers AND UPnP fails, notify them there is a problem with their network and that they need to manually port forward whatever port if they wish for other people to be able to join their game. Else if there are no games and UPnP is successful, just simply add their IP to the server list and have them begin hosting the game.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline klaus
« Reply #3 - Posted 2015-07-08 19:38:21 »

Why not let users host their own servers, to work around the cost issue.
It mainly has to do with control. We will probably release the server software sometime in the future. But since we are planning on releasing this game as free-to-play with revenue made from in-app purchases (kind of, we have an interesting idea that we want to try out) we want to be in charge of the running servers.

I know I'm contradicting myself a bit here, because I asked about peer-to-peer architecture..

@Soul Foam: That's an interesting idea, but it would give the hosting part an advantage over the other players, because he/she will never suffer from any lag Smiley The game is highly competitive and we want it to be as fair as possible.
Offline Soulfoam
« Reply #4 - Posted 2015-07-08 20:47:28 »

Why not let users host their own servers, to work around the cost issue.
It mainly has to do with control. We will probably release the server software sometime in the future. But since we are planning on releasing this game as free-to-play with revenue made from in-app purchases (kind of, we have an interesting idea that we want to try out) we want to be in charge of the running servers.

I know I'm contradicting myself a bit here, because I asked about peer-to-peer architecture..

@Soul Foam: That's an interesting idea, but it would give the hosting part an advantage over the other players, because he/she will never suffer from any lag Smiley The game is highly competitive and we want it to be as fair as possible.

It's funny because were making the same style of game.

My game is very competitive, and has micro transactions as well.

Remember, you can ALWAYS transition over to hosting your own servers once it becomes a viable solution, I was once at the point you are now, wondering and questioning what to do about it.

About your issue with lag and such, you can either ignore this and always let the host have a small tiny advantage (alot of games actually do this... ever played Halo or Call of Duty? I'm sure you've played a game where you were screaming "DUDE HE HAS TO BE HOST WHAT THE f**k".) or you can deal with it a couple different ways. You can implement artifical latency to the hosts client, just averaging out other peoples latency and take that average and apply it to the host.


As far as hosting your own servers, realize this...

Say a server holds 16 players right. Now, if 100 people play your game, not ALL of them will be online at once of course, but lets say out of the 100, there are 16 online, which fills up your server. Your server costs $20 a month lets say, now say those 100 people buy $20 worth of in game things, which means your server has just paid for its self... AWESOME! Now lets say you get another 100 people playing, so you have 200 people playing your game... exciting huh?!

Well now.. you need 2 servers, because you have double the people, so now you will be paying $40 a month for 2 servers.
Oh shit.. what do you know, this month those 200 people only bought $10 worth of things, now you lose $30!

Point being your playerbase can grow a ton, and you have to keep supporting all those players, even if they aren't buying anything in game. So just make sure it's a viable solution before hosting your own servers.
Offline klaus
« Reply #5 - Posted 2015-07-09 11:12:20 »

Yeah, indeed I did make some calculations and those weren't very motivating actually.. What I'm really missing though is some real data from similar games with in-game currency and revenue. I know even if the games are similar it's hard to predict the outcome, but I'm wondering about the percentage of paying gamers. Is it more like 5%, 1% or 0.1% ? That of course again depends on what you sell and how you sell it, and so on...

It's probably a big experiment after all.

But yes, for unlimited growth of the player base, probably the only viable solution will be to let the players host themselves. I'm thinking about a system, where we still host the lobby server were the players can connect and then detect which player would best fit for being the host and if none, we could still host the game on one of our servers. So that would allow everyone to play and would save us the precious resources.
Offline Soulfoam
« Reply #6 - Posted 2015-07-09 16:41:25 »

Yeah, indeed I did make some calculations and those weren't very motivating actually.. What I'm really missing though is some real data from similar games with in-game currency and revenue. I know even if the games are similar it's hard to predict the outcome, but I'm wondering about the percentage of paying gamers. Is it more like 5%, 1% or 0.1% ? That of course again depends on what you sell and how you sell it, and so on...

It's probably a big experiment after all.

But yes, for unlimited growth of the player base, probably the only viable solution will be to let the players host themselves. I'm thinking about a system, where we still host the lobby server were the players can connect and then detect which player would best fit for being the host and if none, we could still host the game on one of our servers. So that would allow everyone to play and would save us the precious resources.

I can't really answer the first part of the question as I don't have the analytics to provide you that info.

Anyways, the second part of your reply seems like a good idea, it's more work for sure and still will be costly but I think it's a great inbetween option. Also, don't forget about host migration, it's literally the biggest downfall of player hosted servers in a competitive setting.

Best of luck to you Smiley
Offline klaus
« Reply #7 - Posted 2015-07-10 09:13:12 »

I can't really answer the first part of the question as I don't have the analytics to provide you that info.
No worries.

Anyways, the second part of your reply seems like a good idea, it's more work for sure and still will be costly but I think it's a great inbetween option. Also, don't forget about host migration, it's literally the biggest downfall of player hosted servers in a competitive setting.
Yeah, thanks for pointing that out. We actually thought about that already a little. Will be interesting to implement that  Wink I already see hours of time passing by in the blink of an eye  Wink

Best of luck to you Smiley
Same to you!  Smiley
Offline Soulfoam
« Reply #8 - Posted 2015-07-10 12:13:10 »

Yeah, thanks for pointing that out. We actually thought about that already a little. Will be interesting to implement that  Wink I already see hours of time passing by in the blink of an eye  Wink

Remember once everyone is connected to each other through 1 person, you should check every other player to see if they are able to host a server as well. Make a list on the servers client, of everyone who is able to host a server. Then from there, check their connections to see who would be the best 2nd host, best 3rd host, etc etc. After you get that list gathered, send all the info needed (just IP and Port really) to every client.

The reason I'm saying to do this is because if the player who is the server happens to rage quit and closes via Task Manager, or just shuts their computer off, or disconnects their ethernet cord, your host migration code will never run, so everyone will just drop the game. So in this case, you now have that list on every client, and each client can attempt to connect to the 2nd best host or 3rd best etc etc and the game can continue on even if the original host migration fails. This way it'll be a lot harder for a game to actually drop and fail completely.


Hope that helps a little bit with host migration since you haven't looked into a lot.


Edit: Just ran across a related article on the analytics I was unable to provide in previous posts: http://www.gamasutra.com/blogs/AlexanderZacherl/20150528/244532/The_Buying_Habits_of_Hardcore_PvP_Gamers.php
Offline klaus
« Reply #9 - Posted 2015-07-12 11:10:18 »

That's a good idea, thanks! And also thank you for sharing that link!
Pages: [1]
  ignore  |  Print  
 
 

 
Ecumene (108 views)
2017-09-30 02:57:34

theagentd (135 views)
2017-09-26 18:23:31

cybrmynd (245 views)
2017-08-02 12:28:51

cybrmynd (240 views)
2017-08-02 12:19:43

cybrmynd (238 views)
2017-08-02 12:18:09

Sralse (252 views)
2017-07-25 17:13:48

Archive (864 views)
2017-04-27 17:45:51

buddyBro (1007 views)
2017-04-05 03:38:00

CopyableCougar4 (1566 views)
2017-03-24 15:39:42

theagentd (1373 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!