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 / Drawing bitmap to the screen -- how to? (Bitmap vs. Image vs. Sprite commands)

Author
Message
Petrik
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Santa Monica, CA
Posted: 30th Oct 2003 08:03
Okay, this is totally basic, but I'm stumped. I simply want to draw a static bitmap to the screen, then keep it there (as a backdrop, while I draw on top of it) as the screen is being updated.

First of, I'm not really clear if I should use LOAD IMAGE or LOAD BITMAP -- what's the key difference between these two sets of commands? The Help doesn't really cover it.

Second, just to get started, perhaps someone can point me the right way by providing a SIMPLE code snippet that loads and draws such a static bitmap? I've attached what I assumed would do it, but obviously I'm missing something. I've tried deciphering a couple of the tutorials, but I just really find those way off the mark for simple demo purposes.

Thanks!
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 30th Oct 2003 10:26
load bitmap is good if you want to change the image ie, use blur bitmap, or if you want to use the get image command to carve up and image to use in a sprite animation. you can only have 32 bitmaps at a time though

load image is good for loading object textures and images that don't need editing, it is the most common way to laod an image in to a game/app and you need an image to have a sprite, howevere every time you sync an image is cleared from the screen and has to be re-pasted with 'paste image'

sprite, if you use a sprite to display an image then it won't dissapear after the sync.

thats as good as i can explain it so i hope that helps


Go on, click on my signature image, you know you want to
Favourite smiley>>>
Petrik
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Santa Monica, CA
Posted: 30th Oct 2003 20:43
Thanks ReD_Eye, this helps some, but... do you (or anyone else) know what else is needed to get the attached code to work? I'm simply trying to display the bitmap but the screen draws blank -- this shouldn't be this hard

sync on
load bitmap "media\backdrop.tga", 1
set current bitmap 1
sync
wait key
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 30th Oct 2003 20:48
try Load Image and Paste Image

-RUST-
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Oct 2003 21:25
The only bitmap that is ever displayed is bitmap 0.

Load your bitmap to 0 instead, or if the sizes are different, load to bitmap 1 then use COPY BITMAP to copy to bitmap 0.
KNau
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: Canada
Posted: 30th Oct 2003 21:51
IanM is refering to this:



Alternatively:



http://www.canceriannewmedia.com
Petrik
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Santa Monica, CA
Posted: 31st Oct 2003 01:13
got it. ended up going with the load image method. thanks all!

Login to post a reply

Server time is: 2024-09-21 07:54:18
Your offset time is: 2024-09-21 07:54:18