Hi,
So if you want to store lots of information it is better to use an array instead of creating a hundred local or global variables to store the information. Is it purely for practical reasons, because it's easier to handle the information in arrays? Is there a difference in performance between the methods?
I'm planning to create rpg style stat system for around 100 units. Each unit has probably 20 - 30 different stats and they can all be upgraded and manipulated by different effects. In this case it seems obvious that either each unit should have it's own array for stats or all that information should be stores in a single array. Is there a benefit in choosing one big array or many smaller ones, or is it irrelevant performance wise and you should just choose to do whatever makes most practical sense?
Then I have a biome system with 6 different biomes, a weather system with 3 weather states (clear, raining/snowing, foggy), and a season system with 1 - 4 seasons depending on the biome the player has chosen. I can set up all of these with relatively few LOCAL variables. The only global variables related to these systems are counters that count down when the player last played in each biome type, so let's say 6 global variables are needed to set up that. Is there a benefit to use an array to control that type of information as well?