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 / I need some help with a "breakout" type game

Author
Message
Joshthefoolish
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location:
Posted: 15th Oct 2003 17:45
hey well i'm pretty new to dark basic and i'm working on converting a one-player pong game into a "breakout" type game. Everytime i try to execute it however it says that the bitmap is too small to get image and then tells me it's the sync command that has the error. what does this mean and can someone help me?
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 15th Oct 2003 19:31 Edited at: 15th Oct 2003 19:32
I might have missed something, but why do you have a repeat with nothing in it?

Quote: "REPEAT
until returnkey() or spacekey()
"


That just doesn't seem right to me...

Destroy you with my mind, I could!
. Cool, he is. Play his games, I do.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 15th Oct 2003 20:15
It's because it is trying to get an image that is bigger than the bitmap.

it is this line (31) that is causeing the problem
get image (ie+boxx),x,y,x2,y2

Running the code with a display setting of 800x600 increases the screen bitmap to 800x600 and avoids the problem
You could also change the code so it doesn't try to grab an image bigger than the bitmap it is grabbing from.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Oct 2003 22:58
What version of DB are you using? Not DBPro 5.1 that's certain.

Apart from that you are grabbing images from x coord 660 (22x30) so you need to change how you do it ... as you are using sprites, maybe you can grab half the width in the images, then stretch the sprites to double their sizes.

Login to post a reply

Server time is: 2024-11-25 12:37:40
Your offset time is: 2024-11-25 12:37:40