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
Yamman
19
Years of Service
User Offline
Joined: 11th Jun 2005
Location:
Posted: 19th Oct 2005 18:15
I am making a simple game where if your mouse hits something, game over. the only problem is that i cant get the collision to work.

can anyone help?
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Oct 2005 19:45
It's because of two things. Number one you use "paste sprite" for the mouse cursor... for it to check for sprite collision properly you need to just use the "sprite" command. Pasting sprites are used for things that you don't need to check collision for (such as background maps).

And the syntax for "sprite hit" is sprite hit(sprite number,target sprite) so if you want to check sprite 1 hitting sprite 2 you need "sprite hit(1,2)".

One other thing... you use .jpg's for your images. Jpgs are small but their quality isn't as good. It's best to use .bmp for images because the colors don't change.

Hope this helps.
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 19th Oct 2005 19:59
Quote: "One other thing... you use .jpg's for your images. Jpgs are small but their quality isn't as good. It's best to use .bmp for images because the colors don't change.
"


In cases such as small sprites and things I would agree. With HUGE backdrops and menu screens, NO. Takes up way to much memory.

Login to post a reply

Server time is: 2024-11-27 14:43:41
Your offset time is: 2024-11-27 14:43:41