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.

DarkBASIC Professional Discussion / have a bitmap as background.

Author
Message
sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 22nd Jun 2003 21:59
hello, need help if you can help.
what I'm trying to do is: I created a bitmap from paintshop, and I want to make it the background or backdrop what ever it's called and then be able to write over the image and have inputs. I've tried to do it but no matter what I do it doesn't work. below is the sample code I tried to work with. I tried it with "sync on" and "backdrop on", tried to make a second image. but nothing.... I also tried differnt combinations of the above.
any help will be great.
just keep in mind that i'm just learning and that my code is just a exercise .
thanks
philippians 4:13
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 22nd Jun 2003 23:35
i personally would use
load image "work.jpg",1

And then either turn it into a sprite (sprite 1,0,0,1), which will automatically keep it visible as a 2D object, or just paste it every program loop (paste image 1,0,0)

Not necessarily the best way, but it should work.

Machine: P4 2200, 1GB RAM, GeForce4 64MB, Audigy Platinum
http://www.breakbeat-terrorism.co.uk
(It's not all about the coding)
sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 23rd Jun 2003 00:25
so once I load Image then,
sprite 1,0,0,1
and that's it, or do I have to " get image 1,0,0,800,600,0...?

philippians 4:13
The Darthster
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 23rd Jun 2003 01:08
Load image is fine when you need an image for the PASTE IMAGE or SPRITE commands. It's when you have a bitmap and need to get an image from it when you use the GET IMAGE command.

Once I was but the learner,
now, I am the Master.
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd Jun 2003 02:40
Like darthster said, you only need to use get image when you want to subtract a part from a bitmap. If your image is exactly what you want to display, you can do this:

load image "work.jpg", 1

then either (1) put "paste image 1,0,0" in your main program loop. This will keep pasting the image to the screen every program loop, with the top left corner of the image in the top left corner of the screen. Or (2) You can use the "sprite 1,0,0,1" command. This will make db automatically handle your image as a sprite, which means it will keep it drawn to the screen for you. All you'll have to do is load the image, add the sprite command straight afterwards, and you're done. Then you can just delete sprite 1 or whatever you want to do afterwards to get rid of it.

Hope that helps.

Machine: P4 2200, 1GB RAM, GeForce4 64MB, Audigy Platinum
http://www.breakbeat-terrorism.co.uk
(It's not all about the coding)
sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 23rd Jun 2003 03:24
thanks I got it to work...kind of...
what I'm getting now is a dot. at first I didn't see anything and I was getting frustrated then I noticed the dot, so I change the x,y,values to make sure what I was seeing and the dot moved with my coord.
SO........ what do I do know, I know it's something simple, for you guys........
thanks you guys are great.

philippians 4:13
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd Jun 2003 05:10
If you've done what I said, then it might be an incompatibility with your JPEG compression or something. Maybe images have to be bitmaps. I'm not sure. Try converting the JPG to a bitmap and loading that instead. See if that make a difference.

Machine: P4 2200, 1GB RAM, GeForce4 64MB, Audigy Platinum
http://www.breakbeat-terrorism.co.uk
(It's not all about the coding)
sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 24th Jun 2003 04:42
thanks, I could never get it to run on the code I was working on, so I just started a new one and it worked fine.
I'm glad we have these forums
thanks again.

philippians 4:13
sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 24th Jun 2003 04:43
now I'm going to find out why it didn't work with the text.

philippians 4:13
sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 24th Jun 2003 05:02
o.k I got the image to work, but now I can't see the text anymore,
I tried a few commands like " set to back" and can't get it.

this user/referance manual is good to a point, but doesn't show in depth how and why the commands are used and where.
I hope the " book " explains them better, and hopefully I'll have one in a week or so.
thanks for any help

philippians 4:13
sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 24th Jun 2003 05:19
nevermind I figured it out
thanks anyway

philippians 4:13

Login to post a reply

Server time is: 2026-07-18 02:20:07
Your offset time is: 2026-07-18 02:20:07