I’m making my first Monogame project after several years of working with LibGDX, and i can see they’re very similar, but i’m still trying to figure out things that you may encounter to be basic.
Right now i’m using the Camera component from the Extended extension and it works very well, however i’m stumbling with the rendering of sprites right now.
My “Game World” size is very small (26 x 15 units), since i’m doing a Pixel Art game and the size of the world is actually the number of tiles that fit the screen (26 x 15 tiles, each tile of 16x16 dimension, so the actual screen size would be 416 * 240 pixels)
So, i’m doing my rendering of sprites based on the “Game World” size. Based on that, my main character would be of size 1x2
The problem is that every Draw method of the SpriteBatch where the destination bounds of the screen can be set, that bound is represented with a Rectangle parameter that only takes integer values, and since my “Game World” size is so small, i need my character to be positioned on floating point values
There are other Draw methods that takes the position of the texture as a Vector2, but on those methods i can’t set the size so they render with the size of the texture, which is much larger than the size of the character represented on the “Game World” coordinates
So, is my approach of using a “Game World” of small size correct?. If so, how can i render my textures using floating point numbers?