Ive been working on a rpg battle system for some time now while waiting for the 3dmodule but finally I am at point where the engine needs a visual touch for tweaking and timing.
I have settled for a subdivision method for levels in a structure as follows
Map>Continent>Country>Region>City>Area>Sector>Grid
Im going to use linked lists in a array format so i can move ,remove ,create areas and add them to the list at any time during the game
here is the test code
Just wondering if anybody knows of a better way of doing this code or a faster method
I have settled for a subdivision method for levels in a structure as follows
Map>Continent>Country>Region>City>Area>Sector>Grid
Im going to use linked lists in a array format so i can move ,remove ,create areas and add them to the list at any time during the game
here is the test code
Global AreaList:TList=CreateList() Type Area Field Total_Sect Field Sect_X Field Sect_Y Field Sector_List:TList[] Function Create:Area(_TS,_SX,_SY) Temp:Area=New Area Temp.Total_Sect=_TS Temp.Sect_X=_SX Temp.Sect_Y=_SY ListAddLast Arealist,temp Temp.Set_List_Array(_SX,_SY) End Function Method Set_List_Array(_SX,_SY) Sector_List=Sector_List[.._SX] For X=0 To _SX-1 Sector_List:TList[x]=CreateList() For Y=0 To _SY-1 Local Newsect:Sector=Sector.create(Y) ListAddLast Sector_List[x],Newsect Next Next End Method Method Print_Lists(X) For Temp:Sector=EachIn Sector_list[X] Times:+1 Print Temp.ID+1 Next End Method End Type Type Sector Field ID Function Create:Sector(_SY) Temp:Sector=New Sector Temp.ID=_SY Return Temp End Function End Type Area.create(27,3,9) For Test:Area=EachIn Arealist Areas:+1 Print "AREA ="+AREAS For x=0 To test.Sect_X-1 Sectx:+1 Print "SECT_X="+Sectx test.Print_Lists(X) Print "" Next Next
Just wondering if anybody knows of a better way of doing this code or a faster method