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.

2D All the way! / Wondering about bitmaps

Author
Message
ADawg
20
Years of Service
User Offline
Joined: 2nd Apr 2006
Location:
Posted: 3rd Apr 2006 05:42
I am brand new to the Darkbasic language (I used to be a blitz Basic user) And I have that beginners guide to DarkBasic book but I have recently became confused because back in blitz basic you would say "Load Image" to load an image but the book says its "load bitmap" and that you can only have 30 something bitmaps. how are you supposed to make a game with only about thirty images. And i could be wrong but are bitmaps images. And whats up with the bitmap 0 only being displayed on screen.

Dark Basic seems cool so I really need you guys help.Please
Maldragon
20
Years of Service
User Offline
Joined: 29th Dec 2005
Location: Here
Posted: 3rd Apr 2006 08:12
There is a Load Image command as well as a Load Bitmap command. With the Load Bitmap command, you can load the bitmap directly to the screen, or provide an bitmap number and switch to that Bitmap later with the Set Current Bitmap command. With the Load Image command, you either have to paste it to the screen or make it into a sprite for it to be displayed, but you can have many more than thirty images loaded. (You can load a bitmap with the Load Image command as well as the Load Bitmap command).

"Reality is merely an illusion. Albeit a very persistant one." -Albert Einstein
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 3rd Apr 2006 09:31
If you are making sprites use Load Image, and load a small sprite image. If you are making backgrounds, or menus, things that you want to display instantly use Load Bitmap.

ADawg
20
Years of Service
User Offline
Joined: 2nd Apr 2006
Location:
Posted: 4th Apr 2006 00:31
how many bitmaps can be drawn on the screen at a time, cause isnt only the "0" Bitmap that is displayed or can bitmaps with other numbers be displayed
X Trade
22
Years of Service
User Offline
Joined: 19th Feb 2004
Location: near bristol, UK
Posted: 10th Apr 2006 03:23
most people dont worry about the bitmaps...
see in DB, a 'bitmap' is like a static picture.... and if you want a texture, sprite, object etc use an image!

bitmaps are drawn directly to the screen, whilst images are stored in memory until you use them on something like a sprite or object texture.

only one bitmap can be on the screen at any time. you set this bitmap to be drawn using its handle - e.g.

will draw bitmap 1 to the screen!!

with images, it works differently:

where:
'load image filename$, handle', is for loading the image into (graphics) memory
and
'sprite handle, x, y, imagehandle' will create a sprite object at the x and y co-ordinates on the screen with the specified image.
i'm not sure of the exact syntax so check the help/book.. but thats the general idea!

also note:
despite the naming confusions, an 'image' in db can be a .png, .bmp, .jpg, or several others.

www.AoFP.co.uk

Login to post a reply

Server time is: 2026-07-01 21:22:29
Your offset time is: 2026-07-01 21:22:29