Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

If I create pixel art files that need to be scaled up on the screen later, so that a single pixel becomes a box of 4 pixels. Should I create my pixel art with 2x2 pixels or should I create it with 1x1 pixels so that I can I 1:2 scale it later in XNA to 2x2 pixels?

I tend to believe that 1:1 would result in too much detail rather than the pixel art effect, thus I want the end result in 2:1 style where a 1x1 pixel of my intended sprite will take 2x2 pixels on the screen.

share|improve this question
add comment

2 Answers

up vote 8 down vote accepted

Bad idea to scale it up beforehand like that.

Doubling the size of a texture quadruples the storage, and the memory it uses. It will also slow down spritebatches, and generally take more time for rendering.

What you want to do is scale the textures up by 2 when drawing them in XNA, while making sure to scale with a PointClamp image sampler.

How do I disable texture filtering for sprite scaling in XNA 4.0?

share|improve this answer
1  
+1 This is exactly what I'm after. :) –  Tom Wijsman Jun 15 '11 at 1:16
add comment

You're really looking at a 6 one way, half a dozen the other situation here.

The main advantage of doing it on a 1 to 1 scale before hand is file size. On top of that, you don't have to manually make sure all your "pixels" are in the right 2x2 setup, and so long as scale up by whole numbers it will work clean (rotation's still a mess but you probably know that already)

If you do all the pixels as 2x2 beforehand you're in the same situation as before, except now you have to go up by .5's in order to keep a steady ratio. You do gain the ability to go half size, but really the half size from this is exactly equal to the size of the full size on the 1x1.

I personally would go with just having one pixel be one pixel as far as your assets go, and then scale them to the proper size. It will make your image creation easier and it will make your assets ~1/4 the size for faster loading.

share|improve this answer
    
+1 Thank you for explaining, however the image sampler is what I didn't now about yet and was afraid of... –  Tom Wijsman Jun 15 '11 at 1:15
    
Ah, missed that part. Glad AttackingHobo's answer included the parts not in mine. –  Lunin Jun 17 '11 at 16:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.