0
\$\begingroup\$

I'm developing a game with a friend that involves a procedurally generated map. My question is... Should the client generate the chunks, or should the client make a request to the server, and the server responds with the procedurally generated chunks? I can think of some advantages to both sides.

If it is generated client-side:

  • there will be a whole lot less load on the server
  • perhaps some game performance improvements too?

If it is generated server-side:

  • I can implement anti-cheating algorithms a whole lot more easily and efficiently
  • chunks can be "dynamically modified" by the server. Meaning the server can modify chunks for the clients before sending them if needed.

Another option would be for them to work together. The client would generate the chunks on-the-go, but would make a request to the server for modified tiles. I still can't implement the anti-cheating algorithms in this method though. But the advantages to this method are:

  • not much load on the server
  • server can dynamically modify chunks
  • moderate game performance

What is the best option, if any? And what do people usually do? Are there any advantages to any of these methods I'm missing?

EDIT: I know Minecraft chose the server-side method. I wonder what their reasons were?

\$\endgroup\$
  • \$\begingroup\$ Is the chunk generation creating so much load on the server? Will the players be able to cheat easily if you do it client-side? That depends of your game I guess. \$\endgroup\$ – realUser404 Dec 30 '16 at 9:47
  • \$\begingroup\$ The game I'm developing is an MMO. The answer to both is "yes" :) \$\endgroup\$ – Aaron Esau Dec 30 '16 at 21:32
1
\$\begingroup\$

When in doubt, do it server-sided.

If you try to prevent cheating through heuristic means on the server, those heuristic algorithms will have to constantly evolve to keep up with the tricks the cheaters come up with. This is a ton of work for you post-release and will sooner or later result in these algorithms becoming even more resource-intense than the generation algorithms. That means you will sooner or later lose the performance improvements you wanted to achieve.

Having as much logic as possible server-sided also has other advantages.

  • If you host your server centrally, you can make updates on the server-side without going through the hassle of rolling out a new client version.
  • If you let the community host their own servers, the server admins have a far easier time doing modding than when they need their players to install a mod for everything.
\$\endgroup\$
  • \$\begingroup\$ Exactly the answer I was looking for. Have a nice day ;) \$\endgroup\$ – Aaron Esau Dec 30 '16 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.