|
|
View previous topic - View next topic |
Author |
Message |
Gardon Scholar
Joined: 05 Feb 2006 Posts: 157
|
Posted: Wed Sep 12, 2007 3:48 am Post subject: Last question |
[quote] |
|
I've never done networking before. I've heard rumors that you have to design it to be online from the get go or else it's pretty hard to convert a single player game into an online version.
I don't see the big deal... as long as you have your general base for the game down (menus, combat system, etc.) and just handle how you manage the gamestates and players differently for multiplayer play.
If anyone has any links to networking for games I'd be fond of that.
Thanks,
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Wed Sep 12, 2007 12:15 pm Post subject: |
[quote] |
|
I've made two larger single player projects. One was handed to a new team about two years ago, and they tried several times to add networking, and face quite big problems. They may succeed one day though.
The other project I have abandoned for the very reason, way too much effort to add networking at a late stage.
But this does not mean you have to have networking there from the start. It means you must chose your program architecture, the design, with networking in mind, so that later you have the right places to cut the code and insert network interfaces.
I'd still suggest to implement a dummy network layer first. It does not do real network stuff, but defines the interfaces. Then build your game on top of that. At least in my case it was a big help.
PS: Being online from the go, it does not have to be. I'm working on my current project two years now and it's not been online for more than a few hours, running on my PC with friends invited for doing tests.
|
|
Back to top |
|
|
Gardon Scholar
Joined: 05 Feb 2006 Posts: 157
|
Posted: Wed Sep 12, 2007 2:33 pm Post subject: |
[quote] |
|
Most "Multiplayer Game" books I've come across suck. I figured why not buy a book dedicated to multiplayer gaming? They are always full of bugs in the source code and aren't worth my time trying to debug.
With that said, do you know anywhere else I should start to learn networking from? I kind of know what you mean when you talk about the networking shell. Basically don't make the game dependent on just itself, but rather have it so it needs input from somewhere else, and structure it that way.
But some sort of book or article would be nice. Where did you learn your networking from?
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Wed Sep 12, 2007 3:13 pm Post subject: |
[quote] |
|
At first I borrowed a book about socket programming and tried a few of the examples there. After that I started with looking at open source MMO games. Also I tried to find out how commercial MMOs work, what they do, network wise, just by watching while playing. It might sound odd, but one learns most if the network is bad, when lag is high. There you can see where they allow desyncs, and what the games do to resync clients.
I'm still learning, though, the past months I posted quite some questions here. There are some around who have more experience on that than I do.
I know there are other ways, but this structure is what I seemed to understand best and which seems to be easy to use - a classical client server structure:
1) Clients send request for actions to the server.
2) Server validates and performs the action.
3) Server broadcasts action results to all affected clients.
4) Clients update themselves with the action results.
Games vary in how much data is kept on client and how much on the server, though.
The one extreme is to have all data on the client, and no server at all, using peer-to-peer protocols to keep all clients in sync. I think this is what one finds in old network games, with small player numbers.
The other extreme is to have the client only as input/output console and all of the game data on the server. Browser games often work that way.
MMO's are somewhere in between. Usually most data is kept on the server, only the data that is needed to display to the player is on the client. I think most MMOs use protocols like the one sketched above. They need measurements to hide the lag - if the player wants to move his/her avatar, the client immediately moves in on screen, assuming it's ok, to give the player the idea of immediate response. If the server confirms, it was ok to move, if not it must be reset. This is where the trick-box opens. Good games can cover many network issues, a lot of lag until the player notices.
Sorry, today my thoughts are a bit convoluted and so is my writing. Hope you can draw something useful from it, though.
|
|
Back to top |
|
|
Gardon Scholar
Joined: 05 Feb 2006 Posts: 157
|
Posted: Wed Sep 12, 2007 3:20 pm Post subject: |
[quote] |
|
Yes, thanks. My main inspiration was Runescape, which I played several years ago during the older version. It was a browser based game, which you would log into via their website. You never had to download anything, and everything you needed was shown to you through the browser (everything kept on the server).
Now, I know some Java, but not enough to make me like it :) I'm sticking to C++, and I think the applet thing is out of the question. I'm looking to make a client of my own, so we'll see how that goes. Right now I'm torn between a FPS and an RPG. I'm not really looking for MMO at the moment, although that would be nice. I'd hope to upgrade the game to that someday.
So I guess it's my choice. If I had the game online, I could sacrifice quality a bit because other players and gameplay make it what it is. It would be like you play the game to have fun, and there's always something different.
Single player on the other hand, has to be perfect because that's all you get, and there aren't really any surprises once you know what the game is. If doom had crappy graphics and the gameplay stunk, would you play it?
So since I'm no artist, I'm still torn between fumbling with a single-player like game (doom type), and possibly make it multiplayer, or do some sort of RPG online, and just get the basic components down for networking (have other people join, walk around, talk, be able to trade, etc.)
So it's design at this point. What do I really want to do, you know? Do I want to shoot for some awesome FPS game, or try for a new experience and do an online RPG. Either way, I want to make both games BAD, but it's just how far I think I will get.
lol
Thanks again,
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Wed Sep 12, 2007 3:35 pm Post subject: |
[quote] |
|
Gardon wrote: |
Single player on the other hand, has to be perfect because that's all you get, and there aren't really any surprises once you know what the game is. |
This point caught my attention. I think it's good for multiplayer games to have some single player content. Sometimes there are just too few people online, other times someone wants to play solo for a while. Offering single player content keeps those people interested in the game.
While most of my project is just an glorified chatroom, most of my work goes into features to entertain players while noone else is around. No idea if that ever will work. But for the time being it entertains me and it's challenging, since I try to have a (mostly) peaceful, yet interesting world.
|
|
Back to top |
|
|
Gardon Scholar
Joined: 05 Feb 2006 Posts: 157
|
Posted: Wed Sep 12, 2007 5:07 pm Post subject: |
[quote] |
|
You said you have it online at the moment. Would you mind if I took a look? If not, that's fine, but I would really like to see what you have so far and see what networking looks like in it's early stages.
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Thu Sep 13, 2007 8:04 am Post subject: |
[quote] |
|
Hajo wrote: | [...] it's not been online for more than a few hours, running on my PC with friends invited for doing tests. |
I have no hosting options right now. I'm pondering to rent a vServer, but before I actually spend money there I want to have it in a good shape. Also a friend offered help, but he needs to replace a switch which died a few days ago.
But you can take a look:
https://sourceforge.net/projects/sonnheim
It's really very simple. A bit more than two years ago in moment of frustration and depression I quit all my former projects and tried to find a better life. It didn't work out, and after a while I came back to programming/painting again. I don't have the passion anymore with which I had pushed my former projects forwards, and I spend much less time with this new project. So don't expect much, it's just a toy project, to try a few things, and with the small hope that it will find a niche some day to exist and attract a few people who like it.
|
|
Back to top |
|
|
|
Page 1 of 1 |
All times are GMT
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|