Help developing script for tile generation
Hello!
I'm working on a multiplayer strategy game, which involves placing buildings on tiles generated across a map. So far, I have made a script which generates Tile structs stored in a list inside of Chunk structs in their own list. There are 25x25 Tiles in a Chunk, and 10x10 Chunks in a standard map size. All-in-all, this adds up to quite a few. I have the player query the server for what chunks it should load every time they move, and instantiate the chunks tile-by-tile in a 3x3 Chunk radius around them. The tiles are instantiated from a prefab tile game object, where the specific tile is sent from the server and applied to the prefab before instantiation. It works as intended so far, but I can't help but feel there is a better way of going about this. Are structs proper to use for this? Am I even close to a decent solution for what I'm making? Any help and/or tips are much appreciated, and more details can be provided.
Your answer
