Peer to peer rather than server-based connection

Peer to peer rather than server-based connection

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Peer to peer rather than server-based connection

Post by Caydr »

Do you think something like this would be in the cards in the future? It'd eliminate that problem where the idiot host that gets himself killed decides he doesn't want to wait around and just leaves.

Hosting a game seems to bring with it an added chance of winning - nobody in a large game would be smart to rush the host, for instance, unless they're a very reputable person with more than one computer.

If peer-to-peer connections aren't possible, does the game work well when minimized, if only for hosting purposes? A host might be more willing to let the game run if he can hit a button that says "Minimize game and auto-quit when it's over", something like that. This would be especially good since I imagine that doing nothing but communicating, no rendering, would allow the host to run his computer at around 90% efficiency or so, even while playing another game.

If I was hosting a game, I'm a decent enough person that I'd let it continue to run if I got taken out, but it would be at least a nice courtesy if the server could get back to doing something more enjoyable. Even if a good deal of his computing power is gone, that still lets him play GalCiv or something with low end requirements.
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

I liked the system i beleive empire earth had, if host dropped it would just try each play to use as host, it would be a lot better!
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Re: Peer to peer rather than server-based connection

Post by Peet »

Aside from having to greatly rework Spring's network code, P2P connections would have the added disadvantage of every player requiring NAT traversal.
Caydr wrote:If peer-to-peer connections aren't possible, does the game work well when minimized, if only for hosting purposes? A host might be more willing to let the game run if he can hit a button that says "Minimize game and auto-quit when it's over", something like that. This would be especially good since I imagine that doing nothing but communicating, no rendering, would allow the host to run his computer at around 90% efficiency or so, even while playing another game.
I do believe you just invented the autohost :wink:
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

AFAIK you cannot run a dedicated host as well as run a seperate instance of Spring on the same computer, the ports conflict and stuff. That's just what I heard. Is that wrong?

In any case, the ability to go from "playing" to "dedicated hosting" with the push of a button when you're the host and you die would probably increase the number of successfully completed games IMO. If you can just minimize it, that's good, but remember many people wouldn't know a minimize button from a close button, and wouldn't know how to minimize something that's fullscreen.
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Post by very_bad_soldier »

I think it would be more straightforward to correctly part the server-code from the client-code to get two independent applications. So the server-app is a very lightweight app which continues to run even if the host quits its client.
In addition this would have the advantage to get a real dedicated server application.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

That sounds good.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

P2P isn't going to happen any time soon if it's up to me, but very_bad_soldier is right to the point, that is the kind of stuff I'd like to get done some time, but unfortunately I lack the time to make real progress on that kind of stuff...

Then the dedicated server would be extremely lightweight (the server isn't really much more then a multicast deamon with some speed calculations and spoofing checks): You could probably easily run 50 of them on each UF server wrt bandwidth and CPU (there may be scheduling latencies with so many active processes on a single core CPU though).
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Caydr wrote:AFAIK you cannot run a dedicated host as well as run a seperate instance of Spring on the same computer, the ports conflict and stuff. That's just what I heard. Is that wrong?
Quite incorrect...properly configured springies can be run parallel, a friend of mine ran 3 and was still able to play spring with all of them running. There can be issues with playing in your own autohost however.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

A host might be more willing to let the game run if he can hit a button that says "Minimize game and auto-quit when it's over", something like that.
Alt-Tab works well enough for me. It happened to me quite a few time to have even forgotten a minimised Spring until I tried to launch a new Spring. I was hoping that people who play Spring are nerd enough to know the standard Windows commands.

I remember a thread where you said you had some issue with alt-tab, but if so just ask to get it fixed not to have it all reinvented with a new button. Plus, standard shortcuts > custom buttons.


If the networking system of Spring was changed into P2P, that would be a major downgrade, since everybody behind routers, that is, the vast majority of players, would suddendly be unable to play any game anymore.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

I used to run 2 springies and play on them or host from tas client on the same PC without problems. Biggest problem for me was CPU load (single core 2500 amd).

Just make sure springie is using different port than tas client if you want to run springie and host another game from tas client.

T1 deadeye and sir click a lot used to do the same (running springies and playing on them).
vraa
Posts: 79
Joined: 21 Jun 2007, 03:47

Post by vraa »

I run windowed mode, I do not run into any issues regarding alt+tabbing.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

zwzsg wrote:
A host might be more willing to let the game run if he can hit a button that says "Minimize game and auto-quit when it's over", something like that.
Alt-Tab works well enough for me. It happened to me quite a few time to have even forgotten a minimised Spring until I tried to launch a new Spring. I was hoping that people who play Spring are nerd enough to know the standard Windows commands.
"and auto-quit when it's over", the important bit, is not accomplished by alt-tab afaik.
uranium235
Posts: 1
Joined: 03 Jul 2007, 10:46

Post by uranium235 »

Having shift+esc as an instant quit for the host is a terrible idea, because I see new hosts making that mistake when they want to resign (I made the same mistake when I was new).

Anyway, sometimes I take out the host first because if he quits I count it as a win. :D
Post Reply

Return to “General Discussion”