[SOLVED] Not Rendering Tiles Across Left Side of Screen

EDIT: Solved almost immediately. It was a special int class I was using so that I could enforce deterministic timesteps, and converting was happening through a ushort, which eliminated negative values in the crossfire. All is well.

---------- Original Message ---------

I thought this would be an easy google search, but alas…

I’m creating a platformer, and when the camera moves, tiles naturally start moving left. When they do, their positions obviously shift left of zero, such as (-20, 200)

I render with spriteBatch.Draw(), which seems to work completely as expected, EXCEPT that it won’t draw when the position is negative. And it’s not a culling mechanism on my part, I’ve already accounted for that.

So, how am I supposed to get a tile to render when it edges just to the left of the screen? Obviously I can’t have it just disappear completely, and it would be insane to believe that nobody else has encountered this in 2d, so what simple explanation have I not found?

1 Like