123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|84|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> 2D Array?

Sat, 24 Jun 2017, 01:07
Caton


how do I do it with 2d tiles, like this.

www.youtube.com/watch?v=Mqkk_ccw8IA
skip to 8:17
Sat, 24 Jun 2017, 02:13
spinal
I think you need to explain your question a little better.
Assuming that fireballx and firebally you have to be divided by the size of your tiles I would assume. then compared to the 0,0 of your maptile array. Then you will need to compare what the maptile actually is...



Perhaps someone else can explain better, I'm not great at explaining.

-=-=-
Check out my excellent homepage!
Sat, 24 Jun 2017, 03:29
Jayenkai
Traditionally I tend to use a mathematical formula, rather than relying on the language to handle 2/3/4D arrays.



I can't say for sure exactly when I started to do this, but there was one language I used during my many years of development, which "looked" like it was doing 2D arrays, but didn't.. AT ALL.. It Lied to me, and it took me smegging ages to realise what the bug was.

Ever since, I've relied on the DIY approach.

Just be sure you don't go Out-Of-Bounds, and you'll be fine.

-=-=-
''Load, Next List!''