How do you change resolution stuff for pixel game?

Hi I wanna make a game with pixel art, but I don’t want to scale the sprites, I want to downscale the resolution, but how?

I don’t want to make the window EXTREMELY small

I don’t want to upscale my sprites either. I did that before and it’s no good

How could I do this?

There are a million ways to scale pixel art. You could just use point sampling without a custom shader and see if that works for you. If not, you’re gonna have to be clearer about what kind of result you want.

You can draw everything to a texture of any size and then scale that texture to the window. That way you can do your drawing and logic and stuff on e.g. a texture that is only 100x100. Afterwards just resize that texture.

I think what is missing in being mentioned here is that blending stuff, so that the pixel art remains sharp after being scaled…

I forgot the exact words to use so hopefully someone chimes in.

You probably mean point sampling? If you just render a texture at larger scale using SpriteBatch, by default it will use a linear sampling scheme. For pixel art you likely don’t want that and use point sampling instead, so there’s no interpolation between pixel colors. You can pass one of the SamplerState.Point* sampler states to SpriteBatch.Begin to use it. Also for upscaling pixel art usually you want to scale by an integer factor.

1 Like

Not to mention your software for the graphics having the correct export formatting, also to add to that, or more clarify…

Integer he means whole numbers specifically, so avoid 1.2, 3.1 stick to 2 or 3… 1.5 might work but you will notice strange representation…