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

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

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

#1 Post 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 135 times

Canderel
Sher'Tul
Posts: 1252
Joined: Mon Nov 24, 2003 2:31 pm
Location: South Africa

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

#2 Post 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.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

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

#3 Post 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 :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

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

#4 Post by Grey »

Ooh, I wonder how low it can go... Might be no need for the minimap any more ;)
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

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

#5 Post by darkgod »

10
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

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

#6 Post 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

Post Reply