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 / Sprite Collision

Author
Message
CoTang
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location:
Posted: 20th Nov 2003 09:11
Hi all! I just want to thank you in advance for helping me. I find that DBP is one hella good program. Anyways, My progblem is that I'm starting out small making small games to practice and get familiar with the syntax and so forth. I came across Sprite Collision and Sprite Hit. From the manual is states the it should return a value depending on how you set it up. I went and tested it out and it doesn't seem to be returning anything. I was wondering if you can check out my code and tell me what wrong with it. Thanks.

P.S. The Ball moves across and hits the wall. And it suppose to return a value is SPRITE HIT() is used or SPRITE COLLISION() is used. Either one I can't seem to get it working.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 20th Nov 2003 09:52
sprite increment is 10, does 10 get you to the wall exactly? If the sprite is one off/short, or one off/long the collision will never register

just a thought.

-RUST-
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 20th Nov 2003 12:21
Don't use paste sprite, all it does is paste the sprite image to the screen.

You need to position the sprite with the sprite command.



dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard
CoTang
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location:
Posted: 20th Nov 2003 15:05
Alright it works, thanks man. Now my question is, what the different between Paste Sprite and Just Sprite? Why would you use Paste Sprite if you can just use Sprite command?
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 20th Nov 2003 21:35
Paste sprite just pastes the image of the sprite to the screen. I can only see it being usefull if you want to perform an operation on an image that is only available to with sprites.
Say you wanted to scale an image after loading. There are no scale commands for images or bitmaps so you could load the image, make a sprite, scale the sprite, paste the sprite and then finally use get image to get the new scaled image. There may be other uses but I have never needed to actually use it.

The sprite command just creates or modifies a sprite position and image.

dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard

Login to post a reply

Server time is: 2024-11-25 18:23:40
Your offset time is: 2024-11-25 18:23:40