Sometimes coding or the planning thereof, get turned around in a direction you didn’t anticipate. This is the problem I have looked at this morning and I’m not quite happy with, but it is what it is.
I think my decision to use arrays to build a map is a fallacy at this point. Either it won’t work the way I had originally anticipated, or I am just not quite there to fix the issue.
There must be some magic mojo that is happening behind the scenes that I haven’t quite figured out, so I’ve decided to shelve that particular technique, which I worked on for a few days now. I’ll still use arrays, but not in the map building, rather for collision detection, more on this another day when I figure it out.
If you saw me while I was programming Xelda, you would have seen the same thing. I think I’m going along the correct pathway when suddenly find out that it was the wrong decision from the start. Now a scramble to backtrack.
I am going to go back to where the map is build using the Tiled program. I will build the maps there and make note of where each block is. From there I will place each tile x and y position into an array. When the character hits one of these positions, then we will know a collision took place.
Unless… there is another way of doing that. Anyone have any other ideas?