hmm, the thing with the negative coordinates I believe won't be a problem, since my game is intended to be divided in "rooms", in a way that the player will never be able to be at a position LESS than (0, 0), because these rooms will be all closed up by tiles, except for "doors" or passages into other rooms.
the part about sliding when up/down walls when pushing the player diagonally might also not be a problem, since in the end he won't be able to simple walk diagonally - he will either be jumping or falling.
apart from that, I think I understand what you're going for in this code/pseudocode
. I'll see what I can get done with it. Thanks again! Oh, and sorry for the lack of abstraction with data structures, it's a bad habit for sure. Gotta make a cleaner code Oo...
Cheers!