Hey guys, no one seems to be able to help me on this problem for some reason, im just stumped. Basically i have a tilemap that scrolls and keeps the player in the center and the player can move to the edge of the map. I use a joystick to move the player, all the tutorials i have found move the player with touch so its safe to say i know how to do that almost fluently.
The problem im having is getting the player to recognise the boundary of the level (edge of the map). At the moment i have a method that returns true if the tile is blocked, and a movement method in the player class that uses the isTileBlocked method as a parameter; so if the tile is blocked the move is void. This works, but when the player hits a blocked tile, it just stops and wont move as there is a constant collision and therefore the move method is overridden. I tried adding a statement similar to if tileIsBlocked self.position = self.position +1, and this works but only for half of the map, as the other half would need a -1 in place of the +1.
I know this is a lot to take in but this problem is driving me mental and its one ive sort of put to the bottom of the pile but now i need to fix it.
Any help/solutions would be amazing, i can post code if anyone requires it.
Thanks in advance