06-06-2003, 12:25 PM
I don't think it's that simple, Hunky. In order to maintain game performance for people with slow connections, map layouts and monster locations are loaded on the client side as soon as players enter an area. Information regarding which parts of the map was actually explored is then stored locally and vulnerable to hacks. You can nullify maphack by keeping that information server side, but this could slow down server response considerably.
Instead of trying to nullify maphack by storing all information server side, what I believe to be a better solution is to continue pre-loading map layouts and monster locations client side, but maintain them in a form that is useless to a human player until the last moment. The D2 random map generator constructs a map by selecting a finite number of map elements and randomly piecing them together. The key here is that you can tell the client to continue loading these map elements and the monsters within, but stop short of telling it how to piece them together. A player can still peek into memory and see which map elements have been loaded, but this is not going to help him find his way from the Worldstone 2 waypoint to the Throne of Destruction. He can still see the stairs, the monsters, the shrines, and everything else on the map, but it will just be a huge jigsaw puzzle to him. This type of virtual encryption would be impossible to crack unless the random map generator and the map seeds are reversed engineered.
The game performance hit from this solution would be minimal too. Each time a player moves into a new map element, the server only has to send a very small packet to the client telling it which of the pre-loaded map elements are immediately next to that one. Maphack can still allow players to see a screen or two ahead, but it would be no where as useful as it is today.
Instead of trying to nullify maphack by storing all information server side, what I believe to be a better solution is to continue pre-loading map layouts and monster locations client side, but maintain them in a form that is useless to a human player until the last moment. The D2 random map generator constructs a map by selecting a finite number of map elements and randomly piecing them together. The key here is that you can tell the client to continue loading these map elements and the monsters within, but stop short of telling it how to piece them together. A player can still peek into memory and see which map elements have been loaded, but this is not going to help him find his way from the Worldstone 2 waypoint to the Throne of Destruction. He can still see the stairs, the monsters, the shrines, and everything else on the map, but it will just be a huge jigsaw puzzle to him. This type of virtual encryption would be impossible to crack unless the random map generator and the map seeds are reversed engineered.
The game performance hit from this solution would be minimal too. Each time a player moves into a new map element, the server only has to send a very small packet to the client telling it which of the pre-loaded map elements are immediately next to that one. Maphack can still allow players to see a screen or two ahead, but it would be no where as useful as it is today.