My project consists of an endless world of tiles, divided into chunks.
I’m drawing my tile chunks using custom quads because it’s faster than calling spritebatch.draw thousands of times. I’m currently using a BasicEffect to match the spritebatch 2D view (using world, view & projection matrices).
I actually have two questions about this topic:
1) Y-axis camera transformations have the opposite effect on my quad drawing vs spritebatch drawing. Is there an easy way to reverse the Y-axis for quad drawing, or do I need to use two separate transformation matrices for my camera (normal 2d sprites drawn using spritebatch and the world tiles drawn using custom quads).
2) There’s also a SpriteEffect class. The latest MonoGame development build allows access to the TransformMatrix variable inside the class. Is it possible to use this effect instead of the BasicEffect class if I just need a 2D view?
I already tried using the sprite effect class by setting the matrix variable to the camera transformation matrix but that didn’t work. I noticed that SpriteEffect uses the Matrix.CreateOrthographicOffCenter function, but the ‘bottom’ Y-value parameter is higher than the ‘top’ Y-value. I use the same projection for my basic effect but with bottom & top switched, otherwise I wouldn’t see anything.
Thanks in advance