VBGamer |
|
Re: ok =) .... Jack Hoxley (0 replies, 0 views) (2001-Feb-6) You could do that all as a User Defined Type - unless you actually need to implement functions into the data structure, at which point you'd use classes...
Type TileInfo
X as long
Y as long
Type as CONST_TILETYPE
Script as String
Texture as Long
Vertices(0 to 3) as D3DVERTEX 'Might not need this
End Type
It's only if you intend to actually write code for EACH tile that you'd need to implement classes; a master class containing generic drawing, script parsing and so on would be useful... but I prefer to keep each tile a UDT - on a relatively small 100x100 map you'd need 10,000 class handles, which will be much larger and slower than 10,000 UDT's...
Jack; |