League of Legends: Network model for unhackable fog of war?

Started by
1 comment, last by Rycross 13 years, 6 months ago
I'm currently trying to design the network model for the game I'm working on. It is somewhat of an RTS, but unit movement is a lot more predictable than most (you can influence player movement, but not move them directly). I've been looking at what I had assumed were the two main networking models. There is the lock-step RTS model, where every client runs the exact same simulation as the server. And there is the FPS model, where the clients are relatively dumb and the server feeds unit updates to the clients.

However, then I started looking into the game League of Legends. It looks like an RTS, but in their development diary they've mentioned how they have made their use of Fog-Of-War unhackable. And indeed, I've done my share of searching to see if this was true, and haven't found any evidence of a map hack for the game.

Now, if they were using a traditional RTS model, the entire map could easily be revealed, since every client is running the entire simulation and therefore knows where everything is. Even modern RTS games like Starcraft 2 use this model, and are victims of these types of hacks.

However, the only way I can think to make fog-of-war unhackable would be for the server to not send any unit updates to any given client unless the server knew the client could see them. So they can't be using a traditional RTS network model.

It's possible they are using something like the FPS model, just informing every client of unit state. But I thought the whole problem with this is the bandwidth required to send the state of every visible unit to every player. So either the League of Legends developers have mastered their packet size regardless of unit count, or they are using some other hybrid method.

I would really love to hear any ideas on how they might be pulling this off!
Advertisement
RTS games aren't really that bandwidth heavy. Their update rates are pretty large usually. This allows you to update only visible entities as you mentioned. You can use the same concept of full state and then delta state packets used normally in non-rts games. When they come into view send full updates then changes to the state. Most of it is pathing data which is deterministic given a start and end state. (Could also group units with the same end spot as in the normal RTS model). There are some odd conditions for when units cross paths, but that can be handled.

People often overestimate the number of state changes in an RTS game. (Even 400 APM isn't that many state changes). Also if your fog of war is constantly receding especially around the enemy base you're not seeing a large part of what's happening. Even the first few minutes of the game is just data about what you're doing.

In a client server model you could have massive games with tons of units potentially using full/delta networking strategy. I'm not going to, but if you punch the numbers using an efficient binary protocol you're looking at very little bandwidth.

In my binary packet article there is a discussion of a radar that I made specifically for this kind of game. Basically you send simple stuff like a very crude position of where units are on a mini-map then when the camera pans around you instead load things around the camera (a little larger than the camera). Very very simple concept that allows thousands of units on a map at one time while limiting the bandwidth.
Its also worth pointing out that League of Legends isn't really an RTS in the traditional sense. Its a DotA battle-arena style game, which usually have far fewer units on the map at any one time than a traditional RTS.

From what I understand, they use hosted servers, so I suspect their unhackable fog of war is simply not sending information on units that are not visible to the client.

This topic is closed to new replies.

Advertisement