Since MBrenaman has the problem (http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=OnLin;action=display;num=1085189774) and i have been thinking about it a bit, it’s time to start a tell-me-what-you-think-about-that-little-idea-i-have.
Nowadays you have two kinds of online games:
-games without servers, if you want to play with an other player you have to enter his ip address.
The problem with that kind of games is that you could have lot of people willing to play at the same time but which wouldn’t know someone else wants to play.
The advantage is that you don’t have to have a dedicated server (server as game server not a machine of course) running.
-games with servers, you can see other people when you connect, talk with them before playing, see current “game session” and a lot of things like that.
The problem with that kind of game is that you have to “pay”(pay doesn’t necessary means money, it could be bandwidth for instance) for the server.
The advantage is that players can play together easily.
The idea is to have the advantages of the two world without the inconvenient!
That mean no server but players still “see” all the other players and don’t have to search on internet (forums, irc, messenger) for the other gamers.
Ok it would be nice, but how could it be done?
The idea is to have a file (or files) which would be read/write by the game that would inform what happen and who is the “game world”. You can of course replace file with a lot of things like sql, irc,…
A file would contains the ip addresses of all the other players.
When someone launch the game, the client (i’m refering to the program run by each person) opens a file containing all the ip addresses of the other gamers, fetch all the ip an add it’s own.
Were do we go from here?
Ok we know who is playing the game, but how should we organize the game and the transfer of information?
I have two possible answer to that question:
-peer2peer. After having fetch the ip addresses the client connect to one of the ip and start communicating with them via p2p system.
Advantage: faster than the file system (see below).
disadvantage: really complicate to do!
-use a set of file to communicate. clients would communicate with as set of file, the same kind of file as the file containing all the ip. The nature of the file would differ depending of the game but there could be a file for each “chat” (general chat, european chat, american chat, game type 1 chat, game type 2 chat,…), a file for each “game session”,…
Conclusion:
I’d like to know what you think about this way to communicate, it’s feasibility,…
I could have gone further in explanation such as how handle “hard disconnection”(game crash, computer crash, disconnected,… ) but i created this topic to know resceive comments!
So, what do you think?
PS: Sorry for the loosy english!