Page 1 of 1

BitmapFromFile -> png

Posted: Sat May 08, 2010 10:41 am
by Valerious
why not support png format in BitmapFromFile?
it small, nice format with alpha layer...

Posted: Sat May 08, 2010 1:48 pm
by VilleK
Png-format is supported in Delphi 2010. I thought it was included automatically but it turned out I had to add one line of code for it to work. It will be in next beta update. Note however that the size of the source file does not affect the size of the data after it is imported in ZGE, it is imported to a generic non-compressed format and then it is up to Upx to compress it.

Posted: Sat May 08, 2010 1:58 pm
by Valerious
transparency in model not work... is this a bug?

Posted: Sat May 08, 2010 2:48 pm
by Kjell
Hi Valerious,

The transparency actually works, but you've got your Render order wrong. Instead of rendering your background in the App.OnRender Event, create a Model for your background and spawn it before your Hero.

Also, you shouldn't use a separate Bitmap and Material for each frame of a character. Try using a sprite-sheet instead, you can find a example ( Zero.zip ) of this approach here.

K