Skip to main content
4 events
when toggle format what by license comment
May 24, 2018 at 13:10 vote accept Limpuls
May 24, 2018 at 13:06 comment added user35344 Then you'll also need to simply swap the indices when you calculate positions for the tiles, i.e. i * this.sprite.width needs to become j * this.sprite.width. You are creating confusion for yourself by naming the indices i and j. It would be much clearer for you if you named them properly, i being y and j being x.
May 24, 2018 at 12:39 comment added Limpuls But then my array is being rendered in the opposite way. Read my old question I have linked in OP. That was the reason to switch i j in places. So how should I approach this? Just deal with it being the opposite way? Because now I want to see the array being rendered the way it is coded in the file, f.e [0, 1, 0] meaning water on the left and right sides and ground in the middle. Not water on top and bottom.
May 24, 2018 at 12:22 history answered user35344 CC BY-SA 4.0