Archived

This topic is now archived and is closed to further replies.

neurokaotix

How to design a fullscreen graphic within the dimension restraints?

Recommended Posts

neurokaotix    100
Let''s say I want a splash screen for my game and the screen is running at 640x480, should I make a 512x512 image and stretch it, or should I make a 1024x512 image and only use the first 640x480 pixels? Another way still, should I just divide the image up into smaller and smaller images (512x256,128x64,32x16, etc) to make the fullscreen image? MindEngine Development http://medev.sourceforge.net

Share this post


Link to post
Share on other sites
Unwise owl    158
I made an 800x600 background image (my game''s resolution), then I did the following calculations to fit into a 512x512 texture:

ratio = 512 / 800 = 0.64

width = 800 * ratio = 512
height = 600 * ratio = 384

I then scaled down the picture to the size of width and height, and I saved it into a 512x512 texture. Of course there was this unused area of 512x128 pixels, but I could put some other small textures onto it conserve memory.

Share this post


Link to post
Share on other sites
UfoZ    150
Unwise owl: you''re losing valuable pixel data that way.

You can just scale the 800x600 image unproportionally down to 512x512 and display it scaled back accordingly. Why waste pixels?

Share this post


Link to post
Share on other sites
Unwise owl    158
I don''t waste all of those pixels as I stated, I have a lot of smaller UI buttons one that space. But you''re right I could scale it unproportionally though, but I''ve got a strange distaste for that. ;(

Share this post


Link to post
Share on other sites
mbrown211    132
quote:
Original post by neurokaotix
quote:
Original post by geekster
What's wrong with just using a 640x480 image?

dunghill.dk - desensitized homepage - desensitized project page


Images must be stored in powers of 2 (eg. 32x32, 64x64, 256x256, 128x512, 1024x32, etc)

MindEngine Development
http://medev.sourceforge.net


Only if you're using 3D textures, I don't think that restriction applies to surfaces in ddraw.

[edited by - mbrown211 on January 16, 2004 12:19:36 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Pixels are cheap and math is easy. Draw it whatever size makes sense artwise. Pad the texture to be powers of two. Use the subtexture that fits your splash screen size exactly pixel for pixel (tiling if you have a POS video card).

Since it''s for your splash screen, throw it all out when you are done.

Share this post


Link to post
Share on other sites
neurokaotix    100
quote:
Original post by mbrown211
quote:
Original post by neurokaotix
quote:
Original post by geekster
What''s wrong with just using a 640x480 image?

dunghill.dk - desensitized homepage - desensitized project page


Images must be stored in powers of 2 (eg. 32x32, 64x64, 256x256, 128x512, 1024x32, etc)

MindEngine Development
http://medev.sourceforge.net


Only if you''re using 3D textures, I don''t think that restriction applies to surfaces in ddraw.

[edited by - mbrown211 on January 16, 2004 12:19:36 PM]


I don''t use DirectDraw.

MindEngine Development
http://medev.sourceforge.net

Share this post


Link to post
Share on other sites
Pipo DeClown    804
Maybe he means that you can use surfaces instead of textures.
Of course I never used them but I think it''s possible to use surfaces that are not-square.

--
You''re Welcome,
Rick Wong

- sitting in his chair doing the most time-consuming thing..

Share this post


Link to post
Share on other sites
AndyTX    806
Ideally for something like a splash screen, you should get a direct pixel-pixel mapping with no blurring. That said, just use the next larger power-of-two size. Also make sure to align the pixels to texels as described in the DirectX documentation (basically just offset your billboard by 0.5 pixels... read the docs for more info).

Share this post


Link to post
Share on other sites