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 / bitmap prob

Author
Message
Psyche
21
Years of Service
User Offline
Joined: 8th Jun 2003
Location:
Posted: 8th Jun 2003 23:39
hi
i need some help with my programming
the problem is that dbpro loads 1 bitmap but refuses to load any others right after

example1:
cls
load bitmap "white.bmp", 0
load bitmap "coat1.bmp", 1
get image 1,0,0,140,128
sprite 1,100,100,1
show sprite 1
wait key

when i do this it says it can't load bitmap in line 3

example2:
cls
load bitmap "white.bmp", 0
load bitmap "coat1.jpg", 1
get image 1,0,0,140,128
sprite 1,100,100,1
show sprite 1
wait key

when i do this it only processes the 'white.bmp' and nothing more

example3:
cls
load bitmap "white.bmp", 0
load image "coat1.jpg", 1
get image 1,0,0,140,128
sprite 1,100,100,1
show sprite 1
wait key

when i do this i get a white square (where the picture is supposed too be) but with blue background
(and i have both jpg and bmp versions of the same pic)
i can't seem to figure out what the problem is please help
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 8th Jun 2003 23:44
bitmap 0 i believs is the camera's view!!!

---Mattman
"Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done." Andy Rooney
Phoenix
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 8th Jun 2003 23:52 Edited at: 8th Jun 2003 23:53
Yes just start with:

cls
load bitmap "white.bmp", 1
load bitmap "coat1.bmp", 2
get image 2,0,0,140,128
sprite 1,100,100,2
show sprite 1
wait key


position object myFoot,object position x(yourFace),object position y(yourFace),object position z(yourFace)
Psyche
21
Years of Service
User Offline
Joined: 8th Jun 2003
Location:
Posted: 9th Jun 2003 00:18
thanks for the help but when i do
cls
load bitmap "white.bmp", 1
load bitmap "coat1.jpg", 2
get image 2,0,0,140,128
sprite 1,100,100,2
show sprite 1
wait key


I get a black screen
its funny but when i tried it with the dark basic demo (not the pro demo just the regular one) it worked fine

Psyche
21
Years of Service
User Offline
Joined: 8th Jun 2003
Location:
Posted: 9th Jun 2003 00:21
oh and one more thing it refuses to run "coat1" in bmp format no matter what i do dbpro just rejects it. but when i put it in jpg format it gets through

Trowbee
21
Years of Service
User Offline
Joined: 12th Apr 2003
Location: United Kingdom
Posted: 9th Jun 2003 00:34
After loading all the bitmaps, and getting images etc, try
set current bitmap 0
which will set the current view back to the camera

Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 9th Jun 2003 00:55
I had similar problems, check the below code and try to adapt it to suit your needs, hope it helps Psyche.

I hear and I forget. I see and I remember. I do and I understand.
Psyche
21
Years of Service
User Offline
Joined: 8th Jun 2003
Location:
Posted: 9th Jun 2003 03:55
thanks alot Nilrem thats just what i needed. now all i have to do is figure out how to switch from sprite to sprite in somewhat seemless animation. hehe kinda hard for me because of different screen resolutions ah well...thanks again

Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 10th Jun 2003 22:59 Edited at: 10th Jun 2003 23:00
You mean animate your sprite?
I haven't done it but the concept doesn't seem too hard, what you need to do is create your images say image stood still is |

but the one moving is /

so you seperate them on your picture, black for transperant and spacing.

BLACK | BLACK BLACK / BLACK

hope this is making sense so far, then all you do is call in the other frame (the move one) when you want that to be displayed, this is all theory of course as I haven't tried/done it myself before.

I hear and I forget. I see and I remember. I do and I understand.

Login to post a reply

Server time is: 2024-09-20 12:34:21
Your offset time is: 2024-09-20 12:34:21