• Create Account

# Matthiee

Member Since 18 Jan 2013
Offline Last Active Jan 23 2013 07:16 AM

### In Topic: 2D Isometric rendering with camera/viewport

19 January 2013 - 03:26 PM

Thank you

### In Topic: 2D Isometric rendering with camera/viewport

18 January 2013 - 04:54 PM

Do you mean something like this?:

```for (Int32 y = 0; y < height; y++)
{
for (Int32 x = 0; x < width; x++)
{
if (x > -1 && y > -1 && x < width && y < height)
{
if (x > p.playerCam.X && x < (p.playerCam.X + p.playerCam.Width) &&
y > p.playerCam.Y && y < (p.playerCam.Y + p.playerCam.Height))
{
map[x, y].xoffset = -100;
map[x, y].yoffset = 390;
map[x, y].render(g);
}
}
}
}```

### In Topic: 2D Isometric rendering with camera/viewport

18 January 2013 - 04:19 PM

Uhm isn't that supposed to be like that?

Lets say for example:

My cam x = 10 and y = 10 and the width and height both are 20

then it will be start rendering at 10 (x) -> 10 (x) + 20 (width) = result it renders only 20 tiles in x. But if x was 100 I would get 100 (x) -> 100 (x) + 20 (width) = same result only first 20 tiles on x will be rendered?

Or am I thinking wrong ?

PARTNERS