[VB6] Multiple data files to array (for tile games)
This example will take 10 text files full of map information and assign them into one 3 dimensional array.
Last edited by Hack; Feb 10th, 2006 at 10:44 AM.
Software languages known: Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known: Directx 7 and 8
Internet languages, in the process of learning: HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
Re: VB6-Multiple data files to array (for tile games)
Why wouldn't you Dimension the variable "Maps" as a String or Integer?
VB Code:
Dim maps(1 To 10, 1 To 15, 1 To 12) As String
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
Re: VB6-Multiple data files to array (for tile games)
guess I didnt think of it, If your going to have less that 256 images and dont plan on using negative, set it as a byte! Good question though, I need to work on not leaving my variables as variants by default, it possible could slow down a game.
Software languages known: Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known: Directx 7 and 8
Internet languages, in the process of learning: HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX