Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (515)
Games in Android Showcase (122)
games submitted by our members
Games in WIP (577)
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  
  Idea for serverless gaming network  (Read 2689 times)
0 Members and 1 Guest are viewing this topic.
Offline bert

Junior Duke




Miles of road and miles of code


« Posted 2006-07-06 20:49:26 »

Since there must always be a server to hold a list of names of users who log on, but I'm only a teenager and I do not currently own a server, how about the first user who logs on immediately becomes the server. Then once there are a bunch of people online and the first person wants to leave, all the information on the server "jumps ship" onto the next person who arrived. This keeps happening until all of the users have logged off and the server does not exist any more. Each person's individual profile will reside on their computer, so the game does not die when the last user logs off of multiplayer mode.

I thought it was a good idea, but then I haven't been a Java programmer for too long (~1.5 yrs) and I have exactly zero experience in networking.

w00t, i'm winning
Offline bahuman

Junior Duke





« Reply #1 - Posted 2006-07-06 21:06:27 »

You know, it could work  Smiley
Look at the Command and Conquer franchise. The game does not die when the first player dies or quits. But you'll need a discovery mechanism, because the second player needs a way to figure out whether he's going to be the server, or should join another player. This requires a broadcast. So it's not going to work very well over the world-wide-internet. As soon as you want to go internet, you'll need a central authority.

You know, you could always dream about a server farm, hosted & maintained by Sun! You could call this sun game server ... -Oh, I dunno- project darkstar ... and it should have fail-over, load-balancing, and dynamic allocation of resources ... and of course, you'd need a forum !
Offline nva225

Junior Duke





« Reply #2 - Posted 2006-07-07 01:41:41 »

I'm pretty sure that's what Battle.net does.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bahuman

Junior Duke





« Reply #3 - Posted 2006-07-07 07:31:05 »

I'm pretty sure that's what Battle.net does.

I've never used battle.net, but I understand it's more of a matchmaking service. And once you've found some people to play against, you connect directly to them, without involving battle.net. This combines the best of both worlds: you have a central server to find players, and for the actual play, you don't have to bother with a central server (who might be far away from the actual players)
Offline woogley
« Reply #4 - Posted 2006-07-07 10:40:15 »

I tried this once with a 4-player pong game (it was cooler than it sounds). problems I ran into:

  • I could never know if the "server" I chose had enough bandwidth to broadcast the data as a server (a dialup user being chosen as the server ruined the entire gameplay)
  • if the "server" lagged out (or any type of hard-disconnecting without giving the game a chance to regroup itself), the game would come to a halt.
  • the gamers were uncomfortable about their IP being visible to the other gamer's machine. (through netstat or similiar command). this obviously doesn't happen with real servers, as your IP remains anonymous.

I'll see if I can dig up the source code, but I did it roughly 3 years ago so who knows.

good luck
Offline bahuman

Junior Duke





« Reply #5 - Posted 2006-07-07 11:31:38 »

peer-to-peer networking, IMHO, should work without a dedicated server with final authority. If you built it right, the only one to be bothered by a laggy connection would be the player on the dial-up. Of course, not having a dedicated server means you're wide open to cheating. Then again, you need a wildly successful game for cheating to even become a factor  Roll Eyes

Personally, I don't see why you would try to avoid a central server, especially now with project darkstar. I'm really excited about that, and I'm planning to try something on that. Of course, I'm planning on so much  Tongue
Offline Kova

Senior Duke





« Reply #6 - Posted 2006-07-07 12:37:15 »

about battlenet ... yeah it's more like matchmaking service as if the guy that hosted the game leaves everybody disconnects. This is a very rare problem though as host are not noobs. If we put aside darkstar, the best solution imho is to have one player host and other connect to him. When player hosts he connects to some database and leaves his info there, and when clients wants to join some game he ask the database for a list of created games. Buying host space is really cheap, like 15€ a year for 3GB monthly bandwith in Croatia.
Offline bert

Junior Duke




Miles of road and miles of code


« Reply #7 - Posted 2006-07-07 12:53:58 »

Thanks for mentioning darkstar, I never really completely knew what it was and I never thought of it as an option.

The server's computer would only broadcast a message with their info every ten seconds or so. This would make at most a ten second wait for the clients to respond and log on and plus it wouldn't completely use all the resources. I know it doesn't sound bulletproof, but...

Also what's the deal about cheating? Do people write their own code to inspect the classes involved in the game or something?

w00t, i'm winning
Offline Coinerson

Junior Duke




Introducing the world's cutest zombie, Timmy


« Reply #8 - Posted 2006-07-10 04:33:26 »

I'm pretty sure that's what Battle.net does.

No. battle.net would be the central server.....
Offline sloth

Senior Newbie




"And you will shed tears of scarlet."


« Reply #9 - Posted 2006-07-10 08:26:11 »

Yeah, battle.net has a central server which acts as a matchmaker for players who want to play a game as well as hosting the thousands or so games going on at once. It doesnt even work as simple a "matchmaking server" it hosts all of the games being played.

