Simplifying would do good. You could have just something like:
VB Code:
Type MySolarSystem Name As String X1 As Long 'top left corner in the map this solar system starts Y1 As Long X2 As Long 'top right corner Y2 As Long X3 As Long 'bottom left Y3 As Long X4 As Long 'bottom right Y4 As Long 'you can simplify the position by having rectangular areas... End Type Type MyPlanet Name As String Info As String X As Long 'position in the solar system Y As Long 'solar system is determined by the X and Y values Inflation As Single 'can hold decimals unlike Long End Type Type MyCity Planet As Integer 'index to Planets array Name As String Info As String Weather As Byte 'you can have 256 different weathers this way Inventory(999) As Integer 'you can have 1000 different item types this way End Type Public Solars() As MySolarSystem, Planets() As MyPlanet, Cities() As MyCity 'just some random example... Sub Initialize() ReDim Solars(9) ReDim Planets(49) ReDim Cities(499) End Sub
A lot depends on how big, configurable and random you want your world to be. The bigger the world, the more data it requires. What I've shown here is pretty much as low memory use you can get with your project. Good luck!




Reply With Quote