Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Using dbLoadImage for tileset

Author
Message
Iuzidal
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location:
Posted: 3rd Jul 2009 03:47
I am currently loading a 640x1280 px tileset w/ dbLoadBitmap. Since I'd like to change all my images to PNG I believe I need to use dbLoadImage to preserve the alpha channel. What is the correct way to do this?

My current code to read in the tileset:


My render loop expects each tile to have an image id and unique sprite id that I can call
dbSprite(sprite,x,y,img)
dbSetSpritePriority(sprite, pri)
dbShowSprite(sprite)
if the tile is visible, otherwise dbDeleteSprite(sprite)

I don't think dbCreateAnimatedSprite is the answer for performance reasons since I'll have 300 or so sprites visible at once.

Login to post a reply

Server time is: 2024-10-01 05:59:35
Your offset time is: 2024-10-01 05:59:35