Quote
about battlenet ... yeah it's more like matchmaking service as if the guy that hosted the game leaves everybody disconnects.
I remember this from older online games, but as far as I know Starcraft, Warcraft II and III, and Diablo II (not open BNET) dont disconnect everybody if the starting player disconnects. You can choose to directly connect to somebody who is hosting a game, in WC II that was popular but then BNET came out and is still used for private games and LAN games. I havent played on BNET for years now so I wouldnt know if it has changed to what's been described.

The server initially mentioned in this topic is similar to the small-scale short, non-persistant rts or sometimes rpg games from the mid-90's where you would setup your server in-game and let whoever you wanted to play know what the ip and port was etc etc. Depending on the kind of server framework you require, anything is possible. Im wondering if the motivation for a server like this comes from a certain game youre trying to create or from your current situation of not having a remote server to use. If its the second case, I could help you out, I have local Server that I use only for my java networking apps and databases. Its just an old eMachines tower with Debian Sarge running on it, all setup with the basics.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bahuman

Junior Duke





« Reply #10 - Posted 2006-07-10 12:04:20 »

Perhaps of interest to you guyes, although I couldn't get the link to work:
http://homepages.paradise.net.nz/nickamy/honours.htm
Offline nva225

Junior Duke





« Reply #11 - Posted 2006-07-10 13:49:19 »

Perhaps I confused a few people. When I was talking about battle.net I meant the custom game hosting abilities. Not the normal "melee" style gameplay (which might be centrally hosted). I'm not positive but I'm pretty sure at least custom games re-assign hosts somehow. I do know that some people host games better than others (less lag), and when the game creator leaves the game will often continue. Given that battle.net is free I was just guessing blizzard would try to use as little server power as possible to maintain the service, and mostly just rely other people to be servers if possible.
Offline Jeff

JGO Coder




Got any cats?


« Reply #12 - Posted 2006-07-10 21:10:05 »

Okay, a few points...

(1) How does everyone else FIND that first player?  Where do they get his/her IP from?  On a Lan you can do this with brodcast but you cannot broadcast on the internet.

This is why Battlenet has a registry server.

(2) If you really want to do peer to peer you might loo kat JXTA because they provide the registry servers for you.

(3) Cheating.  People do all sortsolf things.  They hack the client code, they insert cheat proxies  in the middle, they even stop the program in memory using programmer-tools and change valeus on the fly.  The shrot answer is the client is cehatable and nothign on the client is secure and there is pretty much nothing yo ucan do about it that doesnt add real performance problemsn to trying to run a game on the internet.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jeff

JGO Coder




Got any cats?


« Reply #13 - Posted 2006-07-10 21:12:20 »

Btw.  Failing over the client acting as the server in a LAN based game is called "host migration."

The game industry gave up on it as being too hard and too complex to make work reliably with too little value.

LANs are pretty stable.  Most LAN games have fairly short play times (ie Quake styl;e death matches0 so if a machien DOES die you can justrestar ta new game with whats left with no big loss.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #14 - Posted 2006-07-10 23:48:29 »

The game industry gave up on it as being too hard and too complex to make work reliably with too little value.

We did?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Jeff

JGO Coder




Got any cats?


« Reply #15 - Posted 2006-07-11 01:28:19 »

The game industry gave up on it as being too hard and too complex to make work reliably with too little value.

We did?

Unless its come back sicne i looked.

MSFT had host migration in DirectInput for a numerb fo the early iterations.  It never worked and they took it out.

A few companies Iknwo of around the TEN time tried to do it and pretty much gave up on it as too much effort.

Do you know of a LAN based game that has a true host (as opposed to true peer to peer) that migrates today? I don't...


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #16 - Posted 2006-07-11 08:35:04 »

Some of the PSP adhoc games appear to do migration, but now I think about it they're probably closer to a peer to peer system than having a proper host.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Sequalit

Junior Duke





« Reply #17 - Posted 2006-07-13 03:35:55 »

Another idea, you could do the peer to peer networking thing. Everyone connects to each other, and each client holds the server database information... that way if one person drops, everyone else stil has the data, and they disconnect from that one person while still being connected to everyone else. And if someone cheats and changes values on the fly, you could check the values that are recieved by the other clients and... well correct them. Yay for BITTORRENT, i think that system can be very useful in games as well as just transfering large files.

while(gettingTired())
     crankOutMoreCode();
     if(asleep()){
          wakeUp();
          makeCoffee();
          chugCoffee();
     }
}

-Sequalit
Offline Jeff

JGO Coder




Got any cats?


« Reply #18 - Posted 2006-07-13 21:02:13 »

And if someone cheats and changes values on the fly, you could check the values that are recieved by the other clients and... well correct them.

Two problems:

(a) This only works for a lockstep game where everyone is running the exact same simulation at the exact same time.  This causes all kinds of issues with lag and means ALL your computers run only as fast as the slowest participant.

(b) Cheaters collude. If you do it by "voting" they can "gang up" on a non-cheating player and make him look like the cheater.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (30 views)
2014-10-27 03:28:38

TehJavaDev (26 views)
2014-10-27 03:27:51

DarkCart (39 views)
2014-10-26 19:37:11

Luminem (21 views)
2014-10-26 10:17:50

Luminem (25 views)
2014-10-26 10:14:04

theagentd (31 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (57 views)
2014-10-16 15:22:06

Norakomi (46 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!