Good morning, lads. I need some help about little details I must know before starting to make a game. I’m very much new to Rust and Amethyst, please do take it easy on me. So,
Is there a way to store a mutable variable (more specifically a 2D array of unknown size at compile tile) at a State, or have it globally available? I’m aware of mutable statics but I’d rather not want to write unsafe everywhere, although I guess I could encapsulate it in a function. However, you need to specify array size in static arrays if I’m not very much mistaken, and that’s a no go. You see I need such a 2D array for this is a procedurally generated tile based game and I’d need to know and change tiles and even map size.
This is related to the above. If the map is global there’s no issue, so this is just a technical question about Rust. How do you pass a mutable 2D array of unknown size as a parameter? I’ve searched this and people go in depth of Rust mechanics but do not answer, after all, how to do it. Surely there is a way?
I promise I had more questions before going to sleep but since then I’ve forgotten them. I’ll leave this here in case I remember.
You need to make this forum more visible… I just found it by accident, looking at your news, which is not exactly the place I would expect to find it.
Although I wasn’t expecting to find my dead family in the news either. I’m sorry, obligatory dark humor.