Flipped co-ordinates

I am curious as to why I need to do an operation like the below:

In order for the map to move in the correct direction. Now as you can see, pressing W and S will move the y coordinate up and down, which I expect. But A and D directions are also flipped, so instead of x starting on the left, it now starts on the right, so plusing x moves the map left instead of right.

The _map object is a TileMap which uses the function drawMapFromCsv to draw the map from a Tilesheet, like so:

Now there’s probably something in the above code causing the co-ordinate system to flip not just on the y-axis, but the x-axis as well. How could I do it so that only the y-axis is flipped?

The axis are flipped because you move the map, the world, and not the character.

The wold has a “movement” in the opposite direction as the moving object.

Also in the flash API use these axis:

Well, I don’t want to move the character. It would stay in the centre and I would move the map as you would notice in a JRPG, hence why I did that.

I guess I could try to live with the x axis being flipped, although would be weird and probably end up getting all of my maths wrong.

Well if you moved the character but used a camera system to keep it centered it would make the axis “un-flipped”.

It’s not the x axis that’s flipped, it’s the y axis.

It’s important to understand this because the x and y axes work this way in practically every game engine out there.

The reason you think it’s the x axis that’s backwards is because you’re flipping the axes again. That’s how cameras work: when the character moves in one direction, the world scrolls in the opposite direction.

This. It may seem like the same thing, but in the long run it’ll make your life a lot less confusing.