Skip to main content
added 4 characters in body
Source Link

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

EDIT:
For example:

The top left corner is (0,0) 
player position in tiles: (ScreenX / 2, ScreenY / 2)
player position in screen: always (0, 0)
grass tile position in tiles: (Gx, Gy)

Now the question is: how can I get the screen coordinates for the grass tile?

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

EDIT:
For example:

The top left corner is (0,0) player position in tiles: (ScreenX / 2, ScreenY / 2)
player position in screen: always (0, 0)
grass tile position in tiles: (Gx, Gy)

Now the question is: how can I get the screen coordinates for the grass tile?

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

EDIT:
For example:

The top left corner is (0,0) 
player position in tiles: (ScreenX / 2, ScreenY / 2)
player position in screen: always (0, 0)
grass tile position in tiles: (Gx, Gy)

Now the question is: how can I get the screen coordinates for the grass tile?

added 48 characters in body
Source Link

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

EDIT:
For example:

The top left corner is (0,0) player position in tiles: (PxScreenX / 2, PyScreenY / 2)
player position in screen: always (0, 0)
grass tile position in tiles: (Gx, Gy)

Now the question is: how can I get the screen coordinates for the grass tile?

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

EDIT:
For example:

player position in tiles: (Px, Py)
player position in screen: always (0, 0)
grass tile position in tiles: (Gx, Gy)

Now the question is: how can I get the screen coordinates for the grass tile?

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

EDIT:
For example:

The top left corner is (0,0) player position in tiles: (ScreenX / 2, ScreenY / 2)
player position in screen: always (0, 0)
grass tile position in tiles: (Gx, Gy)

Now the question is: how can I get the screen coordinates for the grass tile?

added 273 characters in body
Source Link

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

EDIT:
For example:

player position in tiles: (Px, Py)
player position in screen: always (0, 0)
grass tile position in tiles: (Gx, Gy)

Now the question is: how can I get the screen coordinates for the grass tile?

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

I am using a tilemap in which I have square tiles.
Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula?

EDIT:
For example:

player position in tiles: (Px, Py)
player position in screen: always (0, 0)
grass tile position in tiles: (Gx, Gy)

Now the question is: how can I get the screen coordinates for the grass tile?

Source Link
Loading