Hello! I recently changed my game's view, because I wanted it to look like sidescrollers, so I set the client.pixel_y value to 64, however, I wondered if this does actually omit the tiles that are not shown on the player screen, because that'd make my server use more resources on something which isn't even shown.
If the client pixel_y doesn't omit downloading the "tiles" that are not shown to the player, would there be a way to simulate the "sidescroller view" without forcing the server to send those tiles resources that are not shown?
Thank you!
![]() Aug 10 2013, 3:39 am
Best response
|
|
The entire map is pretty much present in memory at all times. Even if you cannot see a tile, it's still there doing its thing. That said, a simple tile sitting around won't really put any strain on the server unless it's running some sort of process, which can be remedied by not having an object do something unless the player is in range of it to even matter.
|
However, keep in mind that this differs when it comes to clients connected to a live server. While the server has all of that information in memory at any given time, the client only contains what it can see and what the server's sending it. So as far as what's actually being drawn and loaded into the client's memory, it's just what they can see plus any extra stuff you happen to be telling them about things outside of their rendering range.
|
To further blow your mind, increasing any pixel_x or pixel_y value higher than world.icon_size (or something like that) increases the internal view buffer, which is the thing that determines how many atoms (in addition to view size) to send to each client as they move around. If you set it really high, you're effectively increasing the amount of data traffic and raising your bandwidth usage.
I don't think there is currently a built-in internal method for lowering this back down to view-size because it would require internal tracking of every single pixel_x/pixel_y value without doing lengthy checks. |