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 / made sprite but can't use it

Author
Message
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 25th Oct 2003 02:28 Edited at: 25th Oct 2003 02:46
Hi, i've drawn a spaceship sprite in microsoft paint and saved it as ship.bmp in a file called BitMapping and now I can't work out to put it into my darkbasic classic space invaders games. Thanks to all that help me p.s. if there ain't enough detail in this tell me and i'll see what I can do
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 25th Oct 2003 02:51
I have tried LOAD IMAGE ship.bmp but that dosn't work

why do I always get so confused?
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 25th Oct 2003 03:51 Edited at: 25th Oct 2003 03:52
Hi proshooter,
The thing about DarkBASIC and other rapi-development, high level languages is that when you want to load a file, any kind of file, you need to use a string. You don't need to load the location or filename into a string, but you need to use "" to show DB that it's a string. One thing that is DB-specific, is you need to tell it what image in the "list of loaded images" you want it to load to. I believe DB can hold up to something like 65,000 images. Try using
LOAD IMAGE "BitMapping\ship.bmp",1
The reason for including BitMapping in the file name is because I am assuming that your code is in a folder, which has a folder inside it called Bitmapping which contains your sprite.

If you have any more questions on coding this stuff just drop a post, I'll watch this thread for awhile.

hope I could help,
Juvy

Juvenile Industries
Current Project: The First Room (FPS)
Side Projects: SHIPWRECK, the boss's school project
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 25th Oct 2003 15:10 Edited at: 25th Oct 2003 15:11
Hey, thanks for your help, I tried the code but it just said error at line ** file does not exist. where ** is a line number.
I think its because my code and BitMapping are in seperate folders but I don't know how to change this.

why do I always get so confused?
KamaKase
22
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 25th Oct 2003 16:12
Save the BMP in the project folder. Then try what you did originally.
KamaKase
22
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 25th Oct 2003 16:13
but with the quotation marks around the name. Treat the project folder is the root directory.
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 25th Oct 2003 16:23 Edited at: 25th Oct 2003 16:31
I've sorted out my folders so I just type LOAD BITMAP "ship.bmp",1 but now when I type GET IMAGE ******
and SPRITE ****** it tells me my image co-ordinates are illegal. Where ******* are co-ordinates.
this is the code I'm using




why do I always get so confused?
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 25th Oct 2003 16:52
Hey, I just tried some stuff out and everythings fine until I type in Sprite **** all it does is tell me my specified image area ia illegal

why do I always get so confused?
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 25th Oct 2003 19:12
HEY, THANKS TO EVERYONE WHO HELPED ME I'VE SORTED MY PROBLEM NOW SO ON WITH MY FIRST EVER DB GAME.

why do I always get so confused?
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 27th Oct 2003 01:04
next time you have a problem consult the db help file, it'll usualy help you with your problems

Sparring - Loved by many, Pefected by few.

Login to post a reply

Server time is: 2024-11-25 14:38:46
Your offset time is: 2024-11-25 14:38:46