Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Creature and object shadows
New Topic New Poll Post Reply
Poster Message
StuartK
Level: Smitemaster
Avatar
Rank Points: 564
Registered: 06-10-2003
IP: Logged
icon Creature and object shadows (0)  
The small shadows that are part of the creature art and some objects in GeneralTiles.bmp are not calculated correctly when placed ontop of each other in a room. An obvious example being tar babies on tar, as the floor colour is noticeable around the edge of the tar baby, but other objects equally apply (tar on walls etc) when the mid-blue shadow 'colour' is used in their art.

Shadows should be calculated based on the colour of the object underneath, rather than just the floor colour for that square.

[Edited by StuartK on 07-13-2003 at 09:40 AM]
07-13-2003 at 10:34 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: Creature and object shadows (0)  
This could also be fixed by making the shadow tiles PNGs (see "Alpha blending on monster art" in the Feature Requests forum)

- Gerry


[Edited by trick on 07-14-2003 at 10:45 PM GMT: sentence restructuring =)]
07-14-2003 at 10:44 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5388
Registered: 02-04-2003
IP: Logged
icon Re: Re: Creature and object shadows (0)  
trick wrote:
This could also be fixed by making the shadow tiles PNGs
I assume libSDL supports PNG files completely? I'm too lazy to check. Would we have to change what blits we're calling to alpha-aware blits? Or do they all use alpha if it's there?


____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
07-15-2003 at 09:33 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon Re: Re: Re: Creature and object shadows (0)  
Schik wrote:
trick wrote:
This could also be fixed by making the shadow tiles PNGs
I assume libSDL supports PNG files completely? I'm too lazy to check. Would we have to change what blits we're calling to alpha-aware blits? Or do they all use alpha if it's there?
I would be happy to switch over to PNG. I don't believe SDL supports the format by itself, but there's code out there that will easily do it ("SDL_Image" comes to mind).

I've found that alpha blits can be pretty slow on low-end computers like mine (333mhz, an unspecial video card), so I think there are some tricks that should be used. But that can be looked at later. It would be simpler to just load in a bunch RGBA surfaces and perform SDL blits with the alpha option, but this makes things much slower.

-Erik

____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals | twitch stream | youtube archive (NSFW)
07-15-2003 at 09:53 PM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
StuartK
Level: Smitemaster
Avatar
Rank Points: 564
Registered: 06-10-2003
IP: Logged
icon Re: Re: Re: Creature and object shadows (0)  
Schik wrote:
trick wrote:
This could also be fixed by making the shadow tiles PNGs
I assume libSDL supports PNG files completely? I'm too lazy to check. Would we have to change what blits we're calling to alpha-aware blits? Or do they all use alpha if it's there?

Just to make clear (hopefully, if it isn't already) this topic was intended for a seperate issue to the wall/object shadows. In this case, certain creatures and objects have a flag colour which is used to indicate that a 'shadow' is there, at that individual pixel position. When a non-floor square is underneath it does not blend correctly with the shadow (e.g. instead of shadowed tar, or shadowed wall, we always get shadowed floor)
07-15-2003 at 09:55 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: Re: Re: Creature and object shadows (0)  
Schik wrote:
I assume libSDL supports PNG files completely? I'm too lazy to check. Would we have to change what blits we're calling to alpha-aware blits? Or do they all use alpha if it's there?
ErikH2000 wrote:
I would be happy to switch over to PNG. I don't believe SDL supports the format by itself, but there's code out there that will easily do it ("SDL_Image" comes to mind).
Right. SDL itself doesn't support loading PNG directly like BMP, so we'll have to use another library for that. SDL_image works fine and is made ready for use with SDL, or we could simply use libpng directly if that's the only format it'll use - SDL_image would be an extra library requirement, and it would require libpng anyway, but it's nice for supporting a larger range of formats. Up to you :)

I've found that alpha blits can be pretty slow on low-end computers like mine (333mhz, an unspecial video card), so I think there are some tricks that should be used. But that can be looked at later. It would be simpler to just load in a bunch RGBA surfaces and perform SDL blits with the alpha option, but this makes things much slower.
Is this with RLE acceleration enabled ? That can boost things up considerably.

StuartK wrote:
Just to make clear (hopefully, if it isn't already) this topic was intended for a seperate issue to the wall/object shadows. In this case, certain creatures and objects have a flag colour which is used to indicate that a 'shadow' is there, at that individual pixel position. When a non-floor square is underneath it does not blend correctly with the shadow (e.g. instead of shadowed tar, or shadowed wall, we always get shadowed floor)
Sorry, i didn't mean to hijack your topic. But, if the shadow tiles are converted to PNG (or anything else with an alpha channel, really), this problem would magically go away :)

- Gerry

07-15-2003 at 10:15 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Creature and object shadows
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.