Updating Questions

This forum is for anything that doesn't specifically have to do with Better Than Wolves
Post Reply
User avatar
RaustBlackDragon
Posts: 1748
Joined: Fri Oct 14, 2011 6:25 pm

Updating Questions

Post by RaustBlackDragon »

Alright, so FC said I should feel free to make an off-topic thread about any questions I have regarding the update process, and I really appreciate that and will take him up on his offer. The primary problem I'm having is that I can't exactly wrap my mind around the structure, what information the client needs and what information the server needs, and what direction packets get sent in.
What's the price of freedom now?
Can you cut me a deal?
A crate of wholesale liberty,
or a justice combo meal?
User avatar
Panda
Posts: 1472
Joined: Wed Nov 23, 2011 9:29 am
Location: Kanagawa

Re: Updating Questions

Post by Panda »

I feel for ya man it seems like all the best mods including yours are having turbulence updating. :P
It seems like the most involved mods are suffering the worst.
Anything i can do to help?
Never say no to Panda.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Updating Questions

Post by FlowerChild »

In general terms, the client is just a dumb display device. It really doesn't need to know shit. Think of it like the monitor on your computer. The computer itself only needs to send it what's actually displayed on screen. It really doesn't need to know anything about the nature of what it is displaying.

It's not quite as dumb as a monitor mind you, but keep in mind that it really only needs to know the bare essentials of what is displayed or what is playing sounds.

In terms of what is sent where, the client sends info like when the player clicks a mouse and on what. The server is what does all the actual work, and any messages related to what the game is actually doing, are sent from server to client.

In this context, the client acts much like your mouse and keyboard. These devices just send information about what you are doing in operating the computer (like key presses and mouse movement), and it's the computer itself that actually does something with that.

In other words, the majority of messages, and definitely the most important ones from a modding standpoint, will be from server to client.

The real trick of multiplayer coding is to recognize exactly what data each portion of the game requires, and as much as possible minimize the number and size of messages sent by only sending what is absolutely necessary to get the job done.

I can feel your pain man, which is why I offered to help. Multiplayer game development is definitely not easy, and requires a bit of a rewiring of how you think, as your game is really being split up over two separate computers (or threads in the case of SSP, but it amounts to largely the same thing), each handling specific portions of running the overall game.

However, as I said, don't panic, as it's definitely doable and there are almost always clever solutions to getting what you want done.

Anyways, hope that answers the more general questions you have. Feel free to fire away if you have any specific ones.
Post Reply