banks, types, and arrays

Blitz3D Forums/Blitz3D Beginners Area/banks, types, and arrays

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

for 2d arrays I have just been saveing it to a 1d array using the equation (arraywidth*y)-(arraywidth-x). with x and y being the 2d coordinates to store in the 1d array. To convert from 1d to 2d: y = ceil(n/arraywidth)
temp = ((ceil(n/arraywidth))-(floor(n/arraywidth)))
x = arraywidth-temp
This makes it so if you go left to right for each row, it goes
1 2 3 4 5
6 7 8 9 10...

Would using this method of converting 2d to 1d and back again be faster than the posts above?