|
-
Mar 1st, 2002, 09:56 PM
#1
Thread Starter
New Member
HOLY CRAP I LOOOOVEEE U Z! and a Q on arrays
I DIIIID IITTTT!!! I FIGURED IT OUT! I MADE A FRIGGIN THING THAT USES BITBLT THAT ACUALLY WORKS! AND I LEARNED ABOUT ARRAYS TOO! I can't believe I doubted this forum.. thank you all. so very, very much. I love you... to death. I love you.
HOOOOLY CRAP!
ok now I have another Q hehe...
if I made an array for tiles... would I just make an array for the tiles on the screen? say a 5x5 tile view. Or would I make an array for each tile, then just update the view ...
ok so itd be like
dim tiles(numtiles) as integer
'where numtiles is grabbed from map file
then set an if situation for each tile to check for a value whether its a grass tile/lava tile, etc? Well thanks agian, and all the more help is appreciated.
-
Mar 1st, 2002, 11:02 PM
#2
Good Ol' Platypus
You can have multi-dimensional arrays like so:
VB Code:
Dim Tiles(1 To 5, 1 To 5) As Integer
Then, determined by the actual number in the array, draw a tile where it should be (usually [X-1] * TileWidth, [Y-1] * TileHeight). This can be changed without the -1 if the array is 0-based.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Mar 2nd, 2002, 01:36 AM
#3
Thread Starter
New Member
uh?
public tile(1 to 5, 1 to 5) as integer
so 1-5,1-5 = x,y? calling upon it would be like:
tile(1,3) ?
w00t! srccopy owns u all
-
Mar 2nd, 2002, 12:25 PM
#4
Good Ol' Platypus
Yea, that's exactly how you do it 
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|