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 / need to add images and sound

Author
Message
needing_help
11
Years of Service
User Offline
Joined: 18th Nov 2013
Location: Colorado
Posted: 18th Nov 2013 10:42
Extremely new and confused. I've looked at the DBP examples but still have trouble. I want to add a simple image as a background to my game. Right now, it's a jpg but I could change that. I tried load bitmap and the name but nothing happened. How can I add this image?

Next, I liked the sound image in the DBP example but you had to click on the music note icon then the icon was animated. I want just the sound when a player guesses a correct answer or a wrong answer. How can I do this?

Thanks for the help!!
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 18th Nov 2013 23:38 Edited at: 18th Nov 2013 23:41
When you use the load bitmap command, that doesn't actually display anything on the screen. All that does is load the image from your disk into memory (the help file is very misleading for this command, as a lot of the help files unfortunately are). To actually draw it, you need to use another command.

I recommend using load image instead of load bitmap, by the way. Use load bitmap if you want to edit an image, and use load image if you just want to draw it on the screen.

For example:


EDIT: code tags

Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 19th Nov 2013 00:45 Edited at: 19th Nov 2013 00:46
For .WAV files, use PLAY SOUND to play after loading with LOAD SOUND.
LOAD MUSIC AND PLAY MUSIC works for .MP3 files.

(Be sure to hit F1 in your editor to see the list of commands.)

D.D.
needing_help
11
Years of Service
User Offline
Joined: 18th Nov 2013
Location: Colorado
Posted: 20th Nov 2013 10:40
Thanks for the help. Still having a issue with the graphics. I received an error message that the loop wasn't in the right location. Am I suppose to add more of a loop or do something more to load the image?

Thanks so much!
Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 20th Nov 2013 18:23
BMac's code should have worked.

Here's an even more basic example:



D.D.
needing_help
11
Years of Service
User Offline
Joined: 18th Nov 2013
Location: Colorado
Posted: 21st Nov 2013 02:39
Thanks. Got it. My image was extremely large. All this worry and it was something that basic. Thanks for the help.

Login to post a reply

Server time is: 2024-11-23 15:18:46
Your offset time is: 2024-11-23 15:18:46