Client or server, which controls gameplay?

Hello. I've started on SFML and plan to make a simple multiplayer platformer.

The problem is, I want to apply patches to the game when there's a bug, or when I want to create new content. But I don't know where the "instructions" come from.

For example, if I have a new area or level with a portal, is the teleportation code compiled into the client or is it sent from the server? I honestly have no idea how the server could do that!

Any help appreciated!
Last edited on
Let's say that you are making a FPS.

Your client would contain the level data and anything specific to your player (equipped weapons, ammo, etc). You then send your position information (location, heading, height, positions such as crouching), and the locations of any bullets to the server. The server would keep track of all of these things for each player and send that information to all of the other clients so that the other people can interact with you.

That's one way to do it. Remember to keep network traffic to a minimum. By having the whole level on the server, you need to pass all of the information about the level over the network which could be potentially huge.

Sometimes games like Diablo III elect to do most of the stuff on the server side to avoid anyone "hacking" the client. The blizzard servers generate the levels, keep track of item drops, and keep track of the monster generation and health. This means more network traffic and I think is more difficult to implement and MUCH more difficult on your server.
Topic archived. No new replies allowed.