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.

Newcomers DBPro Corner / 2D Tiles - Not so simple

Author
Message
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 13th Jan 2009 23:22
Thanks in advance for any help coders!

I know you can have a maximum of 32 images. So what happens when I want to load an image (512x512 pixels) of 32 x 32 tiles (thats 256 Carol Voderman).

Am I to understand that I can only only have 32 different images hence 32 different tiles...surely not. What am I missing???

How do I load a 512 x 512 image and then grab a 'tile' from that image and then paste it to the screen?

Please help...I am already insane...enough...

I'm the daddy 'round 'ere
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Jan 2009 23:42 Edited at: 13th Jan 2009 23:45
You have a maximum of 32 bitmaps (as in LOAD BITMAP, CREATE BITMAP, the first one being the screen).

The limit to images (as in LOAD IMAGE, GET IMAGE etc) is probably far higher than your project needs or your system can manage.

Quote: "How do I load a 512 x 512 image and then grab a 'tile' from that image and then paste it to the screen?"


You would LOAD BITMAP, then GET IMAGE followed by the image number, coordinates and texture flag. PASTE IMAGE does the next bit, although making it a SPRITE is more versatile.

If your image has transparent (or semi-trannsparent) areas, then SET BITMAP FORMAT 21 before loading it to retain the transparency.

DsarchyUK
16
Years of Service
User Offline
Joined: 21st Nov 2008
Location: UK
Posted: 14th Jan 2009 10:09
If your not comfortable using Bitmaps and drawing things off screen and then grabbing the image and bringing it to the display manually
Set Current Bitmap 0 then leave it out for now and come back to it when you understand how the Get Image Command Works.

Use
instead of
and just work on the screen ignoring Bitmaps entirely.

http://dsarchy.deviantart.com/

Login to post a reply

Server time is: 2024-11-25 12:21:55
Your offset time is: 2024-11-25 12:21:55