Engine and loading of 32bpp graphics is now in trunk!
Moderator: Graphics Moderators
- Ben_Robbins_
- Tycoon
- Posts: 1234
- Joined: 20 Nov 2005 01:56
- Location: Abu Dhabi, UAE
-
- Engineer
- Posts: 89
- Joined: 20 Nov 2003 15:20
I'm very fascinated by the new 32bpp feature. It's only problem so far is, that it supports 20x20px images for toolbars only.
So, I've played around with the code to set the toolbar size according to the image size. Look at the screenshots below. Both are r10170, first running 8bpp-optimized, second 32bpp-simple with the 28x28px iconset from joed.
What do you think of it? Is it worth further development and maybe a suggestion for trunk?
So, I've played around with the code to set the toolbar size according to the image size. Look at the screenshots below. Both are r10170, first running 8bpp-optimized, second 32bpp-simple with the 28x28px iconset from joed.
What do you think of it? Is it worth further development and maybe a suggestion for trunk?
- Attachments
-
- 8bpp-optimized
- Unbenannt, 1. Jan 1960.png (80.78 KiB) Viewed 1646 times
-
- 32bpp-simple
- Unbenannt, 1. Jan 1960 #1.png (161.39 KiB) Viewed 1614 times
Here you are...MarkyParky wrote:Can anyone please publish compiled WIN32 binary of pngcodec for us, poor guys that do not want to install VisualStudio only for compiling once in a year?
Thank you very much...
- Attachments
-
- pngcodec.zip
- (18.66 KiB) Downloaded 239 times
athanasios and ben: thanks very much for your permissions. Now things really can get started for 32bpp!
I've created 2 screenshots in the toyland scenery (not my favourite, but we can change that now : )
The difference is not spectacular, but more important: it shows that 32 bpp png can be used correctly in-game, so when more graphics become available, the result will be fantastic imo.
@dannys9: I like the idea of bigger icons for the toolbar very much, but since 32bpp is in trunk now, some considerations should be made:
I dont think the new toolbar layout is nice for people that want to keep using the 8bpp graphs, or when they use the 32 bpp blitter but dont have the larger icons installed.
So the toolbar layout should be an option, or even better, code should be changed to make it possible to configure the GUI layout from e.g. a config file, instead of being hardcoded( big change I think).
I've created 2 screenshots in the toyland scenery (not my favourite, but we can change that now : )
The difference is not spectacular, but more important: it shows that 32 bpp png can be used correctly in-game, so when more graphics become available, the result will be fantastic imo.
@dannys9: I like the idea of bigger icons for the toolbar very much, but since 32bpp is in trunk now, some considerations should be made:
I dont think the new toolbar layout is nice for people that want to keep using the 8bpp graphs, or when they use the 32 bpp blitter but dont have the larger icons installed.
So the toolbar layout should be an option, or even better, code should be changed to make it possible to configure the GUI layout from e.g. a config file, instead of being hardcoded( big change I think).
- Attachments
-
- screenshots of same scenario with athanasios's pngs with embedded x and y offset
- screenshot #1.png (39.83 KiB) Viewed 5652 times
-
- screenshot of game without PNG loading
- screenshot2.png (32.22 KiB) Viewed 5647 times
- Digitalfox
- Chief Executive
- Posts: 708
- Joined: 28 Oct 2004 04:42
- Location: Catch the Fox if you can... Almost 20 years and counting!
dannys9 and GeekToo, nice work
But dannys9 , have you asked permission from joed for using the toolbar graphics?
Please everybody, always say if you have permission for using the graphics you show..
Doing it this way, we can all rest assured that respect and credits are given to the artists
dannys9 , all suggestions are welcome, I'm sure the dev's will appreciate
But dannys9 , have you asked permission from joed for using the toolbar graphics?
Please everybody, always say if you have permission for using the graphics you show..
Doing it this way, we can all rest assured that respect and credits are given to the artists
dannys9 , all suggestions are welcome, I'm sure the dev's will appreciate
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
I agree about the toolbar that normal size should remain, or it will brake compatibility with 640x480. A larger one is usefull for high resolutions and there should be switches about which one to use on each standard resolution.
GeekToo: I noticed that in the 32bpp screenie there are footpaths and street lamps whereas in the first not. May I suppose you pressed "fund new buildings", to "announce" to the toyland inhabitants the construction of the first 32bpp buildings for their land?
GeekToo: I noticed that in the 32bpp screenie there are footpaths and street lamps whereas in the first not. May I suppose you pressed "fund new buildings", to "announce" to the toyland inhabitants the construction of the first 32bpp buildings for their land?
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
@GeekToo/athanasios: It's an autosize feature. If you use the 8bpp blitters or 32bpp with smaller toolbar icons, you will also have a smaller toolbar (as you can see in the first screenshot). This doesn't need any further setup. Just place the images of the size you like into the sprites directory and the toolbars will autofit to them.
You're right, I used the scenario editor, and it continues to build new structures, given enough timeathanasios wrote:I agree about the toolbar that normal size should remain, or it will brake compatibility with 640x480. A larger one is usefull for high resolutions and there should be switches about which one to use on each standard resolution.
GeekToo: I noticed that in the 32bpp screenie there are footpaths and street lamps whereas in the first not. May I suppose you pressed "fund new buildings", to "announce" to the toyland inhabitants the construction of the first 32bpp buildings for their land?
@dannys9: the autosize sounds perfect, if it is tested it should be considered to be in trunk.
I've posted a diff for the autosize feature at the suggestions section, as it is off-topic here. Please feel free to test it.
English™ - powered by Dictionary™
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
That was great news and I wanted to thank you PM, but then I read your post. I thought it wouldn't be easy task and would take look to solve or it was impossible and that would mean that we would have to draw a lot of new sprites. Once again thanks.TrueLight wrote:And as update: today we added 32bpp-anim blitter, which is a blitter that brings back the palette animation, so you can enjoy the sea again as it was meant to be Isn't it wonderful?
I would like the following to be clarified:
animation applies:
1. only TTD pallete 8bpp sprites?
2. any pallete 8bpp sprite?
3. even 32bpp pngs? (= I suppose not.)
If 2. is correct, that means that:
a. animation will get colors of sprites' own pallete?
b. animation will get colors of original TTD pallete?
Please clarify what is applicable now and what is the target.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
In the 32bpp-anim blitter, palette animation works for both 8bpp as 32bpp images, the same was as it did in 8bpp. If you read the 32bpp specs, you see that there is a so called 'mask' or 'remap' channel. This remap channel is needed to support both 8bpp and 32bpp. It in fact is a 8bpp image, but only those pixels that match something useful in the old 8bpp palette. In case of animation, it means that if you put a pixel there with a palette value > 217, it will animate in exactly the same way as 8bpp did. In the same way you can get company colours. The alpha channel is used if the remap channel has a value not-equal to zero.athanasios wrote: I would like the following to be clarified:
animation applies:
1. only TTD pallete 8bpp sprites?
2. any pallete 8bpp sprite?
3. even 32bpp pngs? (= I suppose not.)
Of course this means that palette animation in 32bpp is still limited to the same set as the 8bpp was, but it was never the intension to extend it, only to allow it. And of course it uses the TTD palette (as we don't want to see any difference if we load either a 8bpp blitter or a 32bpp blitter when using 8bpp graphics).
The only thing necessary for the triumph of evil is for good men to do nothing.
Some other good news: 32bpp-anim is faster in palette animation on sdl + linux than 8bpp-optimized is. Depending on how many animation is going on in your current screen, it changes from 30% faster till 5% faster. So that in fact is very good news: our 32bpp palette animation blitter is faster than our 8bpp palette animation blitter (which is the default one from the original game, FYI).
This doesn't mean that normal 32bpp drawing is faster, as it isn't. It is about 2-15% slower (depending on what it is drawing) than 8bpp drawing is. But, for sure it isn't that slow as my primary testing suggested We might say 32bpp works very well
This doesn't mean that normal 32bpp drawing is faster, as it isn't. It is about 2-15% slower (depending on what it is drawing) than 8bpp drawing is. But, for sure it isn't that slow as my primary testing suggested We might say 32bpp works very well
The only thing necessary for the triumph of evil is for good men to do nothing.
Trying to understand this, but did not quite succeed. Do you have a link for the 32bpp spec ( probably the png-spec )? Can you give an example how to use this when creating images ?TrueLight wrote: If you read the 32bpp specs, you see that there is a so called 'mask' or 'remap' channel. This remap channel is needed to support both 8bpp and 32bpp. It in fact is a 8bpp image, but only those pixels that match something useful in the old 8bpp palette. In case of animation, it means that if you put a pixel there with a palette value > 217, it will animate in exactly the same way as 8bpp did. In the same way you can get company colours. The alpha channel is used if the remap channel has a value not-equal to zero.
BTW, nice to hear the animation works fast on linux ( I'm on Gentoo). And indeed, the 32bpp does work very well, compliments
See http://www.tt-forums.net/viewtopic.php?p=600023 for PNGCodec.
The only thing necessary for the triumph of evil is for good men to do nothing.
Who is online
Users browsing this forum: No registered users and 6 guests