Thanks Tonyg,
I can really use that, because I am using arrays of types.
I have found a solution for my game.
Since the player can only be in one sector at a time,
it has no use to load all data about every station in the universe, especially for sectors were you're not present (the other 99).
I will first be trying to create a game in the style of Freelancer (having lots of sectors and only one ship at a time and no other player-owned stuff).
This way I can create arrays with only 1 dimension.
When you enter a jumpgate (to go to another sector), all current data (and type-instances) are destroyed, the arrays will be redimmed, new type-instances are created (as much as needed) and data is loaded into them.
No need to copy/restore arrays and have too much data loaded at a given time.
Guess the station-building thingie will be for the next version of the game, when this one is working perfectly.
I will first try to get this game working, before I attempt to let the user build anything else, as this would be my first game.
If I would use 2-d arrays, and when one sector contains 15 stations, the first index of the array would represent the sectornumber (100), the second the stationnumber (15).
If another sector only had 1 station, this array would have 14 indexes (and also 14 type-instances) to many.
I was concearned (or how do you write this, as I'm Dutch) that my game would use too much unused, but allocated memory.
Looping through all these types (1000) is not slow, I know, but if you would have to loop through them, say 10 times per loop, at 50 fps (= 50 loops per second), then Blitz hasn't any time left to render the scene.
Then the framerate would go down to a crawl.
But thanks for the help, guys (and girls).
I can really use that, because I am using arrays of types.
I have found a solution for my game.
Since the player can only be in one sector at a time,
it has no use to load all data about every station in the universe, especially for sectors were you're not present (the other 99).
I will first be trying to create a game in the style of Freelancer (having lots of sectors and only one ship at a time and no other player-owned stuff).
This way I can create arrays with only 1 dimension.
When you enter a jumpgate (to go to another sector), all current data (and type-instances) are destroyed, the arrays will be redimmed, new type-instances are created (as much as needed) and data is loaded into them.
No need to copy/restore arrays and have too much data loaded at a given time.
Guess the station-building thingie will be for the next version of the game, when this one is working perfectly.
I will first try to get this game working, before I attempt to let the user build anything else, as this would be my first game.
If I would use 2-d arrays, and when one sector contains 15 stations, the first index of the array would represent the sectornumber (100), the second the stationnumber (15).
If another sector only had 1 station, this array would have 14 indexes (and also 14 type-instances) to many.
I was concearned (or how do you write this, as I'm Dutch) that my game would use too much unused, but allocated memory.
Looping through all these types (1000) is not slow, I know, but if you would have to loop through them, say 10 times per loop, at 50 fps (= 50 loops per second), then Blitz hasn't any time left to render the scene.
Then the framerate would go down to a crawl.
But thanks for the help, guys (and girls).