# How to remap world space to screen space?

I am noob to game development, and while using a simple graphics library in Python to make a 2D game, I noticed that the coordinate system of the library had its upper left corner as (0,0), whereas conventionally (at least in math) the lower left corner is set as (0,0).

I want to keep the world space in my physics calculations, but want to map the world space coordinates into the screen space. Furthermore, I want the world space sizes to be a scale of 10 larger than the screen space sizes.

In terms of programming methodology, how should I go about doing this in the most modular fashion?

• Conventionally this is done with a view-projection matrix to map world coordinates to screenspace. Are existing questions about view-projection matrices not providing what you need for your case? Nov 3, 2017 at 2:45
• @DMGregory: Most view-projection questions are about mapping 3D to 2D and not mapping 2D to 2D, but I guess the concept is the same: build a matrix that can transform a vector from one space to the other. This answer to From screen space to world space for a 2D game is the closes to spelling out "how", but excludes the rotation aspect. Jun 9, 2023 at 21:22
• Hint: 2D is just 3D with z=0, then all the rest of the math works identically. You can then remove any terms that get zeroed out. Jun 10, 2023 at 0:25

Would something like

(actualX-screenXTransform,actualY-screenYTransform)