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.

2D All the way! / Paste Sprite Problem

Author
Message
hokeywebb 22
20
Years of Service
User Offline
Joined: 5th Dec 2005
Location:
Posted: 6th Dec 2005 01:18
Hi Im working on a breakout style game.
I was trying to make a border with pipes by using the paste sprite command but when i tryo to paste sprites I dont see them. here is the code


The paste sprite is about 40 lines from the end.

Thanks for any help.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 6th Dec 2005 05:52 Edited at: 6th Dec 2005 05:53
First you want to put "set current bitmap 0" right under the last "get image" command. You need to move the "do" from the top and put it under the "set current bitmap 0" (the one I told you to write in). Doing this will speed up your game like crazy because it's not constantly loading bitmaps and getting images. You don't need the "sync" right after do... or the check for the esc key... Darkbasic does that automatically unless you turn off the esc key. You also don't need the "set current bitmap 0" at the end before the loop.

The paste sprite works fine but it doesn't make a border because you have it pasting to an exact coordinate. You can paste sprites just like you move the ball around. Make either for/next loops or do/loops to increase/decrease a variable to draw the border you want.



The above snip is a simple for/next loop. It makes x equal a number start at 62 and goes to 640... it adds 31 to x everytime it sees "next x". This only goes across the top of course. I'm sure you can do it from here.

Login to post a reply

Server time is: 2026-07-06 18:58:54
Your offset time is: 2026-07-06 18:58:54