BitmapFromFile -> png

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
User avatar
Valerious
Posts: 11
Joined: Mon May 03, 2010 9:26 pm
Location: Russia, Moscow

BitmapFromFile -> png

Post by Valerious »

why not support png format in BitmapFromFile?
it small, nice format with alpha layer...
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post 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.
User avatar
Valerious
Posts: 11
Joined: Mon May 03, 2010 9:26 pm
Location: Russia, Moscow

Post by Valerious »

transparency in model not work... is this a bug?
Attachments
psivit.zgeproj
(167.67 KiB) Downloaded 521 times
User avatar
Kjell
Posts: 1882
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
Post Reply