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 trouble

Author
Message
flashing snall
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 2nd Jan 2006 16:10 Edited at: 2nd Jan 2006 16:15
O.K., i have a small little text game, and use some bitmaps for scenery, and to make it some what interesting.
Problem is that I have gosubs to the locations of the game, Menu, Theme picker, and so on... Heres my code...


why doesnt that work? when i run it, it just appears black... : (




EDIT:
omg, i used to be able to load one bitmap, but not anymore!!!!! whats going on here!!!!

dont assume cause ull make an ass out of you and me!
flashing snall
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 2nd Jan 2006 22:57
any one???

dont assume cause ull make an ass out of you and me!
flashing snall
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 2nd Jan 2006 23:32
HAHAHAHAHA! im such a dip! i got it. (slaps hand on forehead) OMG! hehehehehe, it sould be load bitmap "blalalalalalala.bmp" instead of load bitmap "blalalalalalala.bmp",1

jeese, sorry bout that... thats when you know you goot go just read the help for awhile...

dont assume cause ull make an ass out of you and me!
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 3rd Jan 2006 00:31
What is wrong, is that you are loading the bmp into bitmap 1, so you can't see it since you can only see bitmap 0. It thinks you are using bitmap 0 when you only use load bitmap "blah.bmp" without the number. If you want the bmp file to be like the player in your game, you should use load image instead.


Hippopotomonstrosesquippedaliophobia-Fear of long words
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 3rd Jan 2006 07:07
Also you can still leave it at bitmap 1 if you add the line "set current bitmap 0". Multiple bitmaps allow us to work on graphics without the user of the program seeing any changes.


flashing snall
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 3rd Jan 2006 21:30
uh. ok random question because i dont want to post a new thread. Is it possible to make zone, so if you click on one, it does somthing? like in most games menus?

dont assume cause ull make an ass out of you and me!
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 3rd Jan 2006 22:03
No, but you could code it:

It is not tested, and I don't think the mouseclick() thingy is right. Check in the help for something like that.


Hippopotomonstrosesquippedaliophobia-Fear of long words
Zedane
19
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 4th Jan 2006 04:20
Exactly what UFO said but if you are using a full scale menu you would want to do it this way to save reduandant checks




This way you save the amount of times you use the MouseX(),MouseY() and MouseClick() function. You do this because everytime you run that function darkbasic checks windows for the mouseclick, this is slower than just storing it in a variable and then referancing it over and over.


around here.. normal's just a setting on a hair dryer
TKsFox
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location: No no no - Its not the Cyberspace
Posted: 6th Jan 2006 19:43
Is it just me or is there no "sync"
I m newbie so maybe it isnt needed for 2D...

It's me...
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 6th Jan 2006 22:14
If you don't use "sync on" then it will automatically sync anytime something it drawn to the screen (be it sprite, line, box, text, or whatever).


Login to post a reply

Server time is: 2024-09-24 13:23:42
Your offset time is: 2024-09-24 13:23:42