Page 1 of 1

[svn3826] fix for NPOT textures in ascii mode; more sizes

Posted: Wed Jul 13, 2011 2:52 am
by tiger_eye
I missed something when I made 48x48 tile size more fully available here (I can't take full credit--it was already partially available in the code):

When ASCII graphics modes were used, it would create non-power of two (NPOT) textures, which ought to be avoided. On my system, this caused a small border to appear around the ASCII tiles with background, and some gfx cards may not even be able to handle NPOT textures at all.

So, I attached a patch to ensure power-of-two textures. For kicks, I also included even more tile sizes: 16, 20, 25, 32, 40, 51, and 64 (i.e., sizes := round(16*4**(1/6.0*i)) for i=0..6). If I were more familiar with making dialogues in ToME, I could have had the dialogue accept an integer size as input. As it is, though, these should provide enough options for players, and the code modifications are simple enough to include in the upcoming beta without fear of having a debilitating bug :wink: . I should note that I also made ASCII outline/shadows scale with the different tile sizes, so using power-of-two textures for NPOT sizes doesn't affect the visual aesthetics much at all.
more_tile_size_options.txt
(5.86 KiB) Downloaded 136 times

Re: [svn3826] fix for NPOT textures in ascii mode; more size

Posted: Wed Jul 13, 2011 5:54 am
by Canderel
tiger_eye wrote: I also included even more tile sizes: 16, 20, 25, 32, 40, 51, and 64]
48x48 available? I ask because 16, 32 and 64 is in the list.

Re: [svn3826] fix for NPOT textures in ascii mode; more size

Posted: Wed Jul 13, 2011 7:55 am
by darkgod
I reverted the list back to only 16,32,48,64, but I added a custom option to allow the user to select any size :)

Re: [svn3826] fix for NPOT textures in ascii mode; more size

Posted: Wed Jul 13, 2011 8:30 am
by Grey
Ooh, I wonder how low it can go... Might be no need for the minimap any more ;)

Re: [svn3826] fix for NPOT textures in ascii mode; more size

Posted: Wed Jul 13, 2011 9:00 am
by darkgod
10

Re: [svn3826] fix for NPOT textures in ascii mode; more size

Posted: Wed Jul 13, 2011 1:57 pm
by tiger_eye
darkgod wrote:I reverted the list back to only 16,32,48,64, but I added a custom option to allow the user to select any size :)
Nice! This is what I wanted to do, but didn't have the patience to figure out how to do it :wink:

Oh, the ASCII font sizes can currently be a little funky for some tile sizes, though. Since we use a power of two texture, the font size needs to be given relative to that. So, to save you from doing the work and testing, I attached a patch that has nice-sized fonts for all available tile sizes :D
ascii_tile_font_sizes.txt
(921 Bytes) Downloaded 131 times