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 Discussion / run this and tell me wat happens

Author
Message
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2009 06:30
im making a program that will (hopefully) take images of all the cards in a deck, allow you to arrange them and then save the image.
here is a zip with the program (not an exe) and all the media. I havent added the saving part yet but im not sure if its not working cuz of me or this crappy laptop im trying it on.
neway jus run the program and tell me if it works
left/right/up/down - move card
space - place and go to next card

Attachments

Login to view attachments
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 15th Mar 2009 07:14
a couple things i saw:

after you created the bitmap you need to call set current bitmap 1 then you drew some cards with ?'s on em and then you copied bitmap 0 to 1 witch then makes 1 blank(because 0 is blank) then you copy 1 to 0 (copying a blank to a blank) so i changed the first one to a 1,0 instead if 0,1 and added the set current bitmap commands(one at the bigginning and one right before the loop. and change the copy bitmap commands at the end and it works fine. one suggestion though indent your loops and put some space between commands that don't have anything to do with each other looks good but the double diget number go off the card.

New Site! Check it out \/
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2009 07:17
the card did move just fine tho after u changed those tho right, cuz 4 me it doesnt move
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 15th Mar 2009 07:22 Edited at: 15th Mar 2009 07:23
oh it moves fine for me thats weird it works fine for me hm.... heres the code I'm using (yours edited)






(Btw Isn't that easier to read hahaha)

New Site! Check it out \/
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 16th Mar 2009 04:56
Quote: "after you created the bitmap you need to call set current bitmap 1"


You shouldn't. When you create a bitmap, DBC automatically makes that bitmap current.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 16th Mar 2009 05:11
oh well i learned something new today then lol

New Site! Check it out \/
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Mar 2009 06:12
thats wat i thought bn2, neway i played around using some of caleb suggestions and some of my own, and fixed all the problems. seems like a lot of work/debugging for a program i only had to use once to make an image, but it worked. now i need more help, i dont know how to make an AI for the computers telling them wen to fold/call/bet/etc in the final game, ne ideas?

Login to post a reply

Server time is: 2025-05-16 15:35:44
Your offset time is: 2025-05-16 15:35:44