Looking at how I'm storing Snow Data.
I'm making a SnowGrid for the map and saving each snow id in the cells so I can check the grid coordinates if there's something there already.
I'm also saving the same id in a SnowList which I can run through to decrement the Snows Life (since running through a huge grid would be slow).
Thing is though, I can't save Grids in a ds_map which is how I'm storing Chunk Data, so I might need to figure something else out, or just move the grid to the Chunk Object and not the Chunk Data. The list can go into it though.
So I'll have to store it outside of that, no big deal really just an extra thing to look after when culling and save/loading.
Thinking: I could save a Ds_map as x12y25, then when checking for existing obstacles check for a Ds_map with that name? It would be stored as:
x12y25 in SnowList in SubChunkMap
But I don't think I need that? I'm already saving the Snow Id in a list, so I can just put:
snow. id in SnowList in SubChunkMap
With or without the map I'm still going to have to run through the whole list looking for the correct entry, may as well save using an extra map.
3 comments