C # development Wpf/silverlight animation and game series Tutorials (Game Tutorial): (37) Map Adaptive Zone loading
Now that the map editor has been able to slice the map, the next thing we need to do is to assemble the cut picture to replace the whole map. What needs to be specifically stated is that if you load all slices into the game at once and display them, the effect is almost indistinguishable from using an entire map, and may even be worse in performance. The purpose of this section is to adaptively populate the game window area with these slices, That is, the use of the least map to achieve a seamless window fill, thereby improving the overall performance of the game.
Tutorial Example Game window mode when the form size is 800*600, then we first based on this size to 400*300 to use the map editor to cut several map slices:
At this point, we turn back to compare the size of the map and the volume of the map slices that are now sliced, it will be found that the total capacity after slicing is nearly half as long as it remains unchanged. If you are doing a network version, slicing to achieve on-demand downloads will shorten the time users load the program and reduce the burden on the server:
Next is the key, the game window 800*600, map slices for each 400*300, then each need to show how many slices can be in the protagonist no matter where the position can fill the game window? You may wish to look at the following picture